diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-08-12 20:09:02 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-08-12 20:09:02 +0200 |
commit | 0a44ec3515eb9f7d2bed08cad79dff4d7524d818 (patch) | |
tree | 07f1b2a2438f006926f96fc2393da4111b86104a /im/src/im_format_tga.cpp | |
parent | 9bb449a086721dad3656bb6a10eb5a7a731b5fc6 (diff) |
Transparancy in TGA files, take two.
Diffstat (limited to 'im/src/im_format_tga.cpp')
-rwxr-xr-x | im/src/im_format_tga.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/im/src/im_format_tga.cpp b/im/src/im_format_tga.cpp index 7c24a28..f15b25f 100755 --- a/im/src/im_format_tga.cpp +++ b/im/src/im_format_tga.cpp @@ -475,7 +475,13 @@ int imFileFormatTGA::WriteImageInfo() this->image_type = 1; break; case IM_RGB: - this->bpp = imColorModeHasAlpha(this->user_color_mode) ? 32 : 24; + if (imColorModeHasAlpha(this->user_color_mode)) + { + this->bpp = 32; + this->file_color_mode |= IM_ALPHA; + } + else + this->bpp = 24; this->file_color_mode |= IM_PACKED; if (imStrEqual(this->compression, "RLE")) this->image_type = 10; |