]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 7 Sep 2010 00:43:58 +0000 (00:43 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 7 Sep 2010 00:43:58 +0000 (00:43 +0000)
magick/deprecate.c
magick/deprecate.h
magick/resize.c
magick/resize.h

index 1f5cfd5bbeddeee7cb5cad4b4827ff01cd3c4053..2bf9cce9fbad39dd504f61cda348d1f874d07531 100644 (file)
@@ -6882,4 +6882,60 @@ MagickExport IndexPacket ValidateColormapIndex(Image *image,
     (void) LogMagickEvent(DeprecateEvent,GetMagickModule(),"last use: v5.4.4");
   return(ConstrainColormapIndex(image,index));
 }
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%   Z o o m I m a g e                                                         %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  ZoomImage() creates a new image that is a scaled size of an existing one.
+%  It allocates the memory necessary for the new Image structure and returns a
+%  pointer to the new image.  The Point filter gives fast pixel replication,
+%  Triangle is equivalent to bi-linear interpolation, and Mitchel giver slower,
+%  very high-quality results.  See Graphic Gems III for details on this
+%  algorithm.
+%
+%  The filter member of the Image structure specifies which image filter to
+%  use. Blur specifies the blur factor where > 1 is blurry, < 1 is sharp.
+%
+%  The format of the ZoomImage method is:
+%
+%      Image *ZoomImage(const Image *image,const size_t columns,
+%        const size_t rows,ExceptionInfo *exception)
+%
+%  A description of each parameter follows:
+%
+%    o image: the image.
+%
+%    o columns: An integer that specifies the number of columns in the zoom
+%      image.
+%
+%    o rows: An integer that specifies the number of rows in the scaled
+%      image.
+%
+%    o exception: return any errors or warnings in this structure.
+%
+*/
+MagickExport Image *ZoomImage(const Image *image,const size_t columns,
+  const size_t rows,ExceptionInfo *exception)
+{
+  Image
+    *zoom_image;
+
+  assert(image != (const Image *) NULL);
+  assert(image->signature == MagickSignature);
+  if (image->debug != MagickFalse)
+    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
+  assert(exception != (ExceptionInfo *) NULL);
+  assert(exception->signature == MagickSignature);
+  zoom_image=ResizeImage(image,columns,rows,image->filter,image->blur,
+    exception);
+  return(zoom_image);
+}
 #endif
index de817bae2733ac7b4aec9387025f3be88c4d0432..f5a646432aa827b8d4758e1560abfcec9234aad4 100644 (file)
@@ -134,7 +134,9 @@ extern MagickExport Image
     magick_attribute((deprecated)),
   *ShiftImageList(Image **) magick_attribute((deprecated)),
   *SpliceImageList(Image *,const ssize_t,const size_t,const Image *,
-    ExceptionInfo *) magick_attribute((deprecated));
+    ExceptionInfo *) magick_attribute((deprecated)),
+  *ZoomImage(const Image *,const size_t,const size_t,ExceptionInfo *)
+    magick_attribute((deprecated));
 
 extern MagickExport IndexPacket
   *GetCacheViewIndexes(CacheView *) magick_attribute((deprecated)),
