]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 18 Oct 2009 14:55:29 +0000 (14:55 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 18 Oct 2009 14:55:29 +0000 (14:55 +0000)
ChangeLog
magick/resize.c

index 820d2f86fd685a22189596b5e83f924be0bbd12d..52f5c120e0ad4a69843384d3472fbfb34963ab02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2009-10-18  6.5.7-1 Cristy  <quetzlzacatenango@image...>
+  * Alpha blending is not required for ScaleImage().
+
 2009-10-14  6.5.7-0 Pino Toscano  <pino@kde...>
   * ImageMagick fails to build in GNU/HURD due to absence of PATH_MAX.
 
index aa3ba60e94817e82c563424995fec8365a9003c8..df9d2458d6b9818d424100edda693a333e3aa11c 100644 (file)
@@ -2457,10 +2457,6 @@ MagickExport Image *ScaleImage(const Image *image,const unsigned long columns,
     *y_vector,
     zero;
 
-  MagickRealType
-    alpha,
-    gamma;
-
   PointInfo
     scale,
     span;
@@ -2767,17 +2763,13 @@ MagickExport Image *ScaleImage(const Image *image,const unsigned long columns,
       t=scale_scanline;
       for (x=0; x < (long) scale_image->columns; x++)
       {
-        alpha=1.0;
-        if (image->matte != MagickFalse)
-          alpha=(MagickRealType) (QuantumScale*(QuantumRange-t->opacity));
-        gamma=1.0/(fabs((double) alpha) <= MagickEpsilon ? 1.0 : alpha);
-        q->red=RoundToQuantum(gamma*t->red);
-        q->green=RoundToQuantum(gamma*t->green);
-        q->blue=RoundToQuantum(gamma*t->blue);
+        q->red=RoundToQuantum(t->red);
+        q->green=RoundToQuantum(t->green);
+        q->blue=RoundToQuantum(t->blue);
         if (scale_image->matte != MagickFalse)
           q->opacity=RoundToQuantum(t->opacity);
         if (scale_indexes != (IndexPacket *) NULL)
-          scale_indexes[x]=(IndexPacket) RoundToQuantum(gamma*t->index);
+          scale_indexes[x]=(IndexPacket) RoundToQuantum(t->index);
         t++;
         q++;
       }