Add support for unpacking arbitrary pixel formats.

This commit is contained in:
castano
2007-09-26 18:00:41 +00:00
parent 3c6cc7cfad
commit c9c7c42d2b
4 changed files with 73 additions and 7 deletions

View File

@ -284,7 +284,7 @@ bool nv::ImageIO::saveTGA(Stream & s, const Image * img)
tga.head.height = img->height();
if(img->format() == Image::Format_ARGB) {
tga.head.pixel_size = 32;
tga.head.flags = TGA_ORIGIN_UPPER;
tga.head.flags = TGA_ORIGIN_UPPER | TGA_HAS_ALPHA;
}
else {
tga.head.pixel_size = 24;