blob: 1475c77f6390e1f9e8893de3562b3942d4a44f05 [file] [log] [blame]
cristy06f63f22012-10-31 00:50:07 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3<html version="-//W3C//DTD XHTML 1.1//EN"
4 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xsi:schemaLocation="http://www.w3.org/1999/xhtml
7 http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
8<head>
9 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
10 <meta name="google-site-verification" content="MxsMq6bdLOx0KSuz1MY6yG9ZTIJ7_7DVRfl5NCAT5Yg"/>
cristyffb69ed2010-12-25 00:06:48 +000011 <title>ImageMagick: MagickCore, C API for ImageMagick: Resize an Image</title>
cristy751980d2012-06-03 23:18:35 +000012 <meta http-equiv="content-language" content="en-US"/>
13 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
14 <meta http-equiv="reply-to" content="magick-users@imagemagick.org"/>
15 <meta name="application-name" content="ImageMagick"/>
16 <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images automagically."/>
17 <meta name="application-url" content="http://www.imagemagick.org"/>
18 <meta name="generator" content="PHP"/>
cristy72da67d2013-02-24 21:40:48 +000019 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, resize, an, image, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Image, Processing, Automagically"/>
cristy751980d2012-06-03 23:18:35 +000020 <meta name="rating" content="GENERAL"/>
21 <meta name="robots" content="INDEX, FOLLOW"/>
22 <meta name="generator" content="ImageMagick Studio LLC"/>
23 <meta name="author" content="ImageMagick Studio LLC"/>
24 <meta name="revisit-after" content="2 DAYS"/>
25 <meta name="resource-type" content="document"/>
cristy72da67d2013-02-24 21:40:48 +000026 <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"/>
cristy751980d2012-06-03 23:18:35 +000027 <meta name="distribution" content="Global"/>
cristy72da67d2013-02-24 21:40:48 +000028 <link rel="icon" href="../../images/wand.png"/>
29 <link rel="shortcut icon" href="../../images/wand.ico" type="images/x-icon"/>
cristy06f63f22012-10-31 00:50:07 +000030 <link rel="canonical" href="http://www.imagemagick.org" />
31 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
cristy06f63f22012-10-31 00:50:07 +000032 <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
cristy72da67d2013-02-24 21:40:48 +000033 <link rel="stylesheet" type="text/css" href="http://www.imagemagick.org/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
cristy06f63f22012-10-31 00:50:07 +000034 <style type="text/css" media="all">
cristyd8833bf2013-02-24 22:14:53 +000035 @import url("../../style/magick.html");
cristy06f63f22012-10-31 00:50:07 +000036 </style>
cristy72da67d2013-02-24 21:40:48 +000037 <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
38 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
39 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
40 <script type="text/javascript">
41 $(document).ready(function() {
42 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
43 'transitionIn' : 'elastic',
44 'transitionOut' : 'elastic',
45 'overlayShow' : false,
46 'opacity' : true
47 });
48 });
49 </script>
cristy06f63f22012-10-31 00:50:07 +000050</head>
51
52<body id="www-imagemagick-org">
53<div class="titlebar">
54<div style="margin: 17px auto; float: left;">
55 <script type="text/javascript">
56 <!--
57 google_ad_client = "pub-3129977114552745";
58 google_ad_slot = "5439289906";
59 google_ad_width = 728;
60 google_ad_height = 90;
61 //-->
62 </script>
63 <script type="text/javascript"
64 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
65 </script>
66</div>
cristy72da67d2013-02-24 21:40:48 +000067<a href="../../discourse-server">
68 <img src="../../images/logo.jpg"
cristy06f63f22012-10-31 00:50:07 +000069 alt="ImageMagick Logo"
70 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
cristyd8833bf2013-02-24 22:14:53 +000071<a href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">
cristy72da67d2013-02-24 21:40:48 +000072 <img src="../../images/sprite.jpg"
cristy06f63f22012-10-31 00:50:07 +000073 alt="ImageMagick Sprite"
74 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
75</div>
76
77<div class="westbar">
78
cristy3ed852e2009-09-05 21:47:34 +000079<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +000080 <a title="About ImageMagick" href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000081</div>
cristy3ed852e2009-09-05 21:47:34 +000082<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +000083 <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
cristybb503372010-05-27 20:51:26 +000084</div>
85<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +000086 <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
cristybb503372010-05-27 20:51:26 +000087</div>
88<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +000089 <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
cristybb503372010-05-27 20:51:26 +000090</div>
91<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +000092 <a title="Binary Release: iOS" href="../../www/binary-releases.html#iOS">iOS</a>
cristyda16f162011-02-19 23:52:17 +000093</div>
94<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +000095 <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
cristybb503372010-05-27 20:51:26 +000096</div>
cristy06f63f22012-10-31 00:50:07 +000097<div class="sep"></div>
cristybb503372010-05-27 20:51:26 +000098<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +000099 <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +0000100</div>
101<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000102 <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +0000103</div>
104<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000105 <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +0000106</div>
107<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000108 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +0000109</div>
110<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000111 <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +0000112</div>
113<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000114 <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +0000115</div>
116<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000117 <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +0000118</div>
119<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000120 <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000121</div>
122<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000123 <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +0000124</div>
cristy06f63f22012-10-31 00:50:07 +0000125<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000126<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000127 <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +0000128</div>
129<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000130 <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +0000131</div>
132<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000133 <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000134 </div>
135<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000136 <a title="Resources" href="../../www/resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000137</div>
cristybb503372010-05-27 20:51:26 +0000138<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000139 <a title="Architecture" href="../../www/architecture.html">Architecture</a>
cristybb503372010-05-27 20:51:26 +0000140</div>
cristy3ed852e2009-09-05 21:47:34 +0000141<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000142 <a title="Download" href="../../www/download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000143</div>
cristy06f63f22012-10-31 00:50:07 +0000144<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000145<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000146 <a title="Search" href="../../www/search.html">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000147</div>
cristy06f63f22012-10-31 00:50:07 +0000148<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000149<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000150 <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000151</div>
152<div class="sub">
cristyd8833bf2013-02-24 22:14:53 +0000153 <a title="Site Map: Links" href="../../www/links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000154</div>
cristy06f63f22012-10-31 00:50:07 +0000155<div class="sep"></div>
cristy72da67d2013-02-24 21:40:48 +0000156<div class="menu">
cristyd8833bf2013-02-24 22:14:53 +0000157 <a rel="follow" title="Sponsors" href="../../www/sponsors.html">Sponsors:</a>
cristy3ed852e2009-09-05 21:47:34 +0000158
cristy72da67d2013-02-24 21:40:48 +0000159<a href="http://www.networkredux.com">
160 <img src="../../images/networkredux.png" width="140" height="31" alt="[sponsor]"
161 style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a>
cristy3ed852e2009-09-05 21:47:34 +0000162<div class="sponsbox">
cristy72da67d2013-02-24 21:40:48 +0000163<div class="sponsor">
cristyeed6cb62012-01-28 19:38:34 +0000164 <a rel="follow" title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 2012070100250 ... -->
165</div>
cristy72da67d2013-02-24 21:40:48 +0000166<div class="sponsor">
167 <a rel="follow" title="Sponsor: Stock Photography" href="http://www.fotosearch.com/">Stock Photography</a><!-- 2012040100250 ... -->
168</div>
169<div class="sponsor">
170 <a rel="follow" title="Sponsor: Best Local Services" href="http://www.openchime.com">Best Local Services</a><!-- 2012010100150 joey@openc... -->
171</div>
172<div class="sponsor">
cristyeed6cb62012-01-28 19:38:34 +0000173 <a rel="follow" title="Sponsor: Managed Server" href="http://www.robhost.de">Managed Server</a><!-- 201210010720 klikics... -->
174</div>
cristy72da67d2013-02-24 21:40:48 +0000175<div class="sponsor">
176 <a rel="follow" title="Sponsor: VPS" href="http://www.interdominios.com/vps">VPS</a><!-- 201201010090 barsh@inter... -->
177</div>
178<div class="sponsor">
179 <a rel="follow" title="Sponsor: Autoteile" href="http://www.q11-shop.de">Autoteile</a><!-- 201205010540 suvalj -->
180</div>
181<div class="sponsor">
182 <a rel="follow" title="Sponsor: Web Hosting" href="http://www.micfo.com">Web Hosting</a><!-- 209901010090s golestan -->
183</div>
184<div class="sponsor">
185 <a rel="follow" title="Sponsor: Web Hosting Deals" href="http://www.webhostingdeals.org">Web Hosting Deals</a><!-- 201111010270 chee.hoa darin -->
186</div>
187<div class="sponsor">
188 <a rel="follow" title="Sponsor: Autos part" href="http://www.pkwteile.de/autoteile">Autos part</a><!-- 201112010090s jr@pkwte... -->
189</div>
190<div class="sponsor">
191 <a rel="follow" title="Sponsor: Web Hosting Reviews" href="http://www.webhostingsecretrevealed.com">Web Hosting Secret Revealed</a><!-- 201204010540 iamchee jerry -->
192</div>
193<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000194 <a rel="follow" title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
cristy4c54bbb2011-03-17 13:53:13 +0000195</div>
cristy751980d2012-06-03 23:18:35 +0000196<div class="sponsor">
cristy72da67d2013-02-24 21:40:48 +0000197 <a rel="follow" title="Sponsor: Hotel München" href="http://www.messehotel-erb-muenchen.de">Hotel München</a><!-- 201111010450 cerb -->
cristy4bf6e232011-05-21 01:43:33 +0000198</div>
cristy72da67d2013-02-24 21:40:48 +0000199<div class="sponsor">
200 <a rel="follow" title="Sponsor: Web Hosting Reviews" href="http://www.webhostingreviewz.com">Web Hosting Reviews</a><!-- 2012040100030 Soft Tec-->
201</div>
202<div class="sponsor">
203 <a rel="follow" title="Sponsor: Got Stripes?" href="http://www.stripeslawncare.org">Got Stripes?</a><!-- 2012010100150 brooks@stripes...-->
cristyec6b4752011-01-08 03:16:23 +0000204</div>
cristy3ed852e2009-09-05 21:47:34 +0000205</div>
206</div>
cristy06f63f22012-10-31 00:50:07 +0000207</div>
208
209<div class="eastbar">
210 <div class="g-plusone" id="gplusone"></div>
211 <script type="text/javascript">
212 window.___gcfg = {
213 lang: 'en-US'
214 };
215
216 (function() {
cristy18b955e2013-02-24 21:06:33 +0000217 var po = document.createElement('offline-script');
cristy06f63f22012-10-31 00:50:07 +0000218 po.type = 'text/javascript'; po.async = true;
219 po.src = 'https://apis.google.com/js/plusone.js';
cristy18b955e2013-02-24 21:06:33 +0000220 var script = document.getElementsByTagName('offline-script')[0];
cristy06f63f22012-10-31 00:50:07 +0000221 script.parentNode.insertBefore(po, script);
222 })();
223 var gplusone = document.getElementById("gplusone");
224 gplusone.setAttribute("data-size","medium");
225 gplusone.setAttribute("data-count","false");
226 </script>
227</div>
228
229<div class="main">
230
cristy20398432011-08-11 01:31:50 +0000231<h1>Module resize Methods</h1>
cristyd8833bf2013-02-24 22:14:53 +0000232<p class="navigation-index">[<a href="resize.html#AdaptiveResizeImage">AdaptiveResizeImage</a> &bull; <a href="resize.html#InterpolativeResizeImage">InterpolativeResizeImage</a> &bull; <a href="resize.html#LiquidRescaleImage">LiquidRescaleImage</a> &bull; <a href="resize.html#MagnifyImage">MagnifyImage</a> &bull; <a href="resize.html#MinifyImage">MinifyImage</a> &bull; <a href="resize.html#ResampleImage">ResampleImage</a> &bull; <a href="resize.html#ResizeImage">ResizeImage</a> &bull; <a href="resize.html#SampleImage">SampleImage</a> &bull; <a href="resize.html#ScaleImage">ScaleImage</a> &bull; <a href="resize.html#ThumbnailImage">ThumbnailImage</a>]</p>
cristy6f77f692011-02-15 15:31:39 +0000233
cristy20398432011-08-11 01:31:50 +0000234<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="AdaptiveResizeImage">AdaptiveResizeImage</a></h2>
235<div class="doc-section">
236
237<p>AdaptiveResizeImage() adaptively resize image with pixel resampling.</p>
238
cristy72da67d2013-02-24 21:40:48 +0000239<p>This is shortcut function for a fast interpolative resize using mesh interpolation. It works well for small resizes of less than +/- 50 of the original image size. For larger resizing on images a full filtered and slower resize function should be used instead.</p>
240
cristy20398432011-08-11 01:31:50 +0000241<p>The format of the AdaptiveResizeImage method is:</p>
242
243<pre class="code">
244 Image *AdaptiveResizeImage(const Image *image,const size_t columns,
245 const size_t rows,ExceptionInfo *exception)
246</pre>
247
248<p>A description of each parameter follows:</p>
249
250<h5>image</h5>
251<p>the image.</p>
252
253<h5>columns</h5>
254<p>the number of columns in the resized image.</p>
255
256<h5>rows</h5>
257<p>the number of rows in the resized image.</p>
258
259<h5>exception</h5>
260<p>return any errors or warnings in this structure.</p>
261
262 </div>
cristy72da67d2013-02-24 21:40:48 +0000263<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="InterpolativeResizeImage">InterpolativeResizeImage</a></h2>
264<div class="doc-section">
265
266<p>InterpolativeResizeImage() resizes an image using the specified interpolation method.</p>
267
268<p>The format of the InterpolativeResizeImage method is:</p>
269
270<pre class="code">
271 Image *InterpolativeResizeImage(const Image *image,const size_t columns,
272 const size_t rows,const InterpolatePixelMethod method,
273 ExceptionInfo *exception)
274</pre>
275
276<p>A description of each parameter follows:</p>
277
278<h5>image</h5>
279<p>the image.</p>
280
281<h5>columns</h5>
282<p>the number of columns in the resized image.</p>
283
284<h5>rows</h5>
285<p>the number of rows in the resized image.</p>
286
287<h5>method</h5>
288<p>the pixel interpolation method.</p>
289
290<h5>exception</h5>
291<p>return any errors or warnings in this structure.</p>
292
293 </div>
294<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="LiquidRescaleImage">LiquidRescaleImage</a></h2>
295<div class="doc-section">
296
297<p>LiquidRescaleImage() rescales image with seam carving.</p>
298
299<p>The format of the LiquidRescaleImage method is:</p>
300
301<pre class="code">
302 Image *LiquidRescaleImage(const Image *image,
303 const size_t columns,const size_t rows,
304 const double delta_x,const double rigidity,ExceptionInfo *exception)
305</pre>
306
307<p>A description of each parameter follows:</p>
308
309<h5>image</h5>
310<p>the image.</p>
311
312<h5>columns</h5>
313<p>the number of columns in the rescaled image.</p>
314
315<h5>rows</h5>
316<p>the number of rows in the rescaled image.</p>
317
318<h5>delta_x</h5>
319<p>maximum seam transversal step (0 means straight seams).</p>
320
321<h5>rigidity</h5>
322<p>introduce a bias for non-straight seams (typically 0).</p>
323
324<h5>exception</h5>
325<p>return any errors or warnings in this structure.</p>
326
327 </div>
cristy20398432011-08-11 01:31:50 +0000328<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="MagnifyImage">MagnifyImage</a></h2>
329<div class="doc-section">
330
331<p>MagnifyImage() is a convenience method that scales an image proportionally to twice its size.</p>
332
333<p>The format of the MagnifyImage method is:</p>
334
335<pre class="code">
336 Image *MagnifyImage(const Image *image,ExceptionInfo *exception)
337</pre>
338
339<p>A description of each parameter follows:</p>
340
341<h5>image</h5>
342<p>the image.</p>
343
344<h5>exception</h5>
345<p>return any errors or warnings in this structure.</p>
346
347 </div>
348<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="MinifyImage">MinifyImage</a></h2>
349<div class="doc-section">
350
351<p>MinifyImage() is a convenience method that scales an image proportionally to half its size.</p>
352
353<p>The format of the MinifyImage method is:</p>
354
355<pre class="code">
356 Image *MinifyImage(const Image *image,ExceptionInfo *exception)
357</pre>
358
359<p>A description of each parameter follows:</p>
360
361<h5>image</h5>
362<p>the image.</p>
363
364<h5>exception</h5>
365<p>return any errors or warnings in this structure.</p>
366
367 </div>
368<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="ResampleImage">ResampleImage</a></h2>
369<div class="doc-section">
370
371<p>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.</p>
372
373<p>The format of the ResampleImage method is:</p>
374
375<pre class="code">
376 Image *ResampleImage(Image *image,const double x_resolution,
377 const double y_resolution,const FilterTypes filter,const double blur,
378 ExceptionInfo *exception)
379</pre>
380
381<p>A description of each parameter follows:</p>
382
383<h5>image</h5>
384<p>the image to be resized to fit the given resolution.</p>
385
386<h5>x_resolution</h5>
387<p>the new image x resolution.</p>
388
389<h5>y_resolution</h5>
390<p>the new image y resolution.</p>
391
392<h5>filter</h5>
393<p>Image filter to use.</p>
394
395<h5>blur</h5>
396<p>the blur factor where > 1 is blurry, < 1 is sharp.</p>
397
398 </div>
cristy20398432011-08-11 01:31:50 +0000399<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="ResizeImage">ResizeImage</a></h2>
400<div class="doc-section">
401
402<p>ResizeImage() scales an image to the desired dimensions, using the given filter (see AcquireFilterInfo()).</p>
403
404<p>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.</p>
405
406<p>ResizeImage() was inspired by Paul Heckbert's "zoom" program.</p>
407
408<p>The format of the ResizeImage method is:</p>
409
410<pre class="code">
411 Image *ResizeImage(Image *image,const size_t columns,
412 const size_t rows,const FilterTypes filter,const double blur,
413 ExceptionInfo *exception)
414</pre>
415
416<p>A description of each parameter follows:</p>
417
418<h5>image</h5>
419<p>the image.</p>
420
421<h5>columns</h5>
422<p>the number of columns in the scaled image.</p>
423
424<h5>rows</h5>
425<p>the number of rows in the scaled image.</p>
426
427<h5>filter</h5>
428<p>Image filter to use.</p>
429
430<h5>blur</h5>
431<p>the blur factor where > 1 is blurry, < 1 is sharp. Typically set this to 1.0.</p>
432
433<h5>exception</h5>
434<p>return any errors or warnings in this structure.</p>
435
436 </div>
437<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="SampleImage">SampleImage</a></h2>
438<div class="doc-section">
439
440<p>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.</p>
441
442<p>The format of the SampleImage method is:</p>
443
444<pre class="code">
445 Image *SampleImage(const Image *image,const size_t columns,
446 const size_t rows,ExceptionInfo *exception)
447</pre>
448
449<p>A description of each parameter follows:</p>
450
451<h5>image</h5>
452<p>the image.</p>
453
454<h5>columns</h5>
455<p>the number of columns in the sampled image.</p>
456
457<h5>rows</h5>
458<p>the number of rows in the sampled image.</p>
459
460<h5>exception</h5>
461<p>return any errors or warnings in this structure.</p>
462
463 </div>
464<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="ScaleImage">ScaleImage</a></h2>
465<div class="doc-section">
466
467<p>ScaleImage() changes the size of an image to the given dimensions.</p>
468
469<p>The format of the ScaleImage method is:</p>
470
471<pre class="code">
472 Image *ScaleImage(const Image *image,const size_t columns,
473 const size_t rows,ExceptionInfo *exception)
474</pre>
475
476<p>A description of each parameter follows:</p>
477
478<h5>image</h5>
479<p>the image.</p>
480
481<h5>columns</h5>
482<p>the number of columns in the scaled image.</p>
483
484<h5>rows</h5>
485<p>the number of rows in the scaled image.</p>
486
487<h5>exception</h5>
488<p>return any errors or warnings in this structure.</p>
489
490 </div>
491<h2><a href="http://www.imagemagick.org/api/MagickCore/resize_8c.html" id="ThumbnailImage">ThumbnailImage</a></h2>
492<div class="doc-section">
493
494<p>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.</p>
495
496<p>The format of the ThumbnailImage method is:</p>
497
498<pre class="code">
499 Image *ThumbnailImage(const Image *image,const size_t columns,
500 const size_t rows,ExceptionInfo *exception)
501</pre>
502
503<p>A description of each parameter follows:</p>
504
505<h5>image</h5>
506<p>the image.</p>
507
508<h5>columns</h5>
509<p>the number of columns in the scaled image.</p>
510
511<h5>rows</h5>
512<p>the number of rows in the scaled image.</p>
513
514<h5>exception</h5>
515<p>return any errors or warnings in this structure.</p>
516
517 </div>
cristy06f63f22012-10-31 00:50:07 +0000518
519</div>
520
521<div id="linkbar">
522 <span id="linkbar-west">&nbsp;</span>
523 <span id="linkbar-center">
cristy72da67d2013-02-24 21:40:48 +0000524 <a href="../../discourse-server">Discourse Server</a> &bull;
cristy06f63f22012-10-31 00:50:07 +0000525 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
526 </span>
527 <span id="linkbar-east">&nbsp;</span>
528 </div>
529 <div class="footer">
cristy72da67d2013-02-24 21:40:48 +0000530 <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>
cristyd8833bf2013-02-24 22:14:53 +0000531 <span id="footer-east"> <a href="../../www/contact.html">Contact the Wizards</a></span>
cristy06f63f22012-10-31 00:50:07 +0000532 </div>
533 <div style="clear: both; margin: 0; width: 100%; "></div>
534 <script type="text/javascript">
535 var _gaq = _gaq || [];
536 _gaq.push(['_setAccount', 'UA-17690367-1']);
537 _gaq.push(['_trackPageview']);
538
539 (function() {
cristy18b955e2013-02-24 21:06:33 +0000540 var ga = document.createElement('offline-script'); ga.type = 'text/javascript'; ga.async = true;
cristy06f63f22012-10-31 00:50:07 +0000541 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
cristy18b955e2013-02-24 21:06:33 +0000542 var s = document.getElementsByTagName('offline-script')[0]; s.parentNode.insertBefore(ga, s);
cristy06f63f22012-10-31 00:50:07 +0000543 })();
544 </script>
545</body>
546</html>