From 436571099cafd07a28e0a781e396392bbddbd522 Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 18 Oct 2009 14:55:29 +0000 Subject: [PATCH] --- ChangeLog | 3 +++ magick/resize.c | 16 ++++------------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 820d2f86f..52f5c120e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-10-18 6.5.7-1 Cristy + * Alpha blending is not required for ScaleImage(). + 2009-10-14 6.5.7-0 Pino Toscano * ImageMagick fails to build in GNU/HURD due to absence of PATH_MAX. diff --git a/magick/resize.c b/magick/resize.c index aa3ba60e9..df9d2458d 100644 --- a/magick/resize.c +++ b/magick/resize.c @@ -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++; } -- 2.40.0