1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
9    <title>ImageMagick: MagickCore, C API for ImageMagick: Image Methods</title>
10  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
11  <meta name="application-name" content="ImageMagick"/>
12  <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves."/>
13  <meta name="application-url" content="http://www.imagemagick.org"/>
14  <meta name="generator" content="PHP"/>
15  <meta name="keywords" content="magickcore, c, api, for, imagemagick:, image, methods, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
16  <meta name="rating" content="GENERAL"/>
17  <meta name="robots" content="INDEX, FOLLOW"/>
18  <meta name="generator" content="ImageMagick Studio LLC"/>
19  <meta name="author" content="ImageMagick Studio LLC"/>
20  <meta name="revisit-after" content="2 DAYS"/>
21  <meta name="resource-type" content="document"/>
22  <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
23  <meta name="distribution" content="Global"/>
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
25  <link rel="icon" href="../image/wand.png"/>
26  <link rel="shortcut icon" href="../image/wand.ico"/>
27  <link rel="stylesheet" href="../css/magick.php"/>
28</head>
29<body>
30<div class="main">
31<div class="magick-masthead">
32  <div class="container">
33    <script async="async" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
34         style="display:block"
35         data-ad-client="ca-pub-3129977114552745"
36         data-ad-slot="6345125851"
37         data-ad-format="auto"></ins>
38    <script>
39      (adsbygoogle = window.adsbygoogle || []).push({});
40    </script>
41    <nav class="magick-nav">
42      <a class="magick-nav-item " href="../index.php">Home</a>
43      <a class="magick-nav-item " href="../script/binary-releases.php">Download</a>
44      <a class="magick-nav-item " href="../script/command-line-tools.php">Tools</a>
45      <a class="magick-nav-item " href="../script/command-line-options.php">Options</a>
46      <a class="magick-nav-item " href="../script/resources.php">Resources</a>
47      <a class="magick-nav-item " href="../script/api.php">Develop</a>
48      <a class="magick-nav-item " href="../script/search.php">Search</a>
49      <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
50    </nav>
51  </div>
52</div>
53<div class="container">
54<div class="magick-header">
55<p class="text-center"><a href="image.php#AcquireImage">AcquireImage</a> &bull; <a href="image.php#AcquireImageInfo">AcquireImageInfo</a> &bull; <a href="image.php#AcquireNextImage">AcquireNextImage</a> &bull; <a href="image.php#AppendImages">AppendImages</a> &bull; <a href="image.php#CatchImageException">CatchImageException</a> &bull; <a href="image.php#ClipImagePath">ClipImagePath</a> &bull; <a href="image.php#CloneImage">CloneImage</a> &bull; <a href="image.php#CloneImageInfo">CloneImageInfo</a> &bull; <a href="image.php#CopyImagePixels">CopyImagePixels</a> &bull; <a href="image.php#DestroyImage">DestroyImage</a> &bull; <a href="image.php#DestroyImageInfo">DestroyImageInfo</a> &bull; <a href="image.php#GetImageInfo">GetImageInfo</a> &bull; <a href="image.php#GetImageInfoFile">GetImageInfoFile</a> &bull; <a href="image.php#GetImageMask">GetImageMask</a> &bull; <a href="image.php#GetImageVirtualPixelMethod">GetImageVirtualPixelMethod</a> &bull; <a href="image.php#InterpretImageFilename">InterpretImageFilename</a> &bull; <a href="image.php#IsHighDynamicRangeImage">IsHighDynamicRangeImage</a> &bull; <a href="image.php#IsImageObject">IsImageObject</a> &bull; <a href="image.php#IsTaintImage">IsTaintImage</a> &bull; <a href="image.php#ModifyImage">ModifyImage</a> &bull; <a href="image.php#NewMagickImage">NewMagickImage</a> &bull; <a href="image.php#ReferenceImage">ReferenceImage</a> &bull; <a href="image.php#ResetImagePage">ResetImagePage</a> &bull; <a href="image.php#SetImageBackgroundColor">SetImageBackgroundColor</a> &bull; <a href="image.php#SetImageChannelMask">SetImageChannelMask</a> &bull; <a href="image.php#SetImageColor">SetImageColor</a> &bull; <a href="image.php#SetImageStorageClass">SetImageStorageClass</a> &bull; <a href="image.php#SetImageExtent">SetImageExtent</a> &bull; <a href="image.php#SetImageInfoBlob">SetImageInfoBlob</a> &bull; <a href="image.php#SetImageInfoFile">SetImageInfoFile</a> &bull; <a href="image.php#SetImageMask">SetImageMask</a> &bull; <a href="image.php#SetImageAlpha">SetImageAlpha</a> &bull; <a href="image.php#SetImageVirtualPixelMethod">SetImageVirtualPixelMethod</a> &bull; <a href="image.php#SmushImages">SmushImages</a> &bull; <a href="image.php#StripImage">StripImage</a> &bull; <a href="image.php#SyncImageSettings">SyncImageSettings</a></p>
56
57<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="AcquireImage">AcquireImage</a></h2>
58
59<p>AcquireImage() returns a pointer to an image structure initialized to default values.</p>
60
61<p>The format of the AcquireImage method is:</p>
62
63<pre class="text">
64Image *AcquireImage(const ImageInfo *image_info,ExceptionInfo *exception)
65</pre>
66
67<p>A description of each parameter follows:</p>
68
69<dd>
70</dd>
71
72<dd> </dd>
73<dl class="dl-horizontal">
74<dt>image_info</dt>
75<dd>Many of the image default values are set from this structure.  For example, filename, compression, depth, background color, and others. </dd>
76
77<dd> </dd>
78<dt>exception</dt>
79<dd>return any errors or warnings in this structure. </dd>
80
81<dd>  </dd>
82</dl>
83<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="AcquireImageInfo">AcquireImageInfo</a></h2>
84
85<p>AcquireImageInfo() allocates the ImageInfo structure.</p>
86
87<p>The format of the AcquireImageInfo method is:</p>
88
89<pre class="text">
90ImageInfo *AcquireImageInfo(void)
91</pre>
92
93<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="AcquireNextImage">AcquireNextImage</a></h2>
94
95<p>AcquireNextImage() initializes the next image in a sequence to default values.  The next member of image points to the newly allocated image.  If there is a memory shortage, next is assigned NULL.</p>
96
97<p>The format of the AcquireNextImage method is:</p>
98
99<pre class="text">
100void AcquireNextImage(const ImageInfo *image_info,Image *image,
101  ExceptionInfo *exception)
102</pre>
103
104<p>A description of each parameter follows:</p>
105
106<dd>
107</dd>
108
109<dd> </dd>
110<dl class="dl-horizontal">
111<dt>image_info</dt>
112<dd>Many of the image default values are set from this structure.  For example, filename, compression, depth, background color, and others. </dd>
113
114<dd> </dd>
115<dt>image</dt>
116<dd>the image. </dd>
117
118<dd> </dd>
119<dt>exception</dt>
120<dd>return any errors or warnings in this structure. </dd>
121
122<dd>  </dd>
123</dl>
124<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="AppendImages">AppendImages</a></h2>
125
126<p>AppendImages() takes all images from the current image pointer to the end of the image list and appends them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.</p>
127
128<p>The current gravity setting effects how the image is justified in the final image.</p>
129
130<p>The format of the AppendImages method is:</p>
131
132<pre class="text">
133Image *AppendImages(const Image *images,const MagickBooleanType stack,
134  ExceptionInfo *exception)
135</pre>
136
137<p>A description of each parameter follows:</p>
138
139<dd>
140</dd>
141
142<dd> </dd>
143<dl class="dl-horizontal">
144<dt>images</dt>
145<dd>the image sequence. </dd>
146
147<dd> </dd>
148<dt>stack</dt>
149<dd>A value other than 0 stacks the images top-to-bottom. </dd>
150
151<dd> </dd>
152<dt>exception</dt>
153<dd>return any errors or warnings in this structure. </dd>
154
155<dd>  </dd>
156</dl>
157<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="CatchImageException">CatchImageException</a></h2>
158
159<p>CatchImageException() returns if no exceptions are found in the image sequence, otherwise it determines the most severe exception and reports it as a warning or error depending on the severity.</p>
160
161<p>The format of the CatchImageException method is:</p>
162
163<pre class="text">
164ExceptionType CatchImageException(Image *image)
165</pre>
166
167<p>A description of each parameter follows:</p>
168
169<dd>
170</dd>
171
172<dd> </dd>
173<dl class="dl-horizontal">
174<dt>image</dt>
175<dd>An image sequence. </dd>
176
177<dd>  </dd>
178</dl>
179<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="ClipImagePath">ClipImagePath</a></h2>
180
181<p>ClipImagePath() sets the image clip mask based any clipping path information if it exists.</p>
182
183<p>The format of the ClipImagePath method is:</p>
184
185<pre class="text">
186MagickBooleanType ClipImagePath(Image *image,const char *pathname,
187  const MagickBooleanType inside,ExceptionInfo *exception)
188</pre>
189
190<p>A description of each parameter follows:</p>
191
192<dd>
193</dd>
194
195<dd> </dd>
196<dl class="dl-horizontal">
197<dt>image</dt>
198<dd>the image. </dd>
199
200<dd> </dd>
201<dt>pathname</dt>
202<dd>name of clipping path resource. If name is preceded by #, use clipping path numbered by name. </dd>
203
204<dd> </dd>
205<dt>inside</dt>
206<dd>if non-zero, later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path. </dd>
207
208<dd> </dd>
209<dt>exception</dt>
210<dd>return any errors or warnings in this structure. </dd>
211
212<dd>  </dd>
213</dl>
214<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="CloneImage">CloneImage</a></h2>
215
216<p>CloneImage() copies an image and returns the copy as a new image object.</p>
217
218<p>If the specified columns and rows is 0, an exact copy of the image is returned, otherwise the pixel data is undefined and must be initialized with the QueueAuthenticPixels() and SyncAuthenticPixels() methods.  On failure, a NULL image is returned and exception describes the reason for the failure.</p>
219
220<p>The format of the CloneImage method is:</p>
221
222<pre class="text">
223Image *CloneImage(const Image *image,const size_t columns,
224  const size_t rows,const MagickBooleanType orphan,
225  ExceptionInfo *exception)
226</pre>
227
228<p>A description of each parameter follows:</p>
229
230<dd>
231</dd>
232
233<dd> </dd>
234<dl class="dl-horizontal">
235<dt>image</dt>
236<dd>the image. </dd>
237
238<dd> </dd>
239<dt>columns</dt>
240<dd>the number of columns in the cloned image. </dd>
241
242<dd> </dd>
243<dt>rows</dt>
244<dd>the number of rows in the cloned image. </dd>
245
246<dd> </dd>
247<dt>detach</dt>
248<dd> With a value other than 0, the cloned image is detached from its parent I/O stream. </dd>
249
250<dd> </dd>
251<dt>exception</dt>
252<dd>return any errors or warnings in this structure. </dd>
253
254<dd>  </dd>
255</dl>
256<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="CloneImageInfo">CloneImageInfo</a></h2>
257
258<p>CloneImageInfo() makes a copy of the given image info structure.  If NULL is specified, a new image info structure is created initialized to default values.</p>
259
260<p>The format of the CloneImageInfo method is:</p>
261
262<pre class="text">
263ImageInfo *CloneImageInfo(const ImageInfo *image_info)
264</pre>
265
266<p>A description of each parameter follows:</p>
267
268<dd>
269</dd>
270
271<dd> </dd>
272<dl class="dl-horizontal">
273<dt>image_info</dt>
274<dd>the image info. </dd>
275
276<dd>  </dd>
277</dl>
278<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="CopyImagePixels">CopyImagePixels</a></h2>
279
280<p>CopyImagePixels() copies pixels from the source image as defined by the geometry the destination image at the specified offset.</p>
281
282<p>The format of the CopyImagePixels method is:</p>
283
284<pre class="text">
285MagickBooleanType CopyImagePixels(Image *image,const Image *source_image,
286  const RectangleInfo *geometry,const OffsetInfo *offset,
287  ExceptionInfo *exception);
288</pre>
289
290<p>A description of each parameter follows:</p>
291
292<dd>
293</dd>
294
295<dd> </dd>
296<dl class="dl-horizontal">
297<dt>image</dt>
298<dd>the destination image. </dd>
299
300<dd> </dd>
301<dt>source_image</dt>
302<dd>the source image. </dd>
303
304<dd> </dd>
305<dt>geometry</dt>
306<dd>define the dimensions of the source pixel rectangle. </dd>
307
308<dd> </dd>
309<dt>offset</dt>
310<dd>define the offset in the destination image. </dd>
311
312<dd> </dd>
313<dt>exception</dt>
314<dd>return any errors or warnings in this structure. </dd>
315
316<dd>  </dd>
317</dl>
318<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="DestroyImage">DestroyImage</a></h2>
319
320<p>DestroyImage() dereferences an image, deallocating memory associated with the image if the reference count becomes zero.</p>
321
322<p>The format of the DestroyImage method is:</p>
323
324<pre class="text">
325Image *DestroyImage(Image *image)
326</pre>
327
328<p>A description of each parameter follows:</p>
329
330<dd>
331</dd>
332
333<dd> </dd>
334<dl class="dl-horizontal">
335<dt>image</dt>
336<dd>the image. </dd>
337
338<dd>  </dd>
339</dl>
340<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="DestroyImageInfo">DestroyImageInfo</a></h2>
341
342<p>DestroyImageInfo() deallocates memory associated with an ImageInfo structure.</p>
343
344<p>The format of the DestroyImageInfo method is:</p>
345
346<pre class="text">
347ImageInfo *DestroyImageInfo(ImageInfo *image_info)
348</pre>
349
350<p>A description of each parameter follows:</p>
351
352<dd>
353</dd>
354
355<dd> </dd>
356<dl class="dl-horizontal">
357<dt>image_info</dt>
358<dd>the image info. </dd>
359
360<dd>  </dd>
361</dl>
362<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageInfo">GetImageInfo</a></h2>
363
364<p>GetImageInfo() initializes image_info to default values.</p>
365
366<p>The format of the GetImageInfo method is:</p>
367
368<pre class="text">
369void GetImageInfo(ImageInfo *image_info)
370</pre>
371
372<p>A description of each parameter follows:</p>
373
374<dd>
375</dd>
376
377<dd> </dd>
378<dl class="dl-horizontal">
379<dt>image_info</dt>
380<dd>the image info. </dd>
381
382<dd>  </dd>
383</dl>
384<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageInfoFile">GetImageInfoFile</a></h2>
385
386<p>GetImageInfoFile() returns the image info file member.</p>
387
388<p>The format of the GetImageInfoFile method is:</p>
389
390<pre class="text">
391FILE *GetImageInfoFile(const ImageInfo *image_info)
392</pre>
393
394<p>A description of each parameter follows:</p>
395
396<dd>
397</dd>
398
399<dd> </dd>
400<dl class="dl-horizontal">
401<dt>image_info</dt>
402<dd>the image info. </dd>
403
404<dd>  </dd>
405</dl>
406<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageMask">GetImageMask</a></h2>
407
408<p>GetImageMask() returns the mask associated with the image.</p>
409
410<p>The format of the GetImageMask method is:</p>
411
412<pre class="text">
413Image *GetImageMask(const Image *image,ExceptionInfo *exception)
414</pre>
415
416<p>A description of each parameter follows:</p>
417
418<dd>
419</dd>
420
421<dd> </dd>
422<dl class="dl-horizontal">
423<dt>image</dt>
424<dd>the image. </dd>
425
426<dd>  </dd>
427</dl>
428<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="GetImageVirtualPixelMethod">GetImageVirtualPixelMethod</a></h2>
429
430<p>GetImageVirtualPixelMethod() gets the "virtual pixels" method for the image.  A virtual pixel is any pixel access that is outside the boundaries of the image cache.</p>
431
432<p>The format of the GetImageVirtualPixelMethod() method is:</p>
433
434<pre class="text">
435VirtualPixelMethod GetImageVirtualPixelMethod(const Image *image)
436</pre>
437
438<p>A description of each parameter follows:</p>
439
440<dd>
441</dd>
442
443<dd> </dd>
444<dl class="dl-horizontal">
445<dt>image</dt>
446<dd>the image. </dd>
447
448<dd>  </dd>
449</dl>
450<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="InterpretImageFilename">InterpretImageFilename</a></h2>
451
452<p>InterpretImageFilename() interprets embedded characters in an image filename. The filename length is returned.</p>
453
454<p>The format of the InterpretImageFilename method is:</p>
455
456<pre class="text">
457size_t InterpretImageFilename(const ImageInfo *image_info,Image *image,
458  const char *format,int value,char *filename,ExceptionInfo *exception)
459</pre>
460
461<p>A description of each parameter follows.</p>
462
463<dt>image_info</dt>
464<p>the image info..</p>
465
466<dt>image</dt>
467<p>the image.</p>
468
469<dt>format</dt>
470<p>A filename describing the format to use to write the numeric argument. Only the first numeric format identifier is replaced.</p>
471
472<dt>value</dt>
473<p>Numeric value to substitute into format filename.</p>
474
475<dt>filename</dt>
476<p>return the formatted filename in this character buffer.</p>
477
478<dt>exception</dt>
479<p>return any errors or warnings in this structure.</p>
480
481<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="IsHighDynamicRangeImage">IsHighDynamicRangeImage</a></h2>
482
483<p>IsHighDynamicRangeImage() returns MagickTrue if any pixel component is non-integer or exceeds the bounds of the quantum depth (e.g. for Q16 0..65535.</p>
484
485<p>The format of the IsHighDynamicRangeImage method is:</p>
486
487<pre class="text">
488MagickBooleanType IsHighDynamicRangeImage(const Image *image,
489  ExceptionInfo *exception)
490</pre>
491
492<p>A description of each parameter follows:</p>
493
494<dd>
495</dd>
496
497<dd> </dd>
498<dl class="dl-horizontal">
499<dt>image</dt>
500<dd>the image. </dd>
501
502<dd> </dd>
503<dt>exception</dt>
504<dd>return any errors or warnings in this structure. </dd>
505
506<dd>  </dd>
507</dl>
508<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="IsImageObject">IsImageObject</a></h2>
509
510<p>IsImageObject() returns MagickTrue if the image sequence contains a valid set of image objects.</p>
511
512<p>The format of the IsImageObject method is:</p>
513
514<pre class="text">
515MagickBooleanType IsImageObject(const Image *image)
516</pre>
517
518<p>A description of each parameter follows:</p>
519
520<dd>
521</dd>
522
523<dd> </dd>
524<dl class="dl-horizontal">
525<dt>image</dt>
526<dd>the image. </dd>
527
528<dd>  </dd>
529</dl>
530<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="IsTaintImage">IsTaintImage</a></h2>
531
532<p>IsTaintImage() returns MagickTrue any pixel in the image has been altered since it was first constituted.</p>
533
534<p>The format of the IsTaintImage method is:</p>
535
536<pre class="text">
537MagickBooleanType IsTaintImage(const Image *image)
538</pre>
539
540<p>A description of each parameter follows:</p>
541
542<dd>
543</dd>
544
545<dd> </dd>
546<dl class="dl-horizontal">
547<dt>image</dt>
548<dd>the image. </dd>
549
550<dd>  </dd>
551</dl>
552<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="ModifyImage">ModifyImage</a></h2>
553
554<p>ModifyImage() ensures that there is only a single reference to the image to be modified, updating the provided image pointer to point to a clone of the original image if necessary.</p>
555
556<p>The format of the ModifyImage method is:</p>
557
558<pre class="text">
559MagickBooleanType ModifyImage(Image *image,ExceptionInfo *exception)
560</pre>
561
562<p>A description of each parameter follows:</p>
563
564<dd>
565</dd>
566
567<dd> </dd>
568<dl class="dl-horizontal">
569<dt>image</dt>
570<dd>the image. </dd>
571
572<dd> </dd>
573<dt>exception</dt>
574<dd>return any errors or warnings in this structure. </dd>
575
576<dd>  </dd>
577</dl>
578<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="NewMagickImage">NewMagickImage</a></h2>
579
580<p>NewMagickImage() creates a blank image canvas of the specified size and background color.</p>
581
582<p>The format of the NewMagickImage method is:</p>
583
584<pre class="text">
585Image *NewMagickImage(const ImageInfo *image_info,const size_t width,
586  const size_t height,const PixelInfo *background,
587  ExceptionInfo *exception)
588</pre>
589
590<p>A description of each parameter follows:</p>
591
592<dd>
593</dd>
594
595<dd> </dd>
596<dl class="dl-horizontal">
597<dt>image</dt>
598<dd>the image. </dd>
599
600<dd> </dd>
601<dt>width</dt>
602<dd>the image width. </dd>
603
604<dd> </dd>
605<dt>height</dt>
606<dd>the image height. </dd>
607
608<dd> </dd>
609<dt>background</dt>
610<dd>the image color. </dd>
611
612<dd> </dd>
613<dt>exception</dt>
614<dd>return any errors or warnings in this structure. </dd>
615
616<dd>  </dd>
617</dl>
618<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="ReferenceImage">ReferenceImage</a></h2>
619
620<p>ReferenceImage() increments the reference count associated with an image returning a pointer to the image.</p>
621
622<p>The format of the ReferenceImage method is:</p>
623
624<pre class="text">
625Image *ReferenceImage(Image *image)
626</pre>
627
628<p>A description of each parameter follows:</p>
629
630<dd>
631</dd>
632
633<dd> </dd>
634<dl class="dl-horizontal">
635<dt>image</dt>
636<dd>the image. </dd>
637
638<dd>  </dd>
639</dl>
640<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="ResetImagePage">ResetImagePage</a></h2>
641
642<p>ResetImagePage() resets the image page canvas and position.</p>
643
644<p>The format of the ResetImagePage method is:</p>
645
646<pre class="text">
647MagickBooleanType ResetImagePage(Image *image,const char *page)
648</pre>
649
650<p>A description of each parameter follows:</p>
651
652<dd>
653</dd>
654
655<dd> </dd>
656<dl class="dl-horizontal">
657<dt>image</dt>
658<dd>the image. </dd>
659
660<dd> </dd>
661<dt>page</dt>
662<dd>the relative page specification. </dd>
663
664<dd>  </dd>
665</dl>
666<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageBackgroundColor">SetImageBackgroundColor</a></h2>
667
668<p>SetImageBackgroundColor() initializes the image pixels to the image background color.  The background color is defined by the background_color member of the image structure.</p>
669
670<p>The format of the SetImage method is:</p>
671
672<pre class="text">
673MagickBooleanType SetImageBackgroundColor(Image *image,
674  ExceptionInfo *exception)
675</pre>
676
677<p>A description of each parameter follows:</p>
678
679<dd>
680</dd>
681
682<dd> </dd>
683<dl class="dl-horizontal">
684<dt>image</dt>
685<dd>the image. </dd>
686
687<dd> </dd>
688<dt>exception</dt>
689<dd>return any errors or warnings in this structure. </dd>
690
691<dd>  </dd>
692</dl>
693<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageChannelMask">SetImageChannelMask</a></h2>
694
695<p>SetImageChannelMask() sets the image channel mask from the specified channel mask.</p>
696
697<p>The format of the SetImageChannelMask method is:</p>
698
699<pre class="text">
700ChannelType SetImageChannelMask(Image *image,
701  const ChannelType channel_mask)
702</pre>
703
704<p>A description of each parameter follows:</p>
705
706<dd>
707</dd>
708
709<dd> </dd>
710<dl class="dl-horizontal">
711<dt>image</dt>
712<dd>the image. </dd>
713
714<dd> </dd>
715<dt>channel_mask</dt>
716<dd>the channel mask. </dd>
717
718<dd>  </dd>
719</dl>
720<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageColor">SetImageColor</a></h2>
721
722<p>SetImageColor() set the entire image canvas to the specified color.</p>
723
724<p>The format of the SetImageColor method is:</p>
725
726<pre class="text">
727MagickBooleanType SetImageColor(Image *image,const PixelInfo *color,
728  ExeptionInfo *exception)
729</pre>
730
731<p>A description of each parameter follows:</p>
732
733<dd>
734</dd>
735
736<dd> </dd>
737<dl class="dl-horizontal">
738<dt>image</dt>
739<dd>the image. </dd>
740
741<dd> </dd>
742<dt>background</dt>
743<dd>the image color. </dd>
744
745<dd> </dd>
746<dt>exception</dt>
747<dd>return any errors or warnings in this structure. </dd>
748
749<dd>  </dd>
750</dl>
751<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageStorageClass">SetImageStorageClass</a></h2>
752
753<p>SetImageStorageClass() sets the image class: DirectClass for true color images or PseudoClass for colormapped images.</p>
754
755<p>The format of the SetImageStorageClass method is:</p>
756
757<pre class="text">
758MagickBooleanType SetImageStorageClass(Image *image,
759  const ClassType storage_class,ExceptionInfo *exception)
760</pre>
761
762<p>A description of each parameter follows:</p>
763
764<dd>
765</dd>
766
767<dd> </dd>
768<dl class="dl-horizontal">
769<dt>image</dt>
770<dd>the image. </dd>
771
772<dd> </dd>
773<dt>storage_class</dt>
774<dd> The image class. </dd>
775
776<dd> </dd>
777<dt>exception</dt>
778<dd>return any errors or warnings in this structure. </dd>
779
780<dd>  </dd>
781</dl>
782<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageExtent">SetImageExtent</a></h2>
783
784<p>SetImageExtent() sets the image size (i.e. columns &amp; rows).</p>
785
786<p>The format of the SetImageExtent method is:</p>
787
788<pre class="text">
789MagickBooleanType SetImageExtent(Image *image,const size_t columns,
790  const size_t rows,ExceptionInfo *exception)
791</pre>
792
793<p>A description of each parameter follows:</p>
794
795<dd>
796</dd>
797
798<dd> </dd>
799<dl class="dl-horizontal">
800<dt>image</dt>
801<dd>the image. </dd>
802
803<dd> </dd>
804<dt>columns</dt>
805<dd> The image width in pixels. </dd>
806
807<dd> </dd>
808<dt>rows</dt>
809<dd> The image height in pixels. </dd>
810
811<dd> </dd>
812<dt>exception</dt>
813<dd>return any errors or warnings in this structure. </dd>
814
815<dd>  </dd>
816</dl>
817<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageInfoBlob">SetImageInfoBlob</a></h2>
818
819<p>SetImageInfoBlob() sets the image info blob member.</p>
820
821<p>The format of the SetImageInfoBlob method is:</p>
822
823<pre class="text">
824void SetImageInfoBlob(ImageInfo *image_info,const void *blob,
825  const size_t length)
826</pre>
827
828<p>A description of each parameter follows:</p>
829
830<dd>
831</dd>
832
833<dd> </dd>
834<dl class="dl-horizontal">
835<dt>image_info</dt>
836<dd>the image info. </dd>
837
838<dd> </dd>
839<dt>blob</dt>
840<dd>the blob. </dd>
841
842<dd> </dd>
843<dt>length</dt>
844<dd>the blob length. </dd>
845
846<dd>  </dd>
847</dl>
848<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageInfoFile">SetImageInfoFile</a></h2>
849
850<p>SetImageInfoFile() sets the image info file member.</p>
851
852<p>The format of the SetImageInfoFile method is:</p>
853
854<pre class="text">
855void SetImageInfoFile(ImageInfo *image_info,FILE *file)
856</pre>
857
858<p>A description of each parameter follows:</p>
859
860<dd>
861</dd>
862
863<dd> </dd>
864<dl class="dl-horizontal">
865<dt>image_info</dt>
866<dd>the image info. </dd>
867
868<dd> </dd>
869<dt>file</dt>
870<dd>the file. </dd>
871
872<dd>  </dd>
873</dl>
874<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageMask">SetImageMask</a></h2>
875
876<p>SetImageMask() associates a mask with the image.  The mask must be the same dimensions as the image.</p>
877
878<p>The format of the SetImageMask method is:</p>
879
880<pre class="text">
881MagickBooleanType SetImageMask(Image *image,const PixelMask type,
882  const Image *mask,ExceptionInfo *exception)
883</pre>
884
885<p>A description of each parameter follows:</p>
886
887<dd>
888</dd>
889
890<dd> </dd>
891<dl class="dl-horizontal">
892<dt>image</dt>
893<dd>the image. </dd>
894
895<dd> </dd>
896<dt>type</dt>
897<dd>the mask type, ReadPixelMask or WritePixelMask. </dd>
898
899<dd> </dd>
900<dt>mask</dt>
901<dd>the image mask. </dd>
902
903<dd> </dd>
904<dt>exception</dt>
905<dd>return any errors or warnings in this structure. </dd>
906
907<dd>  </dd>
908</dl>
909<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageAlpha">SetImageAlpha</a></h2>
910
911<p>SetImageAlpha() sets the alpha levels of the image.</p>
912
913<p>The format of the SetImageAlpha method is:</p>
914
915<pre class="text">
916MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha,
917  ExceptionInfo *exception)
918</pre>
919
920<p>A description of each parameter follows:</p>
921
922<dd>
923</dd>
924
925<dd> </dd>
926<dl class="dl-horizontal">
927<dt>image</dt>
928<dd>the image. </dd>
929
930<dd> </dd>
931<dt>Alpha</dt>
932<dd>the level of transparency: 0 is fully opaque and QuantumRange is fully transparent. </dd>
933
934<dd>  </dd>
935</dl>
936<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SetImageVirtualPixelMethod">SetImageVirtualPixelMethod</a></h2>
937
938<p>SetImageVirtualPixelMethod() sets the "virtual pixels" method for the image and returns the previous setting.  A virtual pixel is any pixel access that is outside the boundaries of the image cache.</p>
939
940<p>The format of the SetImageVirtualPixelMethod() method is:</p>
941
942<pre class="text">
943VirtualPixelMethod SetImageVirtualPixelMethod(Image *image,
944  const VirtualPixelMethod virtual_pixel_method,ExceptionInfo *exception)
945</pre>
946
947<p>A description of each parameter follows:</p>
948
949<dd>
950</dd>
951
952<dd> </dd>
953<dl class="dl-horizontal">
954<dt>image</dt>
955<dd>the image. </dd>
956
957<dd> </dd>
958<dt>virtual_pixel_method</dt>
959<dd>choose the type of virtual pixel. </dd>
960
961<dd> </dd>
962<dt>exception</dt>
963<dd>return any errors or warnings in this structure. </dd>
964
965<dd>  </dd>
966</dl>
967<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SmushImages">SmushImages</a></h2>
968
969<p>SmushImages() takes all images from the current image pointer to the end of the image list and smushes them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right.</p>
970
971<p>The current gravity setting now effects how the image is justified in the final image.</p>
972
973<p>The format of the SmushImages method is:</p>
974
975<pre class="text">
976Image *SmushImages(const Image *images,const MagickBooleanType stack,
977  ExceptionInfo *exception)
978</pre>
979
980<p>A description of each parameter follows:</p>
981
982<dd>
983</dd>
984
985<dd> </dd>
986<dl class="dl-horizontal">
987<dt>images</dt>
988<dd>the image sequence. </dd>
989
990<dd> </dd>
991<dt>stack</dt>
992<dd>A value other than 0 stacks the images top-to-bottom. </dd>
993
994<dd> </dd>
995<dt>offset</dt>
996<dd>minimum distance in pixels between images. </dd>
997
998<dd> </dd>
999<dt>exception</dt>
1000<dd>return any errors or warnings in this structure. </dd>
1001
1002<dd>  </dd>
1003</dl>
1004<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="StripImage">StripImage</a></h2>
1005
1006<p>StripImage() strips an image of all profiles and comments.</p>
1007
1008<p>The format of the StripImage method is:</p>
1009
1010<pre class="text">
1011MagickBooleanType StripImage(Image *image,ExceptionInfo *exception)
1012</pre>
1013
1014<p>A description of each parameter follows:</p>
1015
1016<dd>
1017</dd>
1018
1019<dd> </dd>
1020<dl class="dl-horizontal">
1021<dt>image</dt>
1022<dd>the image. </dd>
1023
1024<dd> </dd>
1025<dt>exception</dt>
1026<dd>return any errors or warnings in this structure. </dd>
1027
1028<dd>  </dd>
1029</dl>
1030<h2><a href="http://nextgen.imagemagick.org/api/MagickCore/image_8c.html" id="SyncImageSettings">SyncImageSettings</a></h2>
1031
1032<p>SyncImageSettings() syncs any image_info global options into per-image attributes.</p>
1033
1034<p>Note: in IMv6 free form 'options' were always mapped into 'artifacts', so that operations and coders can find such settings.  In IMv7 if a desired per-image artifact is not set, then it will directly look for a global option as a fallback, as such this copy is no longer needed, only the link set up.</p>
1035
1036<p>The format of the SyncImageSettings method is:</p>
1037
1038<pre class="text">
1039MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
1040  Image *image,ExceptionInfo *exception)
1041MagickBooleanType SyncImagesSettings(const ImageInfo *image_info,
1042  Image *image,ExceptionInfo *exception)
1043</pre>
1044
1045<p>A description of each parameter follows:</p>
1046
1047<dd>
1048</dd>
1049
1050<dd> </dd>
1051<dl class="dl-horizontal">
1052<dt>image_info</dt>
1053<dd>the image info. </dd>
1054
1055<dd> </dd>
1056<dt>image</dt>
1057<dd>the image. </dd>
1058
1059<dd> </dd>
1060<dt>exception</dt>
1061<dd>return any errors or warnings in this structure. </dd>
1062
1063<dd>  </dd>
1064</dl>
1065</div>
1066  <footer class="magick-footer">
1067    <p><a href="../script/support.php">Donate</a> •
1068     <a href="../script/sitemap.php">Sitemap</a> •
1069    <a href="../script/links.php">Related</a> •
1070    <a href="../script/architecture.php">Architecture</a>
1071</p>
1072    <p><a href="image.php#">Back to top</a> •
1073    <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> •
1074    <a href="../script/contact.php">Contact Us</a></p>
1075        <p><small1999-2016 ImageMagick Studio LLC</small></p>
1076  </footer>
1077</div><!-- /.container -->
1078
1079  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
1080  <script src="http://nextgen.imagemagick.org/js/magick.php"></script>
1081</div>
1082</body>
1083</html>
1084