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