• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!doctype html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width, initial-scale=1"  />
10  <title>ImageMagick - MagickCore, C API: Image Methods</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, and convert digital images. Resize an image, crop it, change its shades and colors, add captions, and more." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magickcore, c, api:, image, methods, image processing software" />
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-2020 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta property='og:url' content='../../' />
26  <meta property='og:title' content='ImageMagick' />
27  <meta property='og:image' content='../../../images/logo.png' />
28  <meta property='og:type' content='website' />
29  <meta property='og:site_name' content='ImageMagick' />
30  <meta property='og:description' content="Create, Edit, Compose, or Convert Digital Images" />
31  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
32  <link href="image.html" rel="canonical" />
33  <link href="../../../images/wand.png" rel="icon" />
34  <link href="../../../images/wand.ico" rel="shortcut icon" />
35  <link href="../../assets/magick.css" rel="stylesheet" />
36</head>
37<body>
38  <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
39  <div class="container-fluid">
40    <a class="navbar-brand" href="../../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../../../images/wand.ico"/></a>
41    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#magick-navbars" aria-controls="magick-navbars" aria-expanded="false" aria-label="Toggle navigation">
42      <span class="navbar-toggler-icon"></span>
43    </button>
44
45    <div class="collapse navbar-collapse" id="magick-navbars">
46      <ul class="navbar-nav me-auto mb-2 mb-md-0">
47        <li class="nav-item">
48          <a class="nav-link " href="../../www/index.html">Home</a>
49        </li>
50        <li class="nav-item">
51          <a class="nav-link " href="../../www/download.html">Download</a>
52        </li>
53        <li class="nav-item">
54          <a class="nav-link " href="../../www/command-line-tools.html">Tools</a>
55        </li>
56        <li class="nav-item">
57          <a class="nav-link " href="../../www/command-line-processing.html">CLI</a>
58        </li>
59        <li class="nav-item">
60          <a class="nav-link " href="../../www/develop.html">Develop</a>
61        </li>
62        <li class="nav-item">
63          <a class="nav-link" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
64        </li>
65        <li class="nav-item">
66          <iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe>
67        </li>
68      </ul>
69      <form class="d-flex form-inline" action="https://imagemagick.org/script/search.php">
70        <input class="form-control me-2" type="text" name="q" placeholder="Search" aria-label="Search">
71        <button class="btn btn-outline-success" type="submit" name="sa">Search</button>
72      </form>
73    </div>
74  </div>
75  </nav>
76
77  <div class="container">
78    <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>
79    <ins class="adsbygoogle"
80      style="display:block"
81      data-ad-client="ca-pub-3129977114552745"
82      data-ad-slot="6345125851"
83      data-full-width-responsive="true"
84      data-ad-format="horizontal"></ins>
85    <script>
86      (adsbygoogle = window.adsbygoogle || []).push({});
87    </script>
88
89  </div>
90
91  <main class="container">
92  <div class="magick-template">
93<div class="magick-header">
94<p class="text-center"><a href="image.html#AcquireImage">AcquireImage</a> &#8226; <a href="image.html#AcquireImageInfo">AcquireImageInfo</a> &#8226; <a href="image.html#AcquireNextImage">AcquireNextImage</a> &#8226; <a href="image.html#AppendImages">AppendImages</a> &#8226; <a href="image.html#CatchImageException">CatchImageException</a> &#8226; <a href="image.html#ClipImagePath">ClipImagePath</a> &#8226; <a href="image.html#CloneImage">CloneImage</a> &#8226; <a href="image.html#CloneImageInfo">CloneImageInfo</a> &#8226; <a href="image.html#CopyImagePixels">CopyImagePixels</a> &#8226; <a href="image.html#DestroyImage">DestroyImage</a> &#8226; <a href="image.html#DestroyImageInfo">DestroyImageInfo</a> &#8226; <a href="image.html#GetImageInfo">GetImageInfo</a> &#8226; <a href="image.html#GetImageInfoFile">GetImageInfoFile</a> &#8226; <a href="image.html#GetImageMask">GetImageMask</a> &#8226; <a href="image.html#GetImageVirtualPixelMethod">GetImageVirtualPixelMethod</a> &#8226; <a href="image.html#InterpretImageFilename">InterpretImageFilename</a> &#8226; <a href="image.html#IsHighDynamicRangeImage">IsHighDynamicRangeImage</a> &#8226; <a href="image.html#IsImageObject">IsImageObject</a> &#8226; <a href="image.html#IsTaintImage">IsTaintImage</a> &#8226; <a href="image.html#ModifyImage">ModifyImage</a> &#8226; <a href="image.html#NewMagickImage">NewMagickImage</a> &#8226; <a href="image.html#ReferenceImage">ReferenceImage</a> &#8226; <a href="image.html#ResetImagePage">ResetImagePage</a> &#8226; <a href="image.html#ResetImagePixels">ResetImagePixels</a> &#8226; <a href="image.html#SetImageAlpha">SetImageAlpha</a> &#8226; <a href="image.html#SetImageBackgroundColor">SetImageBackgroundColor</a> &#8226; <a href="image.html#SetImageChannelMask">SetImageChannelMask</a> &#8226; <a href="image.html#SetImageColor">SetImageColor</a> &#8226; <a href="image.html#SetImageStorageClass">SetImageStorageClass</a> &#8226; <a href="image.html#SetImageExtent">SetImageExtent</a> &#8226; <a href="image.html#SetImageInfoBlob">SetImageInfoBlob</a> &#8226; <a href="image.html#SetImageInfoCustomStream">SetImageInfoCustomStream</a> &#8226; <a href="image.html#SetImageInfoFile">SetImageInfoFile</a> &#8226; <a href="image.html#SetImageMask">SetImageMask</a> &#8226; <a href="image.html#SetImageRegionMask">SetImageRegionMask</a> &#8226; <a href="image.html#SetImageVirtualPixelMethod">SetImageVirtualPixelMethod</a> &#8226; <a href="image.html#SmushImages">SmushImages</a> &#8226; <a href="image.html#StripImage">StripImage</a> &#8226; <a href="image.html#SyncImageSettings">SyncImageSettings</a></p>
95
96<h2><a href="../../api/MagickCore/image_8c.html" id="AcquireImage">AcquireImage</a></h2>
97
98<p>AcquireImage() returns a pointer to an image structure initialized to default values.</p>
99
100<p>The format of the AcquireImage method is:</p>
101
102<pre class="text">
103Image *AcquireImage(const ImageInfo *image_info,ExceptionInfo *exception)
104</pre>
105
106<p>A description of each parameter follows:</p>
107
108<dd>
109</dd>
110
111<dd> </dd>
112<dl class="dl-horizontal">
113<dt>image_info</dt>
114<dd>Many of the image default values are set from this structure.  For example, filename, compression, depth, background color, and others. </dd>
115
116<dd> </dd>
117<dt>exception</dt>
118<dd>return any errors or warnings in this structure. </dd>
119
120<dd>  </dd>
121</dl>
122<h2><a href="../../api/MagickCore/image_8c.html" id="AcquireImageInfo">AcquireImageInfo</a></h2>
123
124<p>AcquireImageInfo() allocates the ImageInfo structure.</p>
125
126<p>The format of the AcquireImageInfo method is:</p>
127
128<pre class="text">
129ImageInfo *AcquireImageInfo(void)
130</pre>
131
132<h2><a href="../../api/MagickCore/image_8c.html" id="AcquireNextImage">AcquireNextImage</a></h2>
133
134<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>
135
136<p>The format of the AcquireNextImage method is:</p>
137
138<pre class="text">
139void AcquireNextImage(const ImageInfo *image_info,Image *image,
140  ExceptionInfo *exception)
141</pre>
142
143<p>A description of each parameter follows:</p>
144
145<dd>
146</dd>
147
148<dd> </dd>
149<dl class="dl-horizontal">
150<dt>image_info</dt>
151<dd>Many of the image default values are set from this structure.  For example, filename, compression, depth, background color, and others. </dd>
152
153<dd> </dd>
154<dt>image</dt>
155<dd>the image. </dd>
156
157<dd> </dd>
158<dt>exception</dt>
159<dd>return any errors or warnings in this structure. </dd>
160
161<dd>  </dd>
162</dl>
163<h2><a href="../../api/MagickCore/image_8c.html" id="AppendImages">AppendImages</a></h2>
164
165<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>
166
167<p>The current gravity setting effects how the image is justified in the final image.</p>
168
169<p>The format of the AppendImages method is:</p>
170
171<pre class="text">
172Image *AppendImages(const Image *images,const MagickBooleanType stack,
173  ExceptionInfo *exception)
174</pre>
175
176<p>A description of each parameter follows:</p>
177
178<dd>
179</dd>
180
181<dd> </dd>
182<dl class="dl-horizontal">
183<dt>images</dt>
184<dd>the image sequence. </dd>
185
186<dd> </dd>
187<dt>stack</dt>
188<dd>A value other than 0 stacks the images top-to-bottom. </dd>
189
190<dd> </dd>
191<dt>exception</dt>
192<dd>return any errors or warnings in this structure. </dd>
193
194<dd>  </dd>
195</dl>
196<h2><a href="../../api/MagickCore/image_8c.html" id="CatchImageException">CatchImageException</a></h2>
197
198<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>
199
200<p>The format of the CatchImageException method is:</p>
201
202<pre class="text">
203ExceptionType CatchImageException(Image *image)
204</pre>
205
206<p>A description of each parameter follows:</p>
207
208<dd>
209</dd>
210
211<dd> </dd>
212<dl class="dl-horizontal">
213<dt>image</dt>
214<dd>An image sequence. </dd>
215
216<dd>  </dd>
217</dl>
218<h2><a href="../../api/MagickCore/image_8c.html" id="ClipImagePath">ClipImagePath</a></h2>
219
220<p>ClipImagePath() sets the image clip mask based any clipping path information if it exists.</p>
221
222<p>The format of the ClipImagePath method is:</p>
223
224<pre class="text">
225MagickBooleanType ClipImagePath(Image *image,const char *pathname,
226  const MagickBooleanType inside,ExceptionInfo *exception)
227</pre>
228
229<p>A description of each parameter follows:</p>
230
231<dd>
232</dd>
233
234<dd> </dd>
235<dl class="dl-horizontal">
236<dt>image</dt>
237<dd>the image. </dd>
238
239<dd> </dd>
240<dt>pathname</dt>
241<dd>name of clipping path resource. If name is preceded by #, use clipping path numbered by name. </dd>
242
243<dd> </dd>
244<dt>inside</dt>
245<dd>if non-zero, later operations take effect inside clipping path. Otherwise later operations take effect outside clipping path. </dd>
246
247<dd> </dd>
248<dt>exception</dt>
249<dd>return any errors or warnings in this structure. </dd>
250
251<dd>  </dd>
252</dl>
253<h2><a href="../../api/MagickCore/image_8c.html" id="CloneImage">CloneImage</a></h2>
254
255<p>CloneImage() copies an image and returns the copy as a new image object.</p>
256
257<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>
258
259<p>The format of the CloneImage method is:</p>
260
261<pre class="text">
262Image *CloneImage(const Image *image,const size_t columns,
263  const size_t rows,const MagickBooleanType orphan,
264  ExceptionInfo *exception)
265</pre>
266
267<p>A description of each parameter follows:</p>
268
269<dd>
270</dd>
271
272<dd> </dd>
273<dl class="dl-horizontal">
274<dt>image</dt>
275<dd>the image. </dd>
276
277<dd> </dd>
278<dt>columns</dt>
279<dd>the number of columns in the cloned image. </dd>
280
281<dd> </dd>
282<dt>rows</dt>
283<dd>the number of rows in the cloned image. </dd>
284
285<dd> </dd>
286<dt>detach</dt>
287<dd> With a value other than 0, the cloned image is detached from its parent I/O stream. </dd>
288
289<dd> </dd>
290<dt>exception</dt>
291<dd>return any errors or warnings in this structure. </dd>
292
293<dd>  </dd>
294</dl>
295<h2><a href="../../api/MagickCore/image_8c.html" id="CloneImageInfo">CloneImageInfo</a></h2>
296
297<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>
298
299<p>The format of the CloneImageInfo method is:</p>
300
301<pre class="text">
302ImageInfo *CloneImageInfo(const ImageInfo *image_info)
303</pre>
304
305<p>A description of each parameter follows:</p>
306
307<dd>
308</dd>
309
310<dd> </dd>
311<dl class="dl-horizontal">
312<dt>image_info</dt>
313<dd>the image info. </dd>
314
315<dd>  </dd>
316</dl>
317<h2><a href="../../api/MagickCore/image_8c.html" id="CopyImagePixels">CopyImagePixels</a></h2>
318
319<p>CopyImagePixels() copies pixels from the source image as defined by the geometry the destination image at the specified offset.</p>
320
321<p>The format of the CopyImagePixels method is:</p>
322
323<pre class="text">
324MagickBooleanType CopyImagePixels(Image *image,const Image *source_image,
325  const RectangleInfo *geometry,const OffsetInfo *offset,
326  ExceptionInfo *exception);
327</pre>
328
329<p>A description of each parameter follows:</p>
330
331<dd>
332</dd>
333
334<dd> </dd>
335<dl class="dl-horizontal">
336<dt>image</dt>
337<dd>the destination image. </dd>
338
339<dd> </dd>
340<dt>source_image</dt>
341<dd>the source image. </dd>
342
343<dd> </dd>
344<dt>geometry</dt>
345<dd>define the dimensions of the source pixel rectangle. </dd>
346
347<dd> </dd>
348<dt>offset</dt>
349<dd>define the offset in the destination image. </dd>
350
351<dd> </dd>
352<dt>exception</dt>
353<dd>return any errors or warnings in this structure. </dd>
354
355<dd>  </dd>
356</dl>
357<h2><a href="../../api/MagickCore/image_8c.html" id="DestroyImage">DestroyImage</a></h2>
358
359<p>DestroyImage() dereferences an image, deallocating memory associated with the image if the reference count becomes zero.</p>
360
361<p>The format of the DestroyImage method is:</p>
362
363<pre class="text">
364Image *DestroyImage(Image *image)
365</pre>
366
367<p>A description of each parameter follows:</p>
368
369<dd>
370</dd>
371
372<dd> </dd>
373<dl class="dl-horizontal">
374<dt>image</dt>
375<dd>the image. </dd>
376
377<dd>  </dd>
378</dl>
379<h2><a href="../../api/MagickCore/image_8c.html" id="DestroyImageInfo">DestroyImageInfo</a></h2>
380
381<p>DestroyImageInfo() deallocates memory associated with an ImageInfo structure.</p>
382
383<p>The format of the DestroyImageInfo method is:</p>
384
385<pre class="text">
386ImageInfo *DestroyImageInfo(ImageInfo *image_info)
387</pre>
388
389<p>A description of each parameter follows:</p>
390
391<dd>
392</dd>
393
394<dd> </dd>
395<dl class="dl-horizontal">
396<dt>image_info</dt>
397<dd>the image info. </dd>
398
399<dd>  </dd>
400</dl>
401<h2><a href="../../api/MagickCore/image_8c.html" id="GetImageInfo">GetImageInfo</a></h2>
402
403<p>GetImageInfo() initializes image_info to default values.</p>
404
405<p>The format of the GetImageInfo method is:</p>
406
407<pre class="text">
408void GetImageInfo(ImageInfo *image_info)
409</pre>
410
411<p>A description of each parameter follows:</p>
412
413<dd>
414</dd>
415
416<dd> </dd>
417<dl class="dl-horizontal">
418<dt>image_info</dt>
419<dd>the image info. </dd>
420
421<dd>  </dd>
422</dl>
423<h2><a href="../../api/MagickCore/image_8c.html" id="GetImageInfoFile">GetImageInfoFile</a></h2>
424
425<p>GetImageInfoFile() returns the image info file member.</p>
426
427<p>The format of the GetImageInfoFile method is:</p>
428
429<pre class="text">
430FILE *GetImageInfoFile(const ImageInfo *image_info)
431</pre>
432
433<p>A description of each parameter follows:</p>
434
435<dd>
436</dd>
437
438<dd> </dd>
439<dl class="dl-horizontal">
440<dt>image_info</dt>
441<dd>the image info. </dd>
442
443<dd>  </dd>
444</dl>
445<h2><a href="../../api/MagickCore/image_8c.html" id="GetImageMask">GetImageMask</a></h2>
446
447<p>GetImageMask() returns the mask associated with the image.</p>
448
449<p>The format of the GetImageMask method is:</p>
450
451<pre class="text">
452Image *GetImageMask(const Image *image,const PixelMask type,
453  ExceptionInfo *exception)
454</pre>
455
456<p>A description of each parameter follows:</p>
457
458<dd>
459</dd>
460
461<dd> </dd>
462<dl class="dl-horizontal">
463<dt>image</dt>
464<dd>the image. </dd>
465
466<dd> </dd>
467<dt>type</dt>
468<dd>the mask type, ReadPixelMask or WritePixelMask. </dd>
469
470<dd>  </dd>
471</dl>
472<h2><a href="../../api/MagickCore/image_8c.html" id="GetImageVirtualPixelMethod">GetImageVirtualPixelMethod</a></h2>
473
474<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>
475
476<p>The format of the GetImageVirtualPixelMethod() method is:</p>
477
478<pre class="text">
479VirtualPixelMethod GetImageVirtualPixelMethod(const Image *image)
480</pre>
481
482<p>A description of each parameter follows:</p>
483
484<dd>
485</dd>
486
487<dd> </dd>
488<dl class="dl-horizontal">
489<dt>image</dt>
490<dd>the image. </dd>
491
492<dd>  </dd>
493</dl>
494<h2><a href="../../api/MagickCore/image_8c.html" id="InterpretImageFilename">InterpretImageFilename</a></h2>
495
496<p>InterpretImageFilename() interprets embedded characters in an image filename. The filename length is returned.</p>
497
498<p>The format of the InterpretImageFilename method is:</p>
499
500<pre class="text">
501size_t InterpretImageFilename(const ImageInfo *image_info,Image *image,
502  const char *format,int value,char *filename,ExceptionInfo *exception)
503</pre>
504
505<p>A description of each parameter follows.</p>
506
507<dt>image_info</dt>
508<p>the image info..</p>
509
510<dt>image</dt>
511<p>the image.</p>
512
513<dt>format</dt>
514<p>A filename describing the format to use to write the numeric argument. Only the first numeric format identifier is replaced.</p>
515
516<dt>value</dt>
517<p>Numeric value to substitute into format filename.</p>
518
519<dt>filename</dt>
520<p>return the formatted filename in this character buffer.</p>
521
522<dt>exception</dt>
523<p>return any errors or warnings in this structure.</p>
524
525<h2><a href="../../api/MagickCore/image_8c.html" id="IsHighDynamicRangeImage">IsHighDynamicRangeImage</a></h2>
526
527<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>
528
529<p>The format of the IsHighDynamicRangeImage method is:</p>
530
531<pre class="text">
532MagickBooleanType IsHighDynamicRangeImage(const Image *image,
533  ExceptionInfo *exception)
534</pre>
535
536<p>A description of each parameter follows:</p>
537
538<dd>
539</dd>
540
541<dd> </dd>
542<dl class="dl-horizontal">
543<dt>image</dt>
544<dd>the image. </dd>
545
546<dd> </dd>
547<dt>exception</dt>
548<dd>return any errors or warnings in this structure. </dd>
549
550<dd>  </dd>
551</dl>
552<h2><a href="../../api/MagickCore/image_8c.html" id="IsImageObject">IsImageObject</a></h2>
553
554<p>IsImageObject() returns MagickTrue if the image sequence contains a valid set of image objects.</p>
555
556<p>The format of the IsImageObject method is:</p>
557
558<pre class="text">
559MagickBooleanType IsImageObject(const Image *image)
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</dl>
574<h2><a href="../../api/MagickCore/image_8c.html" id="IsTaintImage">IsTaintImage</a></h2>
575
576<p>IsTaintImage() returns MagickTrue any pixel in the image has been altered since it was first constituted.</p>
577
578<p>The format of the IsTaintImage method is:</p>
579
580<pre class="text">
581MagickBooleanType IsTaintImage(const Image *image)
582</pre>
583
584<p>A description of each parameter follows:</p>
585
586<dd>
587</dd>
588
589<dd> </dd>
590<dl class="dl-horizontal">
591<dt>image</dt>
592<dd>the image. </dd>
593
594<dd>  </dd>
595</dl>
596<h2><a href="../../api/MagickCore/image_8c.html" id="ModifyImage">ModifyImage</a></h2>
597
598<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>
599
600<p>The format of the ModifyImage method is:</p>
601
602<pre class="text">
603MagickBooleanType ModifyImage(Image *image,ExceptionInfo *exception)
604</pre>
605
606<p>A description of each parameter follows:</p>
607
608<dd>
609</dd>
610
611<dd> </dd>
612<dl class="dl-horizontal">
613<dt>image</dt>
614<dd>the image. </dd>
615
616<dd> </dd>
617<dt>exception</dt>
618<dd>return any errors or warnings in this structure. </dd>
619
620<dd>  </dd>
621</dl>
622<h2><a href="../../api/MagickCore/image_8c.html" id="NewMagickImage">NewMagickImage</a></h2>
623
624<p>NewMagickImage() creates a blank image canvas of the specified size and background color.</p>
625
626<p>The format of the NewMagickImage method is:</p>
627
628<pre class="text">
629Image *NewMagickImage(const ImageInfo *image_info,const size_t width,
630  const size_t height,const PixelInfo *background,
631  ExceptionInfo *exception)
632</pre>
633
634<p>A description of each parameter follows:</p>
635
636<dd>
637</dd>
638
639<dd> </dd>
640<dl class="dl-horizontal">
641<dt>image</dt>
642<dd>the image. </dd>
643
644<dd> </dd>
645<dt>width</dt>
646<dd>the image width. </dd>
647
648<dd> </dd>
649<dt>height</dt>
650<dd>the image height. </dd>
651
652<dd> </dd>
653<dt>background</dt>
654<dd>the image color. </dd>
655
656<dd> </dd>
657<dt>exception</dt>
658<dd>return any errors or warnings in this structure. </dd>
659
660<dd>  </dd>
661</dl>
662<h2><a href="../../api/MagickCore/image_8c.html" id="ReferenceImage">ReferenceImage</a></h2>
663
664<p>ReferenceImage() increments the reference count associated with an image returning a pointer to the image.</p>
665
666<p>The format of the ReferenceImage method is:</p>
667
668<pre class="text">
669Image *ReferenceImage(Image *image)
670</pre>
671
672<p>A description of each parameter follows:</p>
673
674<dd>
675</dd>
676
677<dd> </dd>
678<dl class="dl-horizontal">
679<dt>image</dt>
680<dd>the image. </dd>
681
682<dd>  </dd>
683</dl>
684<h2><a href="../../api/MagickCore/image_8c.html" id="ResetImagePage">ResetImagePage</a></h2>
685
686<p>ResetImagePage() resets the image page canvas and position.</p>
687
688<p>The format of the ResetImagePage method is:</p>
689
690<pre class="text">
691MagickBooleanType ResetImagePage(Image *image,const char *page)
692</pre>
693
694<p>A description of each parameter follows:</p>
695
696<dd>
697</dd>
698
699<dd> </dd>
700<dl class="dl-horizontal">
701<dt>image</dt>
702<dd>the image. </dd>
703
704<dd> </dd>
705<dt>page</dt>
706<dd>the relative page specification. </dd>
707
708<dd>  </dd>
709</dl>
710<h2><a href="../../api/MagickCore/image_8c.html" id="ResetImagePixels">ResetImagePixels</a></h2>
711
712<p>ResetImagePixels() reset the image pixels, that is, all the pixel components are zereod.</p>
713
714<p>The format of the SetImage method is:</p>
715
716<pre class="text">
717MagickBooleanType ResetImagePixels(Image *image,
718  ExceptionInfo *exception)
719</pre>
720
721<p>A description of each parameter follows:</p>
722
723<dd>
724</dd>
725
726<dd> </dd>
727<dl class="dl-horizontal">
728<dt>image</dt>
729<dd>the image. </dd>
730
731<dd> </dd>
732<dt>exception</dt>
733<dd>return any errors or warnings in this structure. </dd>
734
735<dd>  </dd>
736</dl>
737<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageAlpha">SetImageAlpha</a></h2>
738
739<p>SetImageAlpha() sets the alpha levels of the image.</p>
740
741<p>The format of the SetImageAlpha method is:</p>
742
743<pre class="text">
744MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha,
745  ExceptionInfo *exception)
746</pre>
747
748<p>A description of each parameter follows:</p>
749
750<dd>
751</dd>
752
753<dd> </dd>
754<dl class="dl-horizontal">
755<dt>image</dt>
756<dd>the image. </dd>
757
758<dd> </dd>
759<dt>alpha</dt>
760<dd>the level of transparency: 0 is fully transparent and QuantumRange is fully opaque. </dd>
761
762<dd> </dd>
763<dt>exception</dt>
764<dd>return any errors or warnings in this structure. </dd>
765
766<dd>  </dd>
767</dl>
768<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageBackgroundColor">SetImageBackgroundColor</a></h2>
769
770<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>
771
772<p>The format of the SetImage method is:</p>
773
774<pre class="text">
775MagickBooleanType SetImageBackgroundColor(Image *image,
776  ExceptionInfo *exception)
777</pre>
778
779<p>A description of each parameter follows:</p>
780
781<dd>
782</dd>
783
784<dd> </dd>
785<dl class="dl-horizontal">
786<dt>image</dt>
787<dd>the image. </dd>
788
789<dd> </dd>
790<dt>exception</dt>
791<dd>return any errors or warnings in this structure. </dd>
792
793<dd>  </dd>
794</dl>
795<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageChannelMask">SetImageChannelMask</a></h2>
796
797<p>SetImageChannelMask() sets the image channel mask from the specified channel mask.</p>
798
799<p>The format of the SetImageChannelMask method is:</p>
800
801<pre class="text">
802ChannelType SetImageChannelMask(Image *image,
803  const ChannelType channel_mask)
804</pre>
805
806<p>A description of each parameter follows:</p>
807
808<dd>
809</dd>
810
811<dd> </dd>
812<dl class="dl-horizontal">
813<dt>image</dt>
814<dd>the image. </dd>
815
816<dd> </dd>
817<dt>channel_mask</dt>
818<dd>the channel mask. </dd>
819
820<dd>  </dd>
821</dl>
822<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageColor">SetImageColor</a></h2>
823
824<p>SetImageColor() set the entire image canvas to the specified color.</p>
825
826<p>The format of the SetImageColor method is:</p>
827
828<pre class="text">
829MagickBooleanType SetImageColor(Image *image,const PixelInfo *color,
830  ExeptionInfo *exception)
831</pre>
832
833<p>A description of each parameter follows:</p>
834
835<dd>
836</dd>
837
838<dd> </dd>
839<dl class="dl-horizontal">
840<dt>image</dt>
841<dd>the image. </dd>
842
843<dd> </dd>
844<dt>background</dt>
845<dd>the image color. </dd>
846
847<dd> </dd>
848<dt>exception</dt>
849<dd>return any errors or warnings in this structure. </dd>
850
851<dd>  </dd>
852</dl>
853<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageStorageClass">SetImageStorageClass</a></h2>
854
855<p>SetImageStorageClass() sets the image class: DirectClass for true color images or PseudoClass for colormapped images.</p>
856
857<p>The format of the SetImageStorageClass method is:</p>
858
859<pre class="text">
860MagickBooleanType SetImageStorageClass(Image *image,
861  const ClassType storage_class,ExceptionInfo *exception)
862</pre>
863
864<p>A description of each parameter follows:</p>
865
866<dd>
867</dd>
868
869<dd> </dd>
870<dl class="dl-horizontal">
871<dt>image</dt>
872<dd>the image. </dd>
873
874<dd> </dd>
875<dt>storage_class</dt>
876<dd> The image class. </dd>
877
878<dd> </dd>
879<dt>exception</dt>
880<dd>return any errors or warnings in this structure. </dd>
881
882<dd>  </dd>
883</dl>
884<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageExtent">SetImageExtent</a></h2>
885
886<p>SetImageExtent() sets the image size (i.e. columns &amp; rows).</p>
887
888<p>The format of the SetImageExtent method is:</p>
889
890<pre class="text">
891MagickBooleanType SetImageExtent(Image *image,const size_t columns,
892  const size_t rows,ExceptionInfo *exception)
893</pre>
894
895<p>A description of each parameter follows:</p>
896
897<dd>
898</dd>
899
900<dd> </dd>
901<dl class="dl-horizontal">
902<dt>image</dt>
903<dd>the image. </dd>
904
905<dd> </dd>
906<dt>columns</dt>
907<dd> The image width in pixels. </dd>
908
909<dd> </dd>
910<dt>rows</dt>
911<dd> The image height in pixels. </dd>
912
913<dd> </dd>
914<dt>exception</dt>
915<dd>return any errors or warnings in this structure. </dd>
916
917<dd>  </dd>
918</dl>
919<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageInfoBlob">SetImageInfoBlob</a></h2>
920
921<p>SetImageInfoBlob() sets the image info blob member.</p>
922
923<p>The format of the SetImageInfoBlob method is:</p>
924
925<pre class="text">
926void SetImageInfoBlob(ImageInfo *image_info,const void *blob,
927  const size_t length)
928</pre>
929
930<p>A description of each parameter follows:</p>
931
932<dd>
933</dd>
934
935<dd> </dd>
936<dl class="dl-horizontal">
937<dt>image_info</dt>
938<dd>the image info. </dd>
939
940<dd> </dd>
941<dt>blob</dt>
942<dd>the blob. </dd>
943
944<dd> </dd>
945<dt>length</dt>
946<dd>the blob length. </dd>
947
948<dd>  </dd>
949</dl>
950<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageInfoCustomStream">SetImageInfoCustomStream</a></h2>
951
952<p>SetImageInfoCustomStream() sets the image info custom stream handlers.</p>
953
954<p>The format of the SetImageInfoCustomStream method is:</p>
955
956<pre class="text">
957void SetImageInfoCustomStream(ImageInfo *image_info,
958  CustomStreamInfo *custom_stream)
959</pre>
960
961<p>A description of each parameter follows:</p>
962
963<dd>
964</dd>
965
966<dd> </dd>
967<dl class="dl-horizontal">
968<dt>image_info</dt>
969<dd>the image info. </dd>
970
971<dd> </dd>
972<dt>custom_stream</dt>
973<dd>your custom stream methods. </dd>
974
975<dd>  </dd>
976</dl>
977<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageInfoFile">SetImageInfoFile</a></h2>
978
979<p>SetImageInfoFile() sets the image info file member.</p>
980
981<p>The format of the SetImageInfoFile method is:</p>
982
983<pre class="text">
984void SetImageInfoFile(ImageInfo *image_info,FILE *file)
985</pre>
986
987<p>A description of each parameter follows:</p>
988
989<dd>
990</dd>
991
992<dd> </dd>
993<dl class="dl-horizontal">
994<dt>image_info</dt>
995<dd>the image info. </dd>
996
997<dd> </dd>
998<dt>file</dt>
999<dd>the file. </dd>
1000
1001<dd>  </dd>
1002</dl>
1003<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageMask">SetImageMask</a></h2>
1004
1005<p>SetImageMask() associates a mask with the image.  The mask must be the same dimensions as the image.</p>
1006
1007<p>The format of the SetImageMask method is:</p>
1008
1009<pre class="text">
1010MagickBooleanType SetImageMask(Image *image,const PixelMask type,
1011  const Image *mask,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>type</dt>
1026<dd>the mask type, ReadPixelMask or WritePixelMask. </dd>
1027
1028<dd> </dd>
1029<dt>mask</dt>
1030<dd>the image mask. </dd>
1031
1032<dd> </dd>
1033<dt>exception</dt>
1034<dd>return any errors or warnings in this structure. </dd>
1035
1036<dd>  </dd>
1037</dl>
1038<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageRegionMask">SetImageRegionMask</a></h2>
1039
1040<p>SetImageRegionMask() associates a mask with the image as defined by the specified region.</p>
1041
1042<p>The format of the SetImageRegionMask method is:</p>
1043
1044<pre class="text">
1045MagickBooleanType SetImageRegionMask(Image *image,const PixelMask type,
1046  const RectangleInfo *region,ExceptionInfo *exception)
1047</pre>
1048
1049<p>A description of each parameter follows:</p>
1050
1051<dd>
1052</dd>
1053
1054<dd> </dd>
1055<dl class="dl-horizontal">
1056<dt>image</dt>
1057<dd>the image. </dd>
1058
1059<dd> </dd>
1060<dt>type</dt>
1061<dd>the mask type, ReadPixelMask or WritePixelMask. </dd>
1062
1063<dd> </dd>
1064<dt>geometry</dt>
1065<dd>the mask region. </dd>
1066
1067<dd> </dd>
1068<dt>exception</dt>
1069<dd>return any errors or warnings in this structure. </dd>
1070
1071<dd>  </dd>
1072</dl>
1073<h2><a href="../../api/MagickCore/image_8c.html" id="SetImageVirtualPixelMethod">SetImageVirtualPixelMethod</a></h2>
1074
1075<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>
1076
1077<p>The format of the SetImageVirtualPixelMethod() method is:</p>
1078
1079<pre class="text">
1080VirtualPixelMethod SetImageVirtualPixelMethod(Image *image,
1081  const VirtualPixelMethod virtual_pixel_method,ExceptionInfo *exception)
1082</pre>
1083
1084<p>A description of each parameter follows:</p>
1085
1086<dd>
1087</dd>
1088
1089<dd> </dd>
1090<dl class="dl-horizontal">
1091<dt>image</dt>
1092<dd>the image. </dd>
1093
1094<dd> </dd>
1095<dt>virtual_pixel_method</dt>
1096<dd>choose the type of virtual pixel. </dd>
1097
1098<dd> </dd>
1099<dt>exception</dt>
1100<dd>return any errors or warnings in this structure. </dd>
1101
1102<dd>  </dd>
1103</dl>
1104<h2><a href="../../api/MagickCore/image_8c.html" id="SmushImages">SmushImages</a></h2>
1105
1106<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>
1107
1108<p>The current gravity setting now effects how the image is justified in the final image.</p>
1109
1110<p>The format of the SmushImages method is:</p>
1111
1112<pre class="text">
1113Image *SmushImages(const Image *images,const MagickBooleanType stack,
1114  ExceptionInfo *exception)
1115</pre>
1116
1117<p>A description of each parameter follows:</p>
1118
1119<dd>
1120</dd>
1121
1122<dd> </dd>
1123<dl class="dl-horizontal">
1124<dt>images</dt>
1125<dd>the image sequence. </dd>
1126
1127<dd> </dd>
1128<dt>stack</dt>
1129<dd>A value other than 0 stacks the images top-to-bottom. </dd>
1130
1131<dd> </dd>
1132<dt>offset</dt>
1133<dd>minimum distance in pixels between images. </dd>
1134
1135<dd> </dd>
1136<dt>exception</dt>
1137<dd>return any errors or warnings in this structure. </dd>
1138
1139<dd>  </dd>
1140</dl>
1141<h2><a href="../../api/MagickCore/image_8c.html" id="StripImage">StripImage</a></h2>
1142
1143<p>StripImage() strips an image of all profiles and comments.</p>
1144
1145<p>The format of the StripImage method is:</p>
1146
1147<pre class="text">
1148MagickBooleanType StripImage(Image *image,ExceptionInfo *exception)
1149</pre>
1150
1151<p>A description of each parameter follows:</p>
1152
1153<dd>
1154</dd>
1155
1156<dd> </dd>
1157<dl class="dl-horizontal">
1158<dt>image</dt>
1159<dd>the image. </dd>
1160
1161<dd> </dd>
1162<dt>exception</dt>
1163<dd>return any errors or warnings in this structure. </dd>
1164
1165<dd>  </dd>
1166</dl>
1167<h2><a href="../../api/MagickCore/image_8c.html" id="SyncImageSettings">SyncImageSettings</a></h2>
1168
1169<p>SyncImageSettings() syncs any image_info global options into per-image attributes.</p>
1170
1171<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>
1172
1173<p>The format of the SyncImageSettings method is:</p>
1174
1175<pre class="text">
1176MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
1177  Image *image,ExceptionInfo *exception)
1178MagickBooleanType SyncImagesSettings(const ImageInfo *image_info,
1179  Image *image,ExceptionInfo *exception)
1180</pre>
1181
1182<p>A description of each parameter follows:</p>
1183
1184<dd>
1185</dd>
1186
1187<dd> </dd>
1188<dl class="dl-horizontal">
1189<dt>image_info</dt>
1190<dd>the image info. </dd>
1191
1192<dd> </dd>
1193<dt>image</dt>
1194<dd>the image. </dd>
1195
1196<dd> </dd>
1197<dt>exception</dt>
1198<dd>return any errors or warnings in this structure. </dd>
1199
1200<dd>  </dd>
1201</dl>
1202</div>
1203  </div>
1204  </main><!-- /.container -->
1205  <footer class="magick-footer">
1206    <div class="container-fluid">
1207      <a href="../../www/security-policy.html">Security</a> •
1208      <a href="../../www/news.html">News</a>
1209
1210      <a href="image.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../../images/wand.ico"/></a>
1211
1212      <a href="../../www/links.html">Related</a> •
1213      <a href="../../www/sitemap.html">Sitemap</a>
1214   <br/>
1215     <a href="../../www/support.html">Sponsor</a> •
1216     <a href="../../www/cite.html">Cite</a> •
1217     <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
1218     <a href="../../www/contact.html">Contact Us</a>
1219   <br/>
1220     <a href="https://github.com/imagemagick/imagemagick" target="_blank" rel="noopener" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 499.36" width="2%" height="2%" role="img" focusable="false"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z"/></svg></a> •
1221     <a href="https://twitter.com/imagemagick" target="_blank" rel="noopener" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 416.32" width="2%" height="2%" role="img" focusable="false"><title>Twitter</title><path fill="currentColor" d="M160.83 416.32c193.2 0 298.92-160.22 298.92-298.92 0-4.51 0-9-.2-13.52A214 214 0 0 0 512 49.38a212.93 212.93 0 0 1-60.44 16.6 105.7 105.7 0 0 0 46.3-58.19 209 209 0 0 1-66.79 25.37 105.09 105.09 0 0 0-181.73 71.91 116.12 116.12 0 0 0 2.66 24c-87.28-4.3-164.73-46.3-216.56-109.82A105.48 105.48 0 0 0 68 159.6a106.27 106.27 0 0 1-47.53-13.11v1.43a105.28 105.28 0 0 0 84.21 103.06 105.67 105.67 0 0 1-47.33 1.84 105.06 105.06 0 0 0 98.14 72.94A210.72 210.72 0 0 1 25 370.84a202.17 202.17 0 0 1-25-1.43 298.85 298.85 0 0 0 160.83 46.92"/></svg></a>
1222    <br/>
1223    <small>© 1999-2021 ImageMagick Studio LLC</small>
1224    </div>
1225  </footer>
1226
1227  <!-- Javascript assets -->
1228  <script src="../../assets/magick.js" ></script>
1229  </body>
1230</html>
1231