ImageMagick: MagickCore, C API for ImageMagick: Resize an Image
Author: ImageMagick Studio LLC
Description: ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (P [cell cut: 1167 characters, first 1000 kept]
Keywords: magickcore, c, api, for, imagemagick:, resize, an, image, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject

## AdaptiveResizeImage AdaptiveResizeImage() adaptively resize image with pixel resampling. The format of the AdaptiveResizeImage method is:
      Image *AdaptiveResizeImage(const Image *image,
        const unsigned long columns,const unsigned long rows,
        ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### columns the number of columns in the resized image. ##### rows the number of rows in the resized image. ##### exception return any errors or warnings in this structure. ## MagnifyImage MagnifyImage() is a convenience method that scales an image proportionally to twice its size. The format of the MagnifyImage method is:
      Image *MagnifyImage(const Image *image,ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### exception return any errors or warnings in this structure. ## MinifyImage MinifyImage() is a convenience method that scales an image proportionally to half its size. The format of the MinifyImage method is:
      Image *MinifyImage(const Image *image,ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### exception return any errors or warnings in this structure. ## ResampleImage ResampleImage() resize image in terms of its pixel size, so that when displayed at the given resolution it will be the same size in terms of real world units as the original image at the original resolution. The format of the ResampleImage method is:
      Image *ResampleImage(Image *image,const double x_resolution,
        const double y_resolution,const FilterTypes filter,const double blur,
        ExceptionInfo *exception)
A description of each parameter follows: ##### image the image to be resized to fit the given resolution. ##### x_resolution the new image x resolution. ##### y_resolution the new image y resolution. ##### filter Image filter to use. ##### blur the blur factor where > 1 is blurry, < 1 is sharp. ## LiquidRescaleImage LiquidRescaleImage() rescales image with seam carving. The format of the LiquidRescaleImage method is:
      Image *LiquidRescaleImage(const Image *image,
        const unsigned long columns,const unsigned long rows,
        const double delta_x,const double rigidity,ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### columns the number of columns in the rescaled image. ##### rows the number of rows in the rescaled image. ##### delta_x maximum seam transversal step (0 means straight seams). ##### rigidity introduce a bias for non-straight seams (typically 0). ##### exception return any errors or warnings in this structure. ## ResizeImage ResizeImage() scales an image to the desired dimensions, using the given filter (see AcquireFilterInfo() ). If an undefined filter is given the filter defaults to Mitchell for a colormapped image, a image with a matte channel, or if the image is enlarged. Otherwise the filter defaults to a Lanczos. ResizeImage() was inspired by Paul Heckbert's "zoom" program. The format of the ResizeImage method is:
      Image *ResizeImage(Image *image,const unsigned long columns,
        const unsigned long rows,const FilterTypes filter,const double blur,
        ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### columns the number of columns in the scaled image. ##### rows the number of rows in the scaled image. ##### filter Image filter to use. ##### blur the blur factor where > 1 is blurry, < 1 is sharp. Typically set this to 1.0. ##### exception return any errors or warnings in this structure. ## SampleImage SampleImage() scales an image to the desired dimensions with pixel sampling. Unlike other scaling methods, this method does not introduce any additional color into the scaled image. The format of the SampleImage method is:
      Image *SampleImage(const Image *image,const unsigned long columns,
        const unsigned long rows,ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### columns the number of columns in the sampled image. ##### rows the number of rows in the sampled image. ##### exception return any errors or warnings in this structure. ## ScaleImage ScaleImage() changes the size of an image to the given dimensions. The format of the ScaleImage method is:
      Image *ScaleImage(const Image *image,const unsigned long columns,
        const unsigned long rows,ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### columns the number of columns in the scaled image. ##### rows the number of rows in the scaled image. ##### exception return any errors or warnings in this structure. ## ThumbnailImage ThumbnailImage() changes the size of an image to the given dimensions and removes any associated profiles. The goal is to produce small low cost thumbnail images suited for display on the Web. The format of the ThumbnailImage method is:
      Image *ThumbnailImage(const Image *image,const unsigned long columns,
        const unsigned long rows,ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### columns the number of columns in the scaled image. ##### rows the number of rows in the scaled image. ##### exception return any errors or warnings in this structure. ## ZoomImage 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 unsigned long columns,
        const unsigned long rows,ExceptionInfo *exception)
A description of each parameter follows: ##### image the image. ##### columns An integer that specifies the number of columns in the zoom image. ##### rows An integer that specifies the number of rows in the scaled image. ##### exception return any errors or warnings in this structure. |

Discourse Server • Mailing Lists • Cafe • Studio