File: image.html

package info (click to toggle)
imagemagick 6%3A6.0.6.2-2.9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 33,284 kB
  • ctags: 14,844
  • sloc: ansic: 190,790; cpp: 17,203; sh: 8,740; perl: 4,190; makefile: 1,740; tcl: 459
file content (807 lines) | stat: -rw-r--r-- 35,092 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>image - Image Methods</title>
<link rel="stylesheet" type="text/css" href="../magick.css">
</head>

<body marginheight="1" marginwidth="1" topmargin="1" leftmargin="1">
<a name="top"></a> 
<table border="0" cellpadding="0" cellspacing="0" summary="Masthead" width="100%">
<tbody>
<tr>
<td bgcolor="#003399" width="25%" height="118" background="../../images/background.gif"><a href="http://www.imagemagick.org/"><img src="../../images/script.gif" width="278" height="118" border="0" alt="" /></a></td>
<td bgcolor="#003399" width="60%" height="118" background="../../images/background.gif"><a href="http://www.networkeleven.com/direct.php?magick_all"><img src="../../images/promote.png" border="0" width="186" height="52" vspace="29" alt="Powered by NetworkEleven" /></a></td>
<td bgcolor="#003399" width="114" height="118" align="right"><img src="../../images/sprite.png" width="114" height="118" alt="" /></td>
<td bgcolor="#003399" width="114" height="118" align="right"><a href="http://www.imagemagick.net"><img src="../../images/logo.png" width="114" height="118" border="0" alt="ImageMagick logo" /></a></td>
</tr></tbody></table>
<table align="left" border="0" cellpadding="2" cellspacing="2" summary="Navigation buttons" width="20%">
<tr>
<td>
<form target="_self" action="../../index.html"><input type="submit" title="ImageMagick Home" value=" Home" style="background-color: #1947A3; background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold"></form></td>
<td>
<form target="_self" action="../../www/apis.html"><input type="submit" title="ImageMagick API" value=" API " style="background-color: #1947A3; background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold"></form></td>
<td>
<form target="_self" action="../../www/archives.html"><input type="submit" title="ImageMagick Download" value="Download" style="background-color: #1947A3; background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold"></form></td></tr></table>
<div align="right" style="margin-top:3px; padding-right:4px">
<form action="http://studio.imagemagick.org/Sage/scripts/Sage.cgi"><input type="TEXT" name="query" size="32" maxlength="255"> <input type="SUBMIT" name="sa" value="Search" style="background-color: #1947A3; background-image:url('../../../images/background.gif'); bgcolor:#003399; color:#fbc713; font-weight:bold"></form></div>
<table align="left" border="0" cellpadding="10" cellspacing="0" style="margin-top:-17px" width="100%">
<tr>
<td>