index 61afc196d1ec0abad432e2256bba3ab0e8b781cd..d626b83cec9768cae887741c3419c5f057d4eea8 100644 (file)
@@ -1538,7 +1538,7 @@ MagickExport Image *LiquidRescaleImage(const Image *image,const size_t columns,
   if ((columns == image->columns) && (rows == image->rows))
     return(CloneImage(image,0,0,MagickTrue,exception));
   if ((columns <= 2) || (rows <= 2))
-    return(ZoomImage(image,columns,rows,exception));
+    return(ResizeImage(image,columns,rows,image->filter,image->blur,exception));
   if ((columns >= (2*image->columns)) || (rows >= (2*image->rows)))
     {
       Image
@@ -3015,10 +3015,12 @@ MagickExport Image *ThumbnailImage(const Image *image,const size_t columns,
   x_factor=(MagickRealType) columns/(MagickRealType) image->columns;
   y_factor=(MagickRealType) rows/(MagickRealType) image->rows;
   if ((x_factor*y_factor) > 0.1)
-    thumbnail_image=ZoomImage(image,columns,rows,exception);
+    thumbnail_image=ResizeImage(image,columns,rows,image->filter,image->blur,
+      exception);
   else
     if (((SampleFactor*columns) < 128) || ((SampleFactor*rows) < 128))
-      thumbnail_image=ZoomImage(image,columns,rows,exception);
+      thumbnail_image=ResizeImage(image,columns,rows,image->filter,
+        image->blur,exception);
     else
       {
         Image
@@ -3028,7 +3030,8 @@ MagickExport Image *ThumbnailImage(const Image *image,const size_t columns,
           exception);
         if (sample_image == (Image *) NULL)
           return((Image *) NULL);
-        thumbnail_image=ZoomImage(sample_image,columns,rows,exception);
+        thumbnail_image=ResizeImage(sample_image,columns,rows,image->filter,
+          image->blur,exception);
         sample_image=DestroyImage(sample_image);
       }
   if (thumbnail_image == (Image *) NULL)
@@ -3085,59 +3088,3 @@ MagickExport Image *ThumbnailImage(const Image *image,const size_t columns,
   (void) SetImageProperty(thumbnail_image,"Thumb::Document::Pages",value);
   return(thumbnail_image);
 }
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%   Z o o m I m a g e                                                         %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  ZoomImage() creates a new image that is a scaled size of an existing one.
-%  It allocates the memory necessary for the new Image structure and returns a
-%  pointer to the new image.  The Point filter gives fast pixel replication,
-%  Triangle is equivalent to bi-linear interpolation, and Mitchel giver slower,
-%  very high-quality results.  See Graphic Gems III for details on this
-%  algorithm.
-%
-%  The filter member of the Image structure specifies which image filter to
-%  use. Blur specifies the blur factor where > 1 is blurry, < 1 is sharp.
-%
-%  The format of the ZoomImage method is:
-%
-%      Image *ZoomImage(const Image *image,const size_t columns,
-%        const size_t rows,ExceptionInfo *exception)
-%
-%  A description of each parameter follows:
-%
-%    o image: the image.
-%
-%    o columns: An integer that specifies the number of columns in the zoom
-%      image.
-%
-%    o rows: An integer that specifies the number of rows in the scaled
-%      image.
-%
-%    o exception: return any errors or warnings in this structure.
-%
-*/
-MagickExport Image *ZoomImage(const Image *image,const size_t columns,
-  const size_t rows,ExceptionInfo *exception)
-{
-  Image
-    *zoom_image;
-
-  assert(image != (const Image *) NULL);
-  assert(image->signature == MagickSignature);
-  if (image->debug != MagickFalse)
-    (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
-  assert(exception != (ExceptionInfo *) NULL);
-  assert(exception->signature == MagickSignature);
-  zoom_image=ResizeImage(image,columns,rows,image->filter,image->blur,
-    exception);
-  return(zoom_image);
-}
index 8e1bc25ae7a93b276ec5ff6eda857774f60f10d3..03a4eadb2f8d3f85df68885759d008186d793d55 100644 (file)
@@ -34,8 +34,7 @@ extern MagickExport Image
     const double,ExceptionInfo *),
   *SampleImage(const Image *,const size_t,const size_t,ExceptionInfo *),
   *ScaleImage(const Image *,const size_t,const size_t,ExceptionInfo *),
-  *ThumbnailImage(const Image *,const size_t,const size_t,ExceptionInfo *),
-  *ZoomImage(const Image *,const size_t,const size_t,ExceptionInfo *);
+  *ThumbnailImage(const Image *,const size_t,const size_t,ExceptionInfo *);
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }