Page 1 of 1

coders/scr.c

Posted: 2010-05-16T12:02:00-07:00
by ub880d
Hi,

I'm new here, so I don't know if I'm at right address, but I want to post small patch for coders/scr.c:

Code: Select all

diff -ur ImageMagick-6.6.1-9/coders/scr.c ImageMagick-6.6.1-9_patch/coders/scr.c
--- ImageMagick-6.6.1-9/coders/scr.c    2009-12-11 22:38:29.000000000 +0100
+++ ImageMagick-6.6.1-9_patch/coders/scr.c      2010-05-16 16:06:17.000000000 +0200
@@ -214,13 +214,13 @@

               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++;
ub

Re: coders/scr.c

Posted: 2010-05-16T12:30:06-07:00
by magick
We applied your patch to ImageMagick 6.6.1-10 Beta. Thanks.