<P><a name="__index__"></a></P>
<!-- INDEX BEGIN -->

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#function_descriptions">FUNCTION DESCRIPTIONS</a></li>
	<ul>

		<li><a href="#allocateimage">AllocateImage</a></li>
		<li><a href="#allocateimagecolormap">AllocateImageColormap</a></li>
		<li><a href="#allocatenextimage">AllocateNextImage</a></li>
		<li><a href="#appendimages">AppendImages</a></li>
		<li><a href="#averageimages">AverageImages</a></li>
		<li><a href="#catchimageexception">CatchImageException</a></li>
		<li><a href="#clippathimage">ClipPathImage</a></li>
		<li><a href="#cloneimage">CloneImage</a></li>
		<li><a href="#cloneimageinfo">CloneImageInfo</a></li>
		<li><a href="#combineimages">CombineImages</a></li>
		<li><a href="#cyclecolormapimage">CycleColormapImage</a></li>
		<li><a href="#describeimage">DescribeImage</a></li>
		<li><a href="#destroyimage">DestroyImage</a></li>
		<li><a href="#destroyimageinfo">DestroyImageInfo</a></li>
		<li><a href="#getimagechanneldepth">GetImageChannelDepth</a></li>
		<li><a href="#getimagechannelextrema">GetImageChannelExtrema</a></li>
		<li><a href="#getimageclipmask">GetImageClipMask</a></li>
		<li><a href="#getimageexception">GetImageException</a></li>
		<li><a href="#getimageinfo">GetImageInfo</a></li>
		<li><a href="#getimagechannelmean">GetImageChannelMean</a></li>
		<li><a href="#getimagequantumdepth">GetImageQuantumDepth</a></li>
		<li><a href="#getimagetype">GetImageType</a></li>
		<li><a href="#istaintimage">IsTaintImage</a></li>
		<li><a href="#modifyimage">ModifyImage</a></li>
		<li><a href="#plasmaimage">PlasmaImage</a></li>
		<li><a href="#referenceimage">ReferenceImage</a></li>
		<li><a href="#separateimagechannel">SeparateImageChannel</a></li>
		<li><a href="#setimage">SetImage</a></li>
		<li><a href="#setimageclipmask">SetImageClipMask</a></li>
		<li><a href="#setimagechanneldepth">SetImageChannelDepth</a></li>
		<li><a href="#setimageopacity">SetImageOpacity</a></li>
		<li><a href="#setimagetype">SetImageType</a></li>
		<li><a href="#stripimage">StripImage</a></li>
		<li><a href="#textureimage">TextureImage</a></li>
	</ul>

</ul>
<!-- INDEX END -->

