From: cristy Date: Sun, 16 May 2010 19:29:35 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~9449 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=472afc76f69e14601c0457351731b92a6156aca5;p=imagemagick --- diff --git a/ChangeLog b/ChangeLog index 2cbf7c412..ee2b629ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-05-15 6.6.1-10 Cristy + * 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 * Increase the estimated # points for the path drawing primitive. * Remove any prior resolution block from PSD before writing the new block. diff --git a/coders/scr.c b/coders/scr.c index 4cdd53a8c..37d915866 100644 --- a/coders/scr.c +++ b/coders/scr.c @@ -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++;