---
name: "save_tga"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/save_tga/3alleg4"
---

# save\_tga(3alleg4)

Saves a bitmap into a TGA file. Allegro game programming library.

## NAME

save\_tga - Saves a bitmap into a TGA file. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**int save\_tga(const char \*filename, BITMAP \*bmp, const RGB \*pal);**

## DESCRIPTION

Writes a bitmap into a 256-color, 15-bit hicolor, 24-bit truecolor, or 32-bit truecolor+alpha TGA file.

## RETURN VALUE

Returns non-zero on error.

## SEE ALSO

**save\_bitmap**(3alleg4)
