Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/imbuf/intern/targa.c')
-rw-r--r--source/blender/imbuf/intern/targa.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index 68db04b52c1..311d85eace3 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -289,6 +289,12 @@ short imb_savetarga(struct ImBuf * ibuf, int file, int flags)
if (flags & IB_ttob) buf[17] ^= 0x20;
+ /* Don't forget to indicate that your 32 bit
+ * targa uses 8 bits for the alpha channel! */
+ if (ibuf->depth==32) {
+ buf[17] |= 0x08;
+ }
+
if (write(file, buf, 18) != 18) return (0);
if (ibuf->cmap){
for (i = 0 ; i<ibuf->maxcol ; i++){