(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 28 Jun 2013 14:05:12 +0000 (14:05 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 28 Jun 2013 14:05:12 +0000 (14:05 +0000)
MagickCore/fx.c
coders/tga.c

index 8a85db5cdb36c1b6d8abbbfc3e76d5664158a04e..4549bb6c5099303a5020cab71de92b1351ce887e 100644 (file)
@@ -1422,8 +1422,8 @@ static double FxGetSymbol(FxInfo *fx_info,const PixelChannel channel,
   (void) InterpolatePixelInfo(image,fx_info->view[i],image->interpolate,
     point.x,point.y,&pixel,exception);
   if ((strlen(p) > 2) && (LocaleCompare(p,"intensity") != 0) &&
-      (LocaleCompare(p,"luminance") != 0) && (LocaleCompare(p,"hue") != 0) &&
-      (LocaleCompare(p,"saturation") != 0) &&
+      (LocaleCompare(p,"luma") != 0) && (LocaleCompare(p,"luminance") != 0) &&
+      (LocaleCompare(p,"hue") != 0) && (LocaleCompare(p,"saturation") != 0) &&
       (LocaleCompare(p,"lightness") != 0))
     {
       char
index b17962b3a83b1eb4ea95169d8f46a16a8f7ef7b0..b7f1cd668b97fd786f962edb6675d7e4af33842a 100644 (file)
@@ -227,8 +227,8 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
   image->columns=tga_info.width;
   image->rows=tga_info.height;
   alpha_bits=(tga_info.attributes & 0x0FU);
-  image->alpha_trait=(alpha_bits > 0) || (tga_info.bits_per_pixel == 32) ?
-    BlendPixelTrait : UndefinedPixelTrait;
+  image->alpha_trait=(alpha_bits > 0) || (tga_info.bits_per_pixel == 32) ||
+    (tga_info.colormap_size == 32) ?  BlendPixelTrait : UndefinedPixelTrait;
   if ((tga_info.image_type != TGAColormap) &&
       (tga_info.image_type != TGARLEColormap))
     image->depth=(size_t) ((tga_info.bits_per_pixel <= 8) ? 8 :
@@ -332,7 +332,6 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
             break;
           }
           case 24:
-          case 32:
           {
             /*
               8 bits each of blue, green and red.
@@ -345,6 +344,21 @@ static Image *ReadTGAImage(const ImageInfo *image_info,ExceptionInfo *exception)
               ReadBlobByte(image));
             break;
           }
+          case 32:
+          {
+            /*
+              8 bits each of blue, green, red, and alpha.
+            */
+            pixel.blue=(MagickRealType) ScaleCharToQuantum((unsigned char)
+              ReadBlobByte(image));
+            pixel.green=(MagickRealType) ScaleCharToQuantum((unsigned char)
+              ReadBlobByte(image));
+            pixel.red=(MagickRealType) ScaleCharToQuantum((unsigned char)
+              ReadBlobByte(image));
+            pixel.alpha=(MagickRealType) ScaleCharToQuantum((unsigned char)
+              ReadBlobByte(image));
+            break;
+          }
         }
         image->colormap[i]=pixel;
       }