This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source
Kent Mein 9bb91f9e57 Fix so that rgba targa files view correctly in gimp:
Submitted to bf-committers by Chris Want

Kent

Index: targa.c
===================================================================
RCS file: /cvs01/blender/source/blender/imbuf/intern/targa.c,v
retrieving revision 1.4
diff -u -r1.4 targa.c
--- targa.c     2002/12/20 01:29:14     1.4
+++ targa.c     2002/12/21 09:50:24
@@ -289,6 +289,12 @@

        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++){
2002-12-21 09:52:03 +00:00
..
2002-11-25 15:29:57 +00:00
2002-10-12 11:37:38 +00:00
2002-10-12 11:37:38 +00:00
2002-10-12 11:37:38 +00:00
2002-10-12 11:37:38 +00:00