<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><HTML> <HEAD><meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE>zoom - Methods to Resize an Image</TITLE> <link rel="StyleSheet" href="../magick.css" type="text/css"> </HEAD> <body bgcolor="#FFFFFF" text="#000000" link="#0085c0" alink="#0085c0" vlink="#800080"> <A NAME="__index__"></A> <!-- INDEX BEGIN --> <UL> <LI><A HREF="#name"> <FONT SIZE=-1>NAME</FONT></A> <LI><A HREF="#synopsis"> <FONT SIZE=-1>SYNOPSIS</FONT></A> <LI><A HREF="#function descriptions"> <FONT SIZE=-1>FUNCTION</FONT> <FONT SIZE=-1>DESCRIPTIONS</FONT></A> <UL> <LI><A HREF="#magnifyimage">MagnifyImage</A> <LI><A HREF="#minifyimage">MinifyImage</A> <LI><A HREF="#resizeimage">ResizeImage</A> <LI><A HREF="#sampleimage">SampleImage</A> <LI><A HREF="#scaleimage">ScaleImage</A> </UL> </UL> <!-- INDEX END --> <HR> <P> <H1><A NAME="name"> <FONT SIZE=-1>NAME</FONT></A></H1> <P>zoom - Methods to Resize an Image</P> <P> <HR> <H1><A NAME="synopsis"> <FONT SIZE=-1>SYNOPSIS</FONT></A></H1> <P>Image * <STRONG>MagnifyImage</STRONG>( const Image *image, ExceptionInfo *exception );</P> <P>Image * <STRONG>MinifyImage</STRONG>( const Image *image, ExceptionInfo *exception );</P> <P>Image * <STRONG>ResizeImage</STRONG>( Image *image, const unsigned long columns, const unsigned long rows, const FilterType filter, const double blur, ExceptionInfo *exception );</P> <P>Image * <STRONG>SampleImage</STRONG>( const Image *image, const unsigned long columns, const unsigned long rows, ExceptionInfo *exception );</P> <P>Image * <STRONG>ScaleImage</STRONG>( const Image *image, const unsigned long columns, const unsigned long rows, ExceptionInfo *exception );</P> <P> <HR> <H1><A NAME="function descriptions"> <FONT SIZE=-1>FUNCTION</FONT> <FONT SIZE=-1>DESCRIPTIONS</FONT></A></H1> <P> <H2><A NAME="magnifyimage">MagnifyImage</A></H2> <blockquote>MagnifyImage() is a convenience method that scales an image proportionally to twice its size. </blockquote><P>The format of the MagnifyImage method is:</P> <blockquote><A HREF="types/Image.html">Image</A> *MagnifyImage ( const <A HREF="types/Image.html">Image</A> *image, <A HREF="types/ExceptionInfo.html">ExceptionInfo</A> *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG><A NAME="item_o_image%3A">image:</A></STRONG><BR> <DD> The image. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_exception%3A">exception:</A></STRONG><BR> <DD> Return any errors or warnings in this structure. <P></P></DL></DL> <P> <H2><A NAME="minifyimage">MinifyImage</A></H2> <blockquote>MinifyImage() is a convenience method that scales an image proportionally to half its size. </blockquote><P>The format of the MinifyImage method is:</P> <blockquote><A HREF="types/Image.html">Image</A> *MinifyImage ( const <A HREF="types/Image.html">Image</A> *image, <A HREF="types/ExceptionInfo.html">ExceptionInfo</A> *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG>image:</STRONG><BR> <DD> The image. <P></P> <dd><p></p><dt><STRONG>exception:</STRONG><BR> <DD> Return any errors or warnings in this structure. <P></P></DL></DL> <P> <H2><A NAME="resizeimage">ResizeImage</A></H2> <blockquote>ResizeImage() scales an image to the desired dimensions with one of these filters: </blockquote><PRE> Bessel Blackman Box Catrom Cubic Gaussian Hanning Hermite Lanczos Mitchell Point Quandratic Sinc Triangle</PRE> <P>Most of the filters are <FONT SIZE=-1>FIR</FONT> (finite impulse response), however, Bessel, Gaussian, and Sinc are <FONT SIZE=-1>IIR</FONT> (infinite impulse response). Bessel and Sinc are windowed (brought down to zero) with the Blackman filter.</P> <blockquote>ResizeImage() was inspired by Paul Heckbert's zoom program. </blockquote><P>The format of the ResizeImage method is:</P> <blockquote><A HREF="types/Image.html">Image</A> *ResizeImage ( <A HREF="types/Image.html">Image</A> *image, const unsigned long columns, const unsigned long rows, const <A HREF="types/Enumerations.html#FilterType">FilterType</A> filter, const double blur, <A HREF="types/ExceptionInfo.html">ExceptionInfo</A> *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG>image:</STRONG><BR> <DD> The image. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_columns%3A">columns:</A></STRONG><BR> <DD> The number of columns in the scaled image. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_rows%3A">rows:</A></STRONG><BR> <DD> The number of rows in the scaled image. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_filter%3A">filter:</A></STRONG><BR> <DD> Image filter to use. <P></P> <dd><p></p><dt><STRONG><A NAME="item_o_blur%3A">blur:</A></STRONG><BR> <DD> The blur factor where > 1 is blurry, < 1 is sharp. <P></P> <dd><p></p><dt><STRONG>exception:</STRONG><BR> <DD> Return any errors or warnings in this structure. <P></P></DL></DL> <P> <H2><A NAME="sampleimage">SampleImage</A></H2> <blockquote>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. </blockquote><P>The format of the SampleImage method is:</P> <blockquote><A HREF="types/Image.html">Image</A> *SampleImage ( const <A HREF="types/Image.html">Image</A> *image, const unsigned long columns, const unsigned long rows, <A HREF="types/ExceptionInfo.html">ExceptionInfo</A> *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG>image:</STRONG><BR> <DD> The image. <P></P> <dd><p></p><dt><STRONG>columns:</STRONG><BR> <DD> The number of columns in the sampled image. <P></P> <dd><p></p><dt><STRONG>rows:</STRONG><BR> <DD> The number of rows in the sampled image. <P></P> <dd><p></p><dt><STRONG>exception:</STRONG><BR> <DD> Return any errors or warnings in this structure. <P></P></DL></DL> <P> <H2><A NAME="scaleimage">ScaleImage</A></H2> <blockquote>ScaleImage() changes the size of an image to the given dimensions. </blockquote><P>The format of the ScaleImage method is:</P> <blockquote><A HREF="types/Image.html">Image</A> *ScaleImage ( const <A HREF="types/Image.html">Image</A> *image, const unsigned long columns, const unsigned long rows, <A HREF="types/ExceptionInfo.html">ExceptionInfo</A> *exception ); </blockquote><P> <FONT SIZE=-1>A</FONT> description of each parameter follows:</P> <DL><DT><DD><DL> <dd><p></p><dt><STRONG>image:</STRONG><BR> <DD> The image. <P></P> <dd><p></p><dt><STRONG>columns:</STRONG><BR> <DD> The number of columns in the scaled image. <P></P> <dd><p></p><dt><STRONG>rows:</STRONG><BR> <DD> The number of rows in the scaled image. <P></P> <dd><p></p><dt><STRONG>exception:</STRONG><BR> <DD> Return any errors or warnings in this structure. </DL></DL> </BODY> </HTML>