[Swfed-svn] swfed-svn [364] 透明色の無い GIF で replace 処理すると、colortable 256個目の色が透明になる不具合を修正した

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 2月 18日 (金) 07:41:32 JST


Revision: 364
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=364
Author:   yoya
Date:     2011-02-18 07:41:32 +0900 (Fri, 18 Feb 2011)

Log Message:
-----------
透明色の無い GIF で replace 処理すると、colortable 256個目の色が透明になる不具合を修正した

Modified Paths:
--------------
    trunk/src/swf_gif.c


-------------- next part --------------
Modified: trunk/src/swf_gif.c
===================================================================
--- trunk/src/swf_gif.c	2011-02-03 15:28:53 UTC (rev 363)
+++ trunk/src/swf_gif.c	2011-02-17 22:41:32 UTC (rev 364)
@@ -83,7 +83,7 @@
  */
 int getTransparentIndex(SavedImage Image) {
     int i;
-    unsigned char transparent_index = -1;
+    int transparent_index = -1;
     if ((Image.ExtensionBlockCount == 0) || (Image.ExtensionBlocks == NULL)) {
         return -1;
     }
@@ -92,7 +92,7 @@
         if (Block.Function == GRAPHICS_EXT_FUNC_CODE){
             int gcntl_flag = Block.Bytes[0];
             if (gcntl_flag & 0x01) {
-                transparent_index = Block.Bytes[3];
+                transparent_index = Block.Bytes[3] & 0xff;
                 return transparent_index;
             }
         }



Swfed-svn メーリングリストの案内
Back to archive index