]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 16 May 2010 19:29:35 +0000 (19:29 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 16 May 2010 19:29:35 +0000 (19:29 +0000)
ChangeLog
coders/scr.c

index 2cbf7c412c5183808426b9c0b233807c44c5df08..ee2b629ae88bb4b039e08cf8d1178a068db5fe82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-15  6.6.1-10 Cristy  <quetzlzacatenango@image...>
+  * Use ScaleCharToQuantum() in coders/src.c (reference
+    http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16229).
+
 2010-05-14  6.6.1-9 Cristy  <quetzlzacatenango@image...>
   * Increase the estimated # points for the path drawing primitive.
   * Remove any prior resolution block from PSD before writing the new block.
index 4cdd53a8cc25ad3d82f1e6a2035a45739a2f3c66..37d9158668771c444fd9aed88372ad09edb233f0 100644 (file)
@@ -106,21 +106,21 @@ static Image *ReadSCRImage(const ImageInfo *image_info,ExceptionInfo *exception)
     int bright;
 
   unsigned char colour_palette[] = {
-    000,000,000,
-    000,000,192,
-    192,000,000,
-    192,000,192,
-    000,192,000,
-    000,192,192,
-    192,192,000,
+      0,  0,  0,
+      0,  0,192,
+    192,  0,  0,
+    192,  0,192,
+      0,192,  0,
+      0,192,192,
+    192,192,  0,
     192,192,192,
-    000,000,000,
-    000,000,255,
-    255,000,000,
-    255,000,255,
-    000,255,000,
-    000,255,255,
-    255,255,000,
+      0,  0,  0,
+      0,  0,255,
+    255,  0,  0,
+    255,  0,255,
+      0,255,  0,
+      0,255,255,
+    255,255,  0,
     255,255,255
   };
 
@@ -214,13 +214,13 @@ static Image *ReadSCRImage(const ImageInfo *image_info,ExceptionInfo *exception)
 
               if(binar[z])
             {
-                q->red=(Quantum) QuantumRange*(colour_palette[3*ink]);
-                q->green=(Quantum) QuantumRange*(colour_palette[1+(3*ink)]);
-                q->blue=(Quantum) QuantumRange*(colour_palette[2+(3*ink)]);
+                q->red=ScaleCharToQuantum(colour_palette[3*ink]);
+                q->green=ScaleCharToQuantum(colour_palette[1+(3*ink)]);
+                q->blue=ScaleCharToQuantum(colour_palette[2+(3*ink)]);
             } else {
-                q->red=(Quantum) QuantumRange*(colour_palette[3*paper]);
-                q->green=(Quantum) QuantumRange*(colour_palette[1+(3*paper)]);
-                q->blue=(Quantum) QuantumRange*(colour_palette[2+(3*paper)]);
+                q->red=ScaleCharToQuantum(colour_palette[3*paper]);
+                q->green=ScaleCharToQuantum(colour_palette[1+(3*paper)]);
+                q->blue=ScaleCharToQuantum(colour_palette[2+(3*paper)]);
             }
 
               pix++;