From: cristy Date: Tue, 22 Jan 2013 23:05:21 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4379 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=614c65f5a78cb6dd39cccb3cf26beead74bc9dfb;p=imagemagick --- diff --git a/coders/plasma.c b/coders/plasma.c index 095e3b47b..958d3f65b 100644 --- a/coders/plasma.c +++ b/coders/plasma.c @@ -100,9 +100,6 @@ static inline size_t MagickMax(const size_t x,const size_t y) static inline void PlasmaPixel(Image *image,RandomInfo *random_info,double x, double y,ExceptionInfo *exception) { - QuantumAny - range; - register Quantum *q; @@ -110,13 +107,12 @@ static inline void PlasmaPixel(Image *image,RandomInfo *random_info,double x, exception); if (q == (Quantum *) NULL) return; - range=GetQuantumRange(16UL); - SetPixelRed(image,ScaleAnyToQuantum((size_t) (65535.0* - GetPseudoRandomValue(random_info)+0.5),range),q); - SetPixelGreen(image,ScaleAnyToQuantum((size_t) (65535.0* - GetPseudoRandomValue(random_info)+0.5),range),q); - SetPixelBlue(image,ScaleAnyToQuantum((size_t) (65535.0* - GetPseudoRandomValue(random_info)+0.5),range),q); + SetPixelRed(image,ScaleShortToQuantum((unsigned short) (65535.0* + GetPseudoRandomValue(random_info)+0.5)),q); + SetPixelGreen(image,ScaleShortToQuantum((unsigned short) (65535.0* + GetPseudoRandomValue(random_info)+0.5)),q); + SetPixelBlue(image,ScaleShortToQuantum((unsigned short) (65535.0* + GetPseudoRandomValue(random_info)+0.5)),q); (void) SyncAuthenticPixels(image,exception); }