]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 22 Apr 2011 23:12:22 +0000 (23:12 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 22 Apr 2011 23:12:22 +0000 (23:12 +0000)
magick/xwindow.c

index 8bcd9ac68623d71a9bbb71963e9e4861de71fa78..3f22290eebc73fe42732dd05fa2f670ad1d4ba81 100644 (file)
   (color) : ((pow(((double) QuantumScale*(color)),1.0/(double) blue_gamma)* \
   QuantumRange)))
 #define XGammaPixel(map,color)  (size_t) (map->base_pixel+ \
-  ((ScaleQuantumToShort(XRedGamma((color)->red))*maGetRedPixelComponent(p)_max/65535L)* \
-    maGetRedPixelComponent(p)_mult)+ \
-  ((ScaleQuantumToShort(XGreenGamma((color)->green))*maGetGreenPixelComponent(p)_max/65535L)* \
-    maGetGreenPixelComponent(p)_mult)+ \
-  ((ScaleQuantumToShort(XBlueGamma((color)->blue))*maGetBluePixelComponent(p)_max/65535L)* \
-    maGetBluePixelComponent(p)_mult))
+  ((ScaleQuantumToShort(XRedGamma((color)->red))*map->red_max/65535L)* \
+    map->red_mult)+ \
+  ((ScaleQuantumToShort(XGreenGamma((color)->green))*map->green_max/65535L)* \
+    map->green_mult)+ \
+  ((ScaleQuantumToShort(XBlueGamma((color)->blue))*map->blue_max/65535L)* \
+    map->blue_mult))
 #define XGreenGamma(color) ClampToQuantum(green_gamma == 1.0 ? (double) \
   (color) : ((pow(((double) QuantumScale*(color)),1.0/(double) green_gamma)* \
   QuantumRange)))
   (color) : ((pow(((double) QuantumScale*(color)),1.0/(double) red_gamma)* \
   QuantumRange)))
 #define XStandardPixel(map,color)  (size_t) (map->base_pixel+ \
-  (((color)->red*maGetRedPixelComponent(p)_max/65535L)*maGetRedPixelComponent(p)_mult)+ \
-  (((color)->green*maGetGreenPixelComponent(p)_max/65535L)*maGetGreenPixelComponent(p)_mult)+ \
-  (((color)->blue*maGetBluePixelComponent(p)_max/65535L)*maGetBluePixelComponent(p)_mult))
+  (((color)->red*map->red_max/65535L)*map->red_mult)+ \
+  (((color)->green*map->green_max/65535L)*map->green_mult)+ \
+  (((color)->blue*map->blue_max/65535L)*map->blue_mult))
 
 #define AccentuateModulate  ScaleCharToQuantum(80)
 #define HighlightModulate  ScaleCharToQuantum(125)
@@ -3200,8 +3200,7 @@ MagickExport void XGetPixelPacket(Display *display,
             Initialize pixel array for images of type PseudoClass.
           */
           for (i=0; i < (ssize_t) image->colors; i++)
-            pixel->pixels[i]=
-              XGammaPixel(map_info,image->colormap+i);
+            pixel->pixels[i]=XGammaPixel(map_info,image->colormap+i);
           for (i=0; i < MaxNumberPens; i++)
             pixel->pixels[image->colors+i]=pixel->pen_colors[i].pixel;
           pixel->colors+=MaxNumberPens;