[Bf-committers] CVS commit: blender/source/blender/imbuf/intern targa.c

Unprivileged User bf-committers@blender.org
Sat, 21 Dec 2002 10:52:03 +0100 (CET)


nobody      2002/12/21 10:52:03 CET

  Modified files:
    blender/source/blender/imbuf/intern targa.c 
  
  Log:
  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++){
  
  Revision  Changes    Path
  1.5       +7 -1      blender/source/blender/imbuf/intern/targa.c