TGA libraries for C/C++
- stb_image is a single public-domain header that loads TGA (plus PNG, JPEG, BMP and others) into an RGBA buffer;
stb_image_write.hsaves TGA with RLE. The usual choice for games and tools that load textures. - Magick++ is the C++ API of ImageMagick. It reads every TGA variant, writes raw or RLE files and converts to and from 200+ formats. Pick it for converters and server-side processing; it’s a large dependency.
A complete TGA reader is also small enough to write yourself from the file structure description: an 18-byte header, an optional palette and RLE packets.
- Magick++ Magick++ is the C++ API of ImageMagick. How to read and write TGA files, convert TGA to PNG, write RLE-compressed TGA and get the size without decoding.
- stb_image stb_image and stb_image_write are public domain single-header C libraries. How to load a TGA, get its size and write TGA with or without RLE.