<hr />
<P>
</P>
<h1><a name="name">NAME</a></h1>
<P>image - Image Methods</P>
<P>
</P>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<P>Image * <strong>AllocateImage</strong>( const ImageInfo *image_info );</P>
<P>MagickBooleanType  <strong>AllocateImageColormap</strong>( Image *image, const unsigned long colors );</P>
<P>void  <strong>AllocateNextImage</strong>( const ImageInfo *image_info, Image *image );</P>
<P>Image * <strong>AppendImages</strong>( const Image *image, const MagickBooleanType stack, ExceptionInfo *exception );</P>
<P>Image * <strong>AverageImages</strong>( Image *image, ExceptionInfo *exception );</P>
<P>ExceptionType  <strong>CatchImageException</strong>( Image *image );</P>
<P>MagickBooleanType  <strong>ClipPathImage</strong>( Image *image, const char *pathname, const MagickBooleanType inside );</P>
<P>Image * <strong>CloneImage</strong>( const Image *image, const unsigned long columns, const unsigned long rows, const MagickBooleanType orphan, ExceptionInfo *exception );</P>
<P>ImageInfo * <strong>CloneImageInfo</strong>( const ImageInfo *image_info );</P>
<P>Image * <strong>CombineImages</strong>( const Image *image, const ChannelType channel, ExceptionInfo *exception );</P>
<P>MagickBooleanType  <strong>CycleColormapImage</strong>( Image *image, const long displace );</P>
<P>MagickBooleanType  <strong>DescribeImage</strong>( Image *image, FILE *file, const MagickBooleanType verbose );</P>
<P>void  <strong>DestroyImage</strong>( Image *image );</P>
<P>void  <strong>DestroyImageInfo</strong>( ImageInfo *image_info );</P>
<P>unsigned long  <strong>GetImageChannelDepth</strong>( const Image *image, const ChannelType channel, ExceptionInfo *exception );</P>
<P>MagickBooleanType  <strong>GetImageChannelExtrema</strong>( const Image *image, const ChannelType channel, unsigned long *minima, unsigned long *maxima, ExceptionInfo *exception );</P>
<P>MagickBooleanType  <strong>GetImageChannelMean</strong>( const Image *image, const ChannelType channel, double *mean, double *standard_deviation, ExceptionInfo *exception );</P>
<P>Image * <strong>GetImageClipMask</strong>( const Image *image, ExceptionInfo *exception );</P>
<P>void  <strong>GetImageException</strong>( Image *image, ExceptionInfo *exception );</P>
<P>void  <strong>GetImageInfo</strong>( ImageInfo *image_info );</P>
<P>unsigned long  <strong>GetImageQuantumDepth</strong>( const Image *image, const MagickBooleanType constrain );</P>
<P>ImageType  <strong>GetImageType</strong>( const Image *image, ExceptionInfo *exception );</P>
<P>MagickBooleanType  <strong>IsTaintImage</strong>( const Image *image );</P>
<P><strong>ModifyImage</strong>( Image *image, ExceptionInfo *exception );</P>
<P>MagickBooleanType  <strong>PlasmaImage</strong>( Image *image, const SegmentInfo *segment, unsigned long attenuate, unsigned long depth );</P>
<P>Image * <strong>ReferenceImage</strong>( Image *image );</P>
<P>MagickBooleanType  <strong>SeparateImageChannel</strong>( Image *image, const ChannelType channel );</P>
<P>void  <strong>SetImage</strong>( Image *image, const Quantum opacity );</P>
<P>MagickBooleanType  <strong>SetImageClipMask</strong>( Image *image, const Image *clip_mask );</P>
<P>void  <strong>SetImageOpacity</strong>( Image *image, const Quantum opacity );</P>
<P>MagickBooleanType  <strong>SetImageType</strong>( Image *image, const ImageType image_type );</P>
<P>MagickBooleanType  <strong>StripImage</strong>( Image *image );</P>
<P>MagickBooleanType  <strong>TextureImage</strong>( Image *image, const Image *texture );</P>
<P>
</P>
<hr />
<h1><a name="function_descriptions">FUNCTION DESCRIPTIONS</a></h1>
<P>
</P>
<h2><a name="allocateimage">AllocateImage</a></h2>
<blockquote>AllocateImage() returns a pointer to an image structure initialized to default values. </blockquote><P>The format of the AllocateImage method is:</P>
<blockquote><A HREF="types.html#Image">Image</A> *AllocateImage ( const <A HREF="types.html#ImageInfo">ImageInfo</A> *image_info ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong><a name="item_o_image_info_3a">image_info:</a></strong><br />
</dt>
<DD>
Many of the image default values are set from this structure.  For example, filename, compression, depth, background color, and others.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="allocateimagecolormap">AllocateImageColormap</a></h2>
<blockquote>AllocateImageColormap() allocates an image colormap and initializes it to a linear gray colorspace. If the image already has a colormap, it is replaced. AllocateImageColormap ( ) returns MagickTrue if successful, otherwise MagickFalse if there is not enough memory. </blockquote><P>The format of the AllocateImageColormap method is:</P>
<blockquote>MagickBooleanType AllocateImageColormap ( <A HREF="types.html#Image">Image</A> *image, const unsigned long colors ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong><a name="item_o_image_3a">image:</a></strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_colors_3a">colors:</a></strong><br />
</dt>
<DD>
The number of colors in the image colormap.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="allocatenextimage">AllocateNextImage</a></h2>
<blockquote>Use AllocateNextImage() to initialize 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. </blockquote><P>The format of the AllocateNextImage method is:</P>
<blockquote>void AllocateNextImage ( const <A HREF="types.html#ImageInfo">ImageInfo</A> *image_info, <A HREF="types.html#Image">Image</A> *image ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image_info:</strong><br />
</dt>
<DD>
Many of the image default values are set from this structure.  For example, filename, compression, depth, background color, and others.
</dd>
<P></P>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="appendimages">AppendImages</a></h2>
<blockquote>The AppendImages() method takes a set of images and appends them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right. </blockquote><P>The format of the AppendImage method is:</P>
<blockquote><A HREF="types.html#Image">Image</A> *AppendImages ( const <A HREF="types.html#Image">Image</A> *image, const MagickBooleanType stack, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image sequence.
</dd>
<P></P>
<dt><strong><a name="item_o_stack_3a">stack:</a></strong><br />
</dt>
<DD>
A value other than 0 stacks the images top-to-bottom.
</dd>
<P></P>
<dt><strong><a name="item_o_exception_3a">exception:</a></strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="averageimages">AverageImages</a></h2>
<P>The <code>Average()</code> method takes a set of images and averages them together.  Each image in the set must have the same width and height.  <code>Average()</code> returns a single image with each corresponding pixel component of each image averaged.  On failure, a NULL image is returned and exception describes the reason for the failure.</P>
<P>The format of the AverageImage method is:</P>
<blockquote><A HREF="types.html#Image">Image</A> *AverageImages ( <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image sequence.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="catchimageexception">CatchImageException</a></h2>
<blockquote>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. </blockquote><P>The format of the CatchImageException method is:</P>
<blockquote><A HREF="types.html#ExceptionType">ExceptionType</A> CatchImageException ( <A HREF="types.html#Image">Image</A> *image ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
An image sequence.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="clippathimage">ClipPathImage</a></h2>
<blockquote>ClipPathImage() sets the image clip mask based any clipping path information if it exists. </blockquote><P>The format of the ClipImage method is:</P>
<blockquote>MagickBooleanType ClipPathImage ( <A HREF="types.html#Image">Image</A> *image, const char *pathname, const MagickBooleanType inside ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_pathname_3a">pathname:</a></strong><br />
</dt>
<DD>
name of clipping path resource.  If name is preceded by #, use clipping path numbered by name.
</dd>
<P></P>
<dt><strong><a name="item_o_inside_3a">inside:</a></strong><br />
</dt>
<DD>
if non-zero, later operations take effect inside clipping path.  Otherwise later operations take effect outside clipping path.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="cloneimage">CloneImage</a></h2>
<blockquote>CloneImage() copies an image and returns the copy as a new image object. 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 SetImagePixels ( ) and SyncImagePixels ( ) methods. On failure, a NULL image is returned and exception describes the reason for the failure. </blockquote><P>The format of the CloneImage method is:</P>
<blockquote><A HREF="types.html#Image">Image</A> *CloneImage ( const <A HREF="types.html#Image">Image</A> *image, const unsigned long columns, const unsigned long rows, const MagickBooleanType orphan, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_columns_3a">columns:</a></strong><br />
</dt>
<DD>
The number of columns in the cloned image.
</dd>
<P></P>
<dt><strong><a name="item_o_rows_3a">rows:</a></strong><br />
</dt>
<DD>
The number of rows in the cloned image.
</dd>
<P></P>
<dt><strong><a name="item_o_orphan_3a">orphan:</a></strong><br />
</dt>
<DD>
With a value other than 0, the cloned image is an orphan.  An orphan is a stand-alone image that is not assocated with an image list.  In effect, the next and previous members of the cloned image is set to NULL.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="cloneimageinfo">CloneImageInfo</a></h2>
<blockquote>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. </blockquote><P>The format of the CloneImageInfo method is:</P>
<blockquote><A HREF="types.html#ImageInfo">ImageInfo</A> *CloneImageInfo ( const <A HREF="types.html#ImageInfo">ImageInfo</A> *image_info ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image_info:</strong><br />
</dt>
<DD>
The image info.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="combineimages">CombineImages</a></h2>
<blockquote>CombineImages() combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc. </blockquote><P>The format of the CombineImages method is:</P>
<blockquote><A HREF="types.html#Image">Image</A> *CombineImages ( const <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#ChannelType">ChannelType</A> channel, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="cyclecolormapimage">CycleColormapImage</a></h2>
<P><code>CycleColormap()</code> displaces an image's colormap by a given number of positions.  If you cycle the colormap a number of times you can produce a psychodelic effect.</P>
<P>The format of the CycleColormapImage method is:</P>
<blockquote>MagickBooleanType CycleColormapImage ( <A HREF="types.html#Image">Image</A> *image, const long displace ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_displace_3a">displace:</a></strong><br />
</dt>
<DD>
displace the colormap this amount.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="describeimage">DescribeImage</a></h2>
<blockquote>DescribeImage() describes an image by printing its attributes to the file. Attributes include the image width, height, size, and others. </blockquote><P>The format of the DescribeImage method is:</P>
<blockquote>MagickBooleanType DescribeImage ( <A HREF="types.html#Image">Image</A> *image, FILE *file, const MagickBooleanType verbose ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_file_3a">file:</a></strong><br />
</dt>
<DD>
The file, typically stdout.
</dd>
<P></P>
<dt><strong><a name="item_o_verbose_3a">verbose:</a></strong><br />
</dt>
<DD>
A value other than zero prints more detailed information about the image.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="destroyimage">DestroyImage</a></h2>
<blockquote>DestroyImage() dereferences an image, deallocating memory associated with the image if the reference count becomes zero. </blockquote><P>The format of the DestroyImage method is:</P>
<blockquote>void DestroyImage ( <A HREF="types.html#Image">Image</A> *image ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="destroyimageinfo">DestroyImageInfo</a></h2>
<blockquote>DestroyImageInfo() deallocates memory associated with an <A HREF="types.html#ImageInfo">ImageInfo</A> structure. </blockquote><P>The format of the DestroyImageInfo method is:</P>
<blockquote>void DestroyImageInfo ( <A HREF="types.html#ImageInfo">ImageInfo</A> *image_info ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image_info:</strong><br />
</dt>
<DD>
The image info.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimagechanneldepth">GetImageChannelDepth</a></h2>
<blockquote>GetImageChannelDepth() returns the depth of a particular image channel. </blockquote><P>The format of the GetImageChannelDepth method is:</P>
<blockquote>unsigned long GetImageChannelDepth ( const <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#ChannelType">ChannelType</A> channel, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_channel_3a">channel:</a></strong><br />
</dt>
<DD>
The channel.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimagechannelextrema">GetImageChannelExtrema</a></h2>
<blockquote>GetImageChannelExtrema() returns the extrema of one or more image channels. </blockquote><P>The format of the GetImageChannelExtrema method is:</P>
<blockquote>MagickBooleanType GetImageChannelExtrema ( const <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#ChannelType">ChannelType</A> channel, unsigned long *minima, unsigned long *maxima, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>channel:</strong><br />
</dt>
<DD>
The channel.
</dd>
<P></P>
<dt><strong><a name="item_o_minima_3a">minima:</a></strong><br />
</dt>
<DD>
The minimum value in the channel.
</dd>
<P></P>
<dt><strong><a name="item_o_maxima_3a">maxima:</a></strong><br />
</dt>
<DD>
The maximum value in the channel.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimageclipmask">GetImageClipMask</a></h2>
<blockquote>GetImageClipMask() returns the clip mask associated with the image. </blockquote><P>The format of the GetImageClipMask method is:</P>
<blockquote><A HREF="types.html#Image">Image</A> *GetImageClipMask ( const <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimageexception">GetImageException</a></h2>
<blockquote>GetImageException() traverses an image sequence and returns any error more severe than noted by the exception parameter. </blockquote><P>The format of the GetImageException method is:</P>
<blockquote>void GetImageException ( <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
Specifies a pointer to a list of one or more images.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
return the highest severity exception.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimageinfo">GetImageInfo</a></h2>
<blockquote>GetImageInfo() initializes image_info to default values. </blockquote><P>The format of the GetImageInfo method is:</P>
<blockquote>void GetImageInfo ( <A HREF="types.html#ImageInfo">ImageInfo</A> *image_info ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image_info:</strong><br />
</dt>
<DD>
The image info.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimagechannelmean">GetImageChannelMean</a></h2>
<blockquote>GetImageChannelMean() returns the mean and standard deviation of one or more image channels. </blockquote><P>The format of the GetImageChannelMean method is:</P>
<blockquote>MagickBooleanType GetImageChannelMean ( const <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#ChannelType">ChannelType</A> channel, double *mean, double *standard_deviation, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>channel:</strong><br />
</dt>
<DD>
The channel.
</dd>
<P></P>
<dt><strong><a name="item_o_mean_3a">mean:</a></strong><br />
</dt>
<DD>
The average value in the channel.
</dd>
<P></P>
<dt><strong><a name="item_o_standard_deviation_3a">standard_deviation:</a></strong><br />
</dt>
<DD>
The standard deviation of the channel.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimagequantumdepth">GetImageQuantumDepth</a></h2>
<blockquote>GetImageQuantumDepth() returns the depth of the image rounded to a legal quantum depth: 8, 16, or 32. </blockquote><P>The format of the GetImageQuantumDepth method is:</P>
<blockquote>unsigned long GetImageQuantumDepth ( const <A HREF="types.html#Image">Image</A> *image, const MagickBooleanType constrain ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_constrain_3a">constrain:</a></strong><br />
</dt>
<DD>
A value other than MagickFalse, constrains the depth to a maximum of QuantumDepth.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="getimagetype">GetImageType</a></h2>
<blockquote>GetImageType() returns the potential type of image: </blockquote><pre>
      Bilevel        Grayscale       GrayscaleMatte
      Palette        PaletteMatte    TrueColor
      TrueColorMatte ColorSeparation ColorSeparationMatte</pre>
<P>To ensure the image type matches its potential, use SetImageType():</P>
<blockquote>( void ) SetImageType ( image, GetImageType ( image ) );; </blockquote><P>The format of the GetImageType method is:</P>
<blockquote><A HREF="types.html#ImageType">ImageType</A> GetImageType ( const <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="istaintimage">IsTaintImage</a></h2>
<blockquote>IsTaintImage() returns a value other than 0 if any pixel in the image has been altered since it was first constituted. </blockquote><P>The format of the IsTaintImage method is:</P>
<blockquote>MagickBooleanType IsTaintImage ( const <A HREF="types.html#Image">Image</A> *image ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="modifyimage">ModifyImage</a></h2>
<blockquote>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. </blockquote><P>The format of the ModifyImage method is:</P>
<blockquote>ModifyImage ( <A HREF="types.html#Image">Image</A> *image, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>exception:</strong><br />
</dt>
<DD>
Return any errors or warnings in this structure.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="plasmaimage">PlasmaImage</a></h2>
<blockquote>PlasmaImage() initializes an image with plasma fractal values. The image must be initialized with a base color and the random number generator seeded before this method is called. </blockquote><P>The format of the PlasmaImage method is:</P>
<blockquote>MagickBooleanType PlasmaImage ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#SegmentInfo">SegmentInfo</A> *segment, unsigned long attenuate, unsigned long depth ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_segment_3a">segment:</a></strong><br />
</dt>
<DD>
Define the region to apply plasma fractals values.
</dd>
<P></P>
<dt><strong><a name="item_o_attenuate_3a">attenuate:</a></strong><br />
</dt>
<DD>
Define the plasma attenuation factor.
</dd>
<P></P>
<dt><strong><a name="item_o_depth_3a">depth:</a></strong><br />
</dt>
<DD>
Limit the plasma recursion depth.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="referenceimage">ReferenceImage</a></h2>
<blockquote>ReferenceImage() increments the reference count associated with an image returning a pointer to the image. </blockquote><P>The format of the ReferenceImage method is:</P>
<blockquote><A HREF="types.html#Image">Image</A> *ReferenceImage ( <A HREF="types.html#Image">Image</A> *image ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="separateimagechannel">SeparateImageChannel</a></h2>
<P>Separate a channel from the image and return it as a grayscale image.  A channel is a particular color component of each pixel in the image.</P>
<P>The format of the SeparateImage method is:</P>
<blockquote>MagickBooleanType SeparateImageChannel ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#ChannelType">ChannelType</A> channel ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>channel:</strong><br />
</dt>
<DD>
Identify which channel to extract: RedSeparate, GreenSeparate, BlueSeparate, OpacitySeparate, CyanSeparate, MagentaSeparate, YellowSeparate, or BlackSeparate.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="setimage">SetImage</a></h2>
<blockquote>SetImage() sets the red, green, and blue components of each pixel to the image background color and the opacity component to the specified level of transparency. The background color is defined by the background_color member of the image. </blockquote><P>The format of the SetImage method is:</P>
<blockquote>void SetImage ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#Quantum">Quantum</A> opacity ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_opacity_3a">opacity:</a></strong><br />
</dt>
<DD>
Set each pixel to this level of transparency.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="setimageclipmask">SetImageClipMask</a></h2>
<blockquote>SetImageClipMask() associates a clip mask with the image. The clip mask must be the same dimensions as the image. Set any pixel component of the clip mask to TransparentOpacity to prevent that corresponding image pixel component from being updated when SyncImagePixels ( ) is applied. </blockquote><P>The format of the SetImageClipMask method is:</P>
<blockquote>MagickBooleanType SetImageClipMask ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#Image">Image</A> *clip_mask ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_clip_mask_3a">clip_mask:</a></strong><br />
</dt>
<DD>
The image clip mask.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="setimagechanneldepth">SetImageChannelDepth</a></h2>
<blockquote>SetImageChannelDepth() sets the depth of the image. </blockquote><P>The format of the SetImageDepth method is:</P>
<pre>
    MagickBooleanType SetImageDepth(Image *image,const ChannelType channel,
      const unsigned long depth)</pre>
<P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>channel:</strong><br />
</dt>
<DD>
The channel.
</dd>
<P></P>
<dt><strong>depth:</strong><br />
</dt>
<DD>
The image depth.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="setimageopacity">SetImageOpacity</a></h2>
<blockquote>SetImageOpacity() attenuates the opacity channel of an image. If the image pixels are opaque, they are set to the specified opacity level. Otherwise, the pixel oapcity values are blended with the supplied transparency value. </blockquote><P>The format of the SetImageOpacity method is:</P>
<blockquote>void SetImageOpacity ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#Quantum">Quantum</A> opacity ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong>opacity:</strong><br />
</dt>
<DD>
The level of transparency: 0 is fully opaque and MaxRGB is fully transparent.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="setimagetype">SetImageType</a></h2>
<blockquote>SetImageType() sets the type of image. Choose from these types: </blockquote><pre>
      Bilevel        Grayscale       GrayscaleMatte
      Palette        PaletteMatte    TrueColor
      TrueColorMatte ColorSeparation ColorSeparationMatte
      OptimizeType</pre>
<P>The format of the SetImageType method is:</P>
<blockquote>MagickBooleanType SetImageType ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#ImageType">ImageType</A> image_type ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_image_type_3a">image_type:</a></strong><br />
</dt>
<DD>
Image type.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="stripimage">StripImage</a></h2>
<blockquote>StripImage() strips an image of all profiles and comments. </blockquote><P>The format of the StripImage method is:</P>
<blockquote>MagickBooleanType StripImage ( <A HREF="types.html#Image">Image</A> *image ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P></dl>
<P>
</P>
<h2><a name="textureimage">TextureImage</a></h2>
<blockquote>TextureImage() repeatedly tiles the texture image across and down the image canvas. </blockquote><P>The format of the TextureImage method is:</P>
<blockquote>MagickBooleanType TextureImage ( <A HREF="types.html#Image">Image</A> *image, const <A HREF="types.html#Image">Image</A> *texture ); </blockquote><P>A description of each parameter follows:</P>
<dl>
<dt><strong>image:</strong><br />
</dt>
<DD>
The image.
</dd>
<P></P>
<dt><strong><a name="item_o_texture_3a">texture:</a></strong><br />
</dt>
<DD>
This image is the texture to layer on the background.
</dd>
</dl>


<HR>

<a href="#top"><img src="../../../images/top.gif" border=0 width=42 height=42 align="right" alt="Top of page"></a>
<form action="http://studio.imagemagick.org/magick/" style="margin-top:5px">
<input type="submit" title="Help!" value="Help!" style="background-image:url('../../../images/background.gif'); color:#fbc713; font-weight:bold">
  <small>&quot;Image manipulation software that works like magick&quot;</small>
</form></td>
</tr></table>

</body>


</html>