---
name: "save_tga"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/save_tga"
---

# save\_tga(3alleg)

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**(3alleg)](/save_bitmap/3alleg.md)
