ResizeImage() fix

Wolfgang Spraul <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.core
Organization Q AG
Message-ID <[email protected]>
I believe that the if(support < filters[i].support) in ResizeImage() is 
unnecessary (see patch below). That's because the following line already says 
"2.0*Max(support,0.5)+3)", which is the maximum that will actually ever be 
accessed in HorizontalFilter() or VerticalFilter().
Wolfgang

Index: magick/resize.c
===================================================================
RCS file: /GraphicsMagick/GraphicsMagick/magick/resize.c,v
retrieving revision 1.62
diff -u -r1.62 resize.c
--- magick/resize.c	3 Feb 2004 04:56:28 -0000	1.62
+++ magick/resize.c	8 Feb 2004 21:59:07 -0000
@@ -1145,8 +1145,6 @@
   x_support=blur*Max(1.0/x_factor,1.0)*filters[i].support;
   y_support=blur*Max(1.0/y_factor,1.0)*filters[i].support;
   support=Max(x_support,y_support);
-  if (support < filters[i].support)
-    support=filters[i].support;
   contribution=MagickAllocateMemory(ContributionInfo *,
     (size_t) (2.0*Max(support,0.5)+3)*sizeof(ContributionInfo));
   if (contribution == (ContributionInfo *) NULL)


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.