blob: 9481581bb7959a45a324890f1f9d33b3fd2fbb89 [file] [log] [blame]
cristy91469932014-07-25 11:00:25 +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">
cristy06f63f22012-10-31 00:50:07 +00008<head>
cristy91469932014-07-25 11:00:25 +00009 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
10 <meta name=viewport content="width=device-width, initial-scale=0.3333334">
11 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"/>
cristyffb69ed2010-12-25 00:06:48 +000012 <title>ImageMagick: MagickCore, C API for ImageMagick: Transform an Image</title>
cristy91469932014-07-25 11:00:25 +000013 <meta http-equiv="content-language" content="en-US"/>
14 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
15 <meta http-equiv="reply-to" content="magick-users@imagemagick.org"/>
16 <meta name="application-name" content="ImageMagick"/>
17 <meta name="description" content="A collection of tools and libraries to read, write, and manipulate an image in any of the more popular image formats."/>
18 <meta name="application-url" content="http://www.imagemagick.org"/>
19 <meta name="generator" content="PHP"/>
20 <meta name="keywords" content="magickcore, c, api, for, imagemagick:, transform, an, image, convert, edit, compose, image, pixel"/>
21 <meta name="rating" content="GENERAL"/>
22 <meta name="robots" content="INDEX, FOLLOW"/>
23 <meta name="generator" content="ImageMagick Studio LLC"/>
24 <meta name="author" content="ImageMagick Studio LLC"/>
25 <meta name="revisit-after" content="2 DAYS"/>
26 <meta name="resource-type" content="document"/>
27 <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"/>
28 <meta name="distribution" content="Global"/>
cristyd2432012015-05-04 23:15:15 +000029 <link rel="icon" href="../../../../images/wand.png"/>
30 <link rel="shortcut icon" href="../../../../images/wand.ico" type="images/x-icon"/>
cristy91469932014-07-25 11:00:25 +000031 <link rel="canonical" href="http://www.imagemagick.org" />
32 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
cristy8ee7f242013-06-20 16:08:44 +000033
34 <!-- Add jQuery library -->
cristy91469932014-07-25 11:00:25 +000035 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
cristy8ee7f242013-06-20 16:08:44 +000036
37 <!-- Add mousewheel plugin (this is optional) -->
38 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
39
40 <!-- Add fancyBox -->
cristy91469932014-07-25 11:00:25 +000041 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
42 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
cristy8ee7f242013-06-20 16:08:44 +000043
44 <!-- Optionally add helpers - button, thumbnail and/or media -->
cristy91469932014-07-25 11:00:25 +000045 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
46 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
47 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>
cristy8ee7f242013-06-20 16:08:44 +000048
cristy91469932014-07-25 11:00:25 +000049 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
50 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
cristy8ee7f242013-06-20 16:08:44 +000051
cristy72da67d2013-02-24 21:40:48 +000052 <script type="text/javascript">
cristy8ee7f242013-06-20 16:08:44 +000053 $(document).ready(function() {
54 $(".fancybox").fancybox();
55 });
cristy72da67d2013-02-24 21:40:48 +000056 </script>
cristy8ee7f242013-06-20 16:08:44 +000057
58 <!-- ImageMagick style -->
59 <style type="text/css" media="all">
cristyd2432012015-05-04 23:15:15 +000060 @import url("../../../../www/magick.css");
cristy8ee7f242013-06-20 16:08:44 +000061 </style>
cristy06f63f22012-10-31 00:50:07 +000062</head>
63
64<body id="www-imagemagick-org">
cristy8ee7f242013-06-20 16:08:44 +000065
cristy91469932014-07-25 11:00:25 +000066<script type="text/javascript">
67 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
68 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
69 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
70 })(window,document,'offline-script','//www.google-analytics.com/analytics.js','ga');
cristy8ee7f242013-06-20 16:08:44 +000071
cristy91469932014-07-25 11:00:25 +000072 ga('create', 'UA-40133312-1', 'imagemagick.org');
73 ga('send', 'pageview');
74</script>
cristy8ee7f242013-06-20 16:08:44 +000075
cristy06f63f22012-10-31 00:50:07 +000076<div class="titlebar">
77<div style="margin: 17px auto; float: left;">
78 <script type="text/javascript">
79 <!--
80 google_ad_client = "pub-3129977114552745";
81 google_ad_slot = "5439289906";
82 google_ad_width = 728;
83 google_ad_height = 90;
84 //-->
85 </script>
cristy91469932014-07-25 11:00:25 +000086 <script type="text/javascript"
87 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
88 </script>
cristy06f63f22012-10-31 00:50:07 +000089</div>
cristyd2432012015-05-04 23:15:15 +000090<a href="../../../../discourse-server">
91 <img src="../../../../images/logo.jpg"
cristy91469932014-07-25 11:00:25 +000092 alt="ImageMagick Logo" width="123" height="118"
93 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
cristyf1b8a092014-02-20 15:46:11 +000094<a href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">
cristyd2432012015-05-04 23:15:15 +000095 <img src="../../../../images/sprite.jpg"
cristy91469932014-07-25 11:00:25 +000096 alt="ImageMagick Sprite" width="114" height="118"
97 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
cristy06f63f22012-10-31 00:50:07 +000098</div>
99
100<div class="westbar">
101
cristy3ed852e2009-09-05 21:47:34 +0000102<div class="menu">
cristyf1b8a092014-02-20 15:46:11 +0000103 <a title="About ImageMagick" href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000104</div>
cristy3ed852e2009-09-05 21:47:34 +0000105<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000106 <a title="Binary Releases" href="../../../../www/binary-releases.html">Binary Releases</a>
cristybb503372010-05-27 20:51:26 +0000107</div>
108<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000109 <a title="Binary Release: Unix" href="../../../../www/binary-releases.html#unix">Unix</a>
cristybb503372010-05-27 20:51:26 +0000110</div>
111<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000112 <a title="Binary Release: MacOS X" href="../../../../www/binary-releases.html#macosx">Mac OS X</a>
cristybb503372010-05-27 20:51:26 +0000113</div>
114<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000115 <a title="Binary Release: iOS" href="../../../../www/binary-releases.html#iOS">iOS</a>
cristyda16f162011-02-19 23:52:17 +0000116</div>
117<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000118 <a title="Binary Release: Windows" href="../../../../www/binary-releases.html#windows">Windows</a>
cristybb503372010-05-27 20:51:26 +0000119</div>
cristy06f63f22012-10-31 00:50:07 +0000120<div class="sep"></div>
cristybb503372010-05-27 20:51:26 +0000121<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000122 <a title="Command-line Tools" href="../../../../www/command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +0000123</div>
124<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000125 <a title="Command-line Tools: Processing" href="../../../../www/command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +0000126</div>
127<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000128 <a title="Command-line Tools: Options" href="../../../../www/command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +0000129</div>
130<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000131 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +0000132</div>
133<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000134 <a title="Program Interfaces" href="../../../../www/api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +0000135</div>
136<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000137 <a title="Program Interface: MagickWand" href="../../../../www/magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +0000138</div>
139<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000140 <a title="Program Interface: MagickCore" href="../../../../www/magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +0000141</div>
142<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000143 <a title="Program Interface: PerlMagick" href="../../../../www/perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000144</div>
145<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000146 <a title="Program Interface: Magick++" href="../../../../www/magick++.html">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +0000147</div>
cristy06f63f22012-10-31 00:50:07 +0000148<div class="sep"></div>
cristy91469932014-07-25 11:00:25 +0000149<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000150 <a title="Install from Source" href="../../../../www/install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +0000151</div>
152<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000153 <a title="Install from Source: Unix" href="../../../../www/install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +0000154</div>
155<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000156 <a title="Install from Source: Windows" href="../../../../www/install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000157 </div>
158<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000159 <a title="Resources" href="../../../../www/resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000160</div>
cristybb503372010-05-27 20:51:26 +0000161<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000162 <a title="Architecture" href="../../../../www/architecture.html">Architecture</a>
cristybb503372010-05-27 20:51:26 +0000163</div>
cristy3ed852e2009-09-05 21:47:34 +0000164<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000165 <a title="Download" href="../../../../www/download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000166</div>
cristy06f63f22012-10-31 00:50:07 +0000167<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000168<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000169 <a title="Search" href="http://www.imagemagick.org/http://www.imagemagick.org/script/search.php">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000170</div>
cristy06f63f22012-10-31 00:50:07 +0000171<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000172<div class="menu">
cristyd2432012015-05-04 23:15:15 +0000173 <a title="Site Map" href="../../../../www/sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000174</div>
cristy91469932014-07-25 11:00:25 +0000175<div class="sub">
cristyd2432012015-05-04 23:15:15 +0000176 <a title="Site Map: Links" href="../../../../www/links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000177</div>
cristy06f63f22012-10-31 00:50:07 +0000178<div class="sep"></div>
cristy06f63f22012-10-31 00:50:07 +0000179</div>
180
181<div class="eastbar">
cristy91469932014-07-25 11:00:25 +0000182 <script type="text/javascript">
183 /* <![CDATA[ */
184 window.___gcfg = {
185 lang: 'en-US'
186 };
187
188 (function() {
189 var po = document.createElement('offline-script');
190 po.type = 'text/javascript';
191 po.async = true;
192 po.src = 'https://apis.google.com/js/plusone.js';
193 var script = document.getElementsByTagName('offline-script')[0];
194 script.parentNode.insertBefore(po, script);
195 })();
196 var gplusone = document.getElementById("gplusone");
197 gplusone.setAttribute("data-size","medium");
198 gplusone.setAttribute("data-count","true");
199 /* ]]> */
200 </script>
201 <script type="text/javascript">
202 /* <![CDATA[ */
203 (function() {
204 var po = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
205 po.type = 'text/javascript';
206 po.async = true;
207 po.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
208 var script = document.getElementsByTagName('offline-script')[0];
209 script.parentNode.insertBefore(po, script);
210 })();
211 /* ]]> */
212 </script>
cristyf1b8a092014-02-20 15:46:11 +0000213 <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.imagemagick.org/"></a></div>
cristy8ee7f242013-06-20 16:08:44 +0000214 <noscript>
215 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
cristy91469932014-07-25 11:00:25 +0000216 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0" /></a>
cristy8ee7f242013-06-20 16:08:44 +0000217 </noscript>
cristy91469932014-07-25 11:00:25 +0000218 <div class="g-plusone" data-size="standard" data-count="true"></div>
cristy06f63f22012-10-31 00:50:07 +0000219</div>
220
221<div class="main">
222
cristy20398432011-08-11 01:31:50 +0000223<h1>Module transform Methods</h1>
cristy91469932014-07-25 11:00:25 +0000224<p class="navigation-index">[<a href="transform.html#ChopImage">ChopImage</a> &#8226; <a href="transform.html#CropImage">CropImage</a> &#8226; <a href="transform.html#CropImageToTiles">CropImageToTiles</a> &#8226; <a href="transform.html#ExcerptImage">ExcerptImage</a> &#8226; <a href="transform.html#ExtentImage">ExtentImage</a> &#8226; <a href="transform.html#FlipImage">FlipImage</a> &#8226; <a href="transform.html#FlopImage">FlopImage</a> &#8226; <a href="transform.html#RollImage">RollImage</a> &#8226; <a href="transform.html#ShaveImage">ShaveImage</a> &#8226; <a href="transform.html#SpliceImage">SpliceImage</a> &#8226; <a href="transform.html#TransformImage">TransformImage</a> &#8226; <a href="transform.html#to CropImageToTiles">to CropImageToTiles</a> &#8226; <a href="transform.html#TransformImages">TransformImages</a> &#8226; <a href="transform.html#TransposeImage">TransposeImage</a> &#8226; <a href="transform.html#TransverseImage">TransverseImage</a> &#8226; <a href="transform.html#TrimImage">TrimImage</a>]</p>
cristy6f77f692011-02-15 15:31:39 +0000225
cristy20398432011-08-11 01:31:50 +0000226<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="ChopImage">ChopImage</a></h2>
227<div class="doc-section">
228
229<p>ChopImage() removes a region of an image and collapses the image to occupy the removed portion.</p>
230
231<p>The format of the ChopImage method is:</p>
232
233<pre class="code">
234 Image *ChopImage(const Image *image,const RectangleInfo *chop_info)
235 ExceptionInfo *exception)
236</pre>
237
238<p>A description of each parameter follows:</p>
239
240<h5>image</h5>
241<p>the image.</p>
242
243<h5>chop_info</h5>
244<p>Define the region of the image to chop.</p>
245
246<h5>exception</h5>
247<p>return any errors or warnings in this structure.</p>
248
249 </div>
250<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="CropImage">CropImage</a></h2>
251<div class="doc-section">
252
253<p>CropImage() extracts a region of the image starting at the offset defined by geometry. Region must be fully defined, and no special handling of geometry flags is performed.</p>
254
255<p>The format of the CropImage method is:</p>
256
257<pre class="code">
258 Image *CropImage(const Image *image,const RectangleInfo *geometry,
259 ExceptionInfo *exception)
260</pre>
261
262<p>A description of each parameter follows:</p>
263
264<h5>image</h5>
265<p>the image.</p>
266
267<h5>geometry</h5>
268<p>Define the region of the image to crop with members x, y, width, and height.</p>
269
270<h5>exception</h5>
271<p>return any errors or warnings in this structure.</p>
272
273 </div>
274<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="CropImageToTiles">CropImageToTiles</a></h2>
275<div class="doc-section">
276
cristyeed6cb62012-01-28 19:38:34 +0000277<p>CropImageToTiles() crops a single image, into a possible list of tiles. This may include a single sub-region of the image. This basically applies all the normal geometry flags for Crop.</p>
cristy20398432011-08-11 01:31:50 +0000278
cristyeed6cb62012-01-28 19:38:34 +0000279<p>Image *CropImageToTiles(const Image *image, const RectangleInfo *crop_geometry, ExceptionInfo *exception)</p>
cristy20398432011-08-11 01:31:50 +0000280
281<p>A description of each parameter follows:</p>
282
283<h5>image</h5>
284<p>the image The transformed image is returned as this parameter.</p>
285
286<h5>crop_geometry</h5>
287<p>A crop geometry string.</p>
288
289<h5>exception</h5>
290<p>return any errors or warnings in this structure.</p>
291
292 </div>
293<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="ExcerptImage">ExcerptImage</a></h2>
294<div class="doc-section">
295
296<p>ExcerptImage() returns a excerpt of the image as defined by the geometry.</p>
297
298<p>The format of the ExcerptImage method is:</p>
299
300<pre class="code">
301 Image *ExcerptImage(const Image *image,const RectangleInfo *geometry,
302 ExceptionInfo *exception)
303</pre>
304
305<p>A description of each parameter follows:</p>
306
307<h5>image</h5>
308<p>the image.</p>
309
310<h5>geometry</h5>
311<p>Define the region of the image to extend with members x, y, width, and height.</p>
312
313<h5>exception</h5>
314<p>return any errors or warnings in this structure.</p>
315
316 </div>
317<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="ExtentImage">ExtentImage</a></h2>
318<div class="doc-section">
319
320<p>ExtentImage() extends the image as defined by the geometry, gravity, and image background color. Set the (x,y) offset of the geometry to move the original image relative to the extended image.</p>
321
322<p>The format of the ExtentImage method is:</p>
323
324<pre class="code">
325 Image *ExtentImage(const Image *image,const RectangleInfo *geometry,
326 ExceptionInfo *exception)
327</pre>
328
329<p>A description of each parameter follows:</p>
330
331<h5>image</h5>
332<p>the image.</p>
333
334<h5>geometry</h5>
335<p>Define the region of the image to extend with members x, y, width, and height.</p>
336
337<h5>exception</h5>
338<p>return any errors or warnings in this structure.</p>
339
340 </div>
341<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="FlipImage">FlipImage</a></h2>
342<div class="doc-section">
343
344<p>FlipImage() creates a vertical mirror image by reflecting the pixels around the central x-axis.</p>
345
346<p>The format of the FlipImage method is:</p>
347
348<pre class="code">
349 Image *FlipImage(const Image *image,ExceptionInfo *exception)
350</pre>
351
352<p>A description of each parameter follows:</p>
353
354<h5>image</h5>
355<p>the image.</p>
356
357<h5>exception</h5>
358<p>return any errors or warnings in this structure.</p>
359
360 </div>
361<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="FlopImage">FlopImage</a></h2>
362<div class="doc-section">
363
364<p>FlopImage() creates a horizontal mirror image by reflecting the pixels around the central y-axis.</p>
365
366<p>The format of the FlopImage method is:</p>
367
368<pre class="code">
369 Image *FlopImage(const Image *image,ExceptionInfo *exception)
370</pre>
371
372<p>A description of each parameter follows:</p>
373
374<h5>image</h5>
375<p>the image.</p>
376
377<h5>exception</h5>
378<p>return any errors or warnings in this structure.</p>
379
380 </div>
381<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="RollImage">RollImage</a></h2>
382<div class="doc-section">
383
384<p>RollImage() offsets an image as defined by x_offset and y_offset.</p>
385
386<p>The format of the RollImage method is:</p>
387
388<pre class="code">
389 Image *RollImage(const Image *image,const ssize_t x_offset,
390 const ssize_t y_offset,ExceptionInfo *exception)
391</pre>
392
393<p>A description of each parameter follows:</p>
394
395<h5>image</h5>
396<p>the image.</p>
397
398<h5>x_offset</h5>
399<p>the number of columns to roll in the horizontal direction.</p>
400
401<h5>y_offset</h5>
402<p>the number of rows to roll in the vertical direction.</p>
403
404<h5>exception</h5>
405<p>return any errors or warnings in this structure.</p>
406
407 </div>
408<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="ShaveImage">ShaveImage</a></h2>
409<div class="doc-section">
410
411<p>ShaveImage() shaves pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.</p>
412
413<p>The format of the ShaveImage method is:</p>
414
415<pre class="code">
416 Image *ShaveImage(const Image *image,const RectangleInfo *shave_info,
417 ExceptionInfo *exception)
418</pre>
419
420<p>A description of each parameter follows:</p>
421
422<h5>shave_image</h5>
423<p>Method ShaveImage returns a pointer to the shaved image. A null image is returned if there is a memory shortage or if the image width or height is zero.</p>
424
425<h5>image</h5>
426<p>the image.</p>
427
428<h5>shave_info</h5>
429<p>Specifies a pointer to a RectangleInfo which defines the region of the image to crop.</p>
430
431<h5>exception</h5>
432<p>return any errors or warnings in this structure.</p>
433
434 </div>
435<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="SpliceImage">SpliceImage</a></h2>
436<div class="doc-section">
437
438<p>SpliceImage() splices a solid color into the image as defined by the geometry.</p>
439
440<p>The format of the SpliceImage method is:</p>
441
442<pre class="code">
443 Image *SpliceImage(const Image *image,const RectangleInfo *geometry,
444 ExceptionInfo *exception)
445</pre>
446
447<p>A description of each parameter follows:</p>
448
449<h5>image</h5>
450<p>the image.</p>
451
452<h5>geometry</h5>
453<p>Define the region of the image to splice with members x, y, width, and height.</p>
454
455<h5>exception</h5>
456<p>return any errors or warnings in this structure.</p>
457
458 </div>
459<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="TransformImage">TransformImage</a></h2>
460<div class="doc-section">
461
462<p>TransformImage() is a convenience method that behaves like ResizeImage() or CropImage() but accepts scaling and/or cropping information as a region geometry specification. If the operation fails, the original image handle is left as is.</p>
463
464<p>This should only be used for single images.</p>
465
466<p>The format of the TransformImage method is:</p>
467
468<pre class="code">
469 MagickBooleanType TransformImage(Image **image,const char *crop_geometry,
470 const char *image_geometry)
471</pre>
472
473<p>A description of each parameter follows:</p>
474
475<h5>image</h5>
476<p>the image The transformed image is returned as this parameter.</p>
477
478<h5>crop_geometry</h5>
479<p>A crop geometry string. This geometry defines a subregion of the image to crop.</p>
480
481<h5>image_geometry</h5>
482<p>An image geometry string. This geometry defines the final size of the image.</p>
483
484 </div>
485<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="to_CropImageToTiles">to CropImageToTiles</a></h2>
486<div class="doc-section">
487
488<p>to CropImageToTiles() or ResizeImage(), as appropriate.</p>
489
490 </div>
491<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="TransformImages">TransformImages</a></h2>
492<div class="doc-section">
493
494<p>TransformImages() calls TransformImage() on each image of a sequence.</p>
495
496<p>The format of the TransformImage method is:</p>
497
498<pre class="code">
499 MagickBooleanType TransformImages(Image **image,
500 const char *crop_geometry,const char *image_geometry)
501</pre>
502
503<p>A description of each parameter follows:</p>
504
505<h5>image</h5>
506<p>the image The transformed image is returned as this parameter.</p>
507
508<h5>crop_geometry</h5>
509<p>A crop geometry string. This geometry defines a subregion of the image to crop.</p>
510
511<h5>image_geometry</h5>
512<p>An image geometry string. This geometry defines the final size of the image.</p>
513
514 </div>
515<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="TransposeImage">TransposeImage</a></h2>
516<div class="doc-section">
517
518<p>TransposeImage() creates a horizontal mirror image by reflecting the pixels around the central y-axis while rotating them by 90 degrees.</p>
519
520<p>The format of the TransposeImage method is:</p>
521
522<pre class="code">
523 Image *TransposeImage(const Image *image,ExceptionInfo *exception)
524</pre>
525
526<p>A description of each parameter follows:</p>
527
528<h5>image</h5>
529<p>the image.</p>
530
531<h5>exception</h5>
532<p>return any errors or warnings in this structure.</p>
533
534 </div>
535<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="TransverseImage">TransverseImage</a></h2>
536<div class="doc-section">
537
538<p>TransverseImage() creates a vertical mirror image by reflecting the pixels around the central x-axis while rotating them by 270 degrees.</p>
539
540<p>The format of the TransverseImage method is:</p>
541
542<pre class="code">
543 Image *TransverseImage(const Image *image,ExceptionInfo *exception)
544</pre>
545
546<p>A description of each parameter follows:</p>
547
548<h5>image</h5>
549<p>the image.</p>
550
551<h5>exception</h5>
552<p>return any errors or warnings in this structure.</p>
553
554 </div>
555<h2><a href="http://www.imagemagick.org/api/MagickCore/transform_8c.html" id="TrimImage">TrimImage</a></h2>
556<div class="doc-section">
557
558<p>TrimImage() trims pixels from the image edges. It allocates the memory necessary for the new Image structure and returns a pointer to the new image.</p>
559
560<p>The format of the TrimImage method is:</p>
561
562<pre class="code">
563 Image *TrimImage(const Image *image,ExceptionInfo *exception)
564</pre>
565
566<p>A description of each parameter follows:</p>
567
568<h5>image</h5>
569<p>the image.</p>
570
571<h5>exception</h5>
572<p>return any errors or warnings in this structure.</p>
573
574 </div>
cristy06f63f22012-10-31 00:50:07 +0000575
576</div>
577
578<div id="linkbar">
cristyac1b4322013-07-28 13:58:06 +0000579 <span id="linkbar-west"> </span>
cristy8ee7f242013-06-20 16:08:44 +0000580
cristy06f63f22012-10-31 00:50:07 +0000581 <span id="linkbar-center">
cristyd2432012015-05-04 23:15:15 +0000582 <a href="../../../../discourse-server">Discourse Server</a>
cristy91469932014-07-25 11:00:25 +0000583 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy44cbd482013-08-04 20:53:36 +0000584 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy8ee7f242013-06-20 16:08:44 +0000585 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
cristy06f63f22012-10-31 00:50:07 +0000586 </span>
cristyac1b4322013-07-28 13:58:06 +0000587 <span id="linkbar-east"> </span>
cristy44cbd482013-08-04 20:53:36 +0000588</div>
589<div class="footer">
cristy37b3d442015-02-28 14:00:30 +0000590 <span id="footer-west">© 1999-2014 ImageMagick Studio LLC</span>
cristyd2432012015-05-04 23:15:15 +0000591 <span id="footer-east"> <a href="../../../../www/contact.html">Contact the Wizards</a></span>
cristy44cbd482013-08-04 20:53:36 +0000592</div>
593<div style="clear: both; margin: 0; width: 100%; "></div>
cristy06f63f22012-10-31 00:50:07 +0000594</body>
595</html>