coders/scr.c

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ub880d

coders/scr.c

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: coders/scr.c

Post by magick »

We applied your patch to ImageMagick 6.6.1-10 Beta. Thanks.
Post Reply