LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ImageMagick-6.2.8-imageextent.patch of Package ImageMagick (Project home:netmax:distribution:CentOS_5)

--- ImageMagick-6.2.8.orig/magick/image.c	2006-05-19 05:59:38.000000000 +1000
+++ ImageMagick-6.2.8/magick/image.c	2008-02-07 13:14:57.000000000 +1000
@@ -2606,10 +2606,16 @@ MagickExport MagickBooleanType SetImageC
 MagickExport MagickBooleanType SetImageExtent(Image *image,
   const unsigned long columns,const unsigned long rows)
 {
-  image->columns=columns;
-  image->rows=rows;
-  (void) ParseAbsoluteGeometry("0x0+0+0",&image->page);
-  return(SyncImageCache(image));
+  PixelPacket
+    *p;
+
+  if ((columns != 0) || (rows != 0))
+    {
+      image->columns=columns;
+      image->rows=rows;
+    }
+  p=SetImagePixels(image,0,0,image->columns,1);
+  return(p != (PixelPacket *) NULL ? MagickTrue : MagickFalse);
 }
 
 /*