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
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="en" name="language">
<title>image</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link media="screen" href="../docutils-api.css" type="text/css" rel="stylesheet">
</head>
<body>
<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
<input type="hidden" name="domains" value="www.graphicsmagick.org" />
<input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" /> <input type="submit" name="sa" value="Search" /></span>
</form>
</div>
<div class="navmenu">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../project.html">Project</a></li>
<li><a href="../download.html">Download</a></li>
<li><a href="../README.html">Install</a></li>
<li><a href="../Hg.html">Source</a></li>
<li><a href="../NEWS.html">News</a> </li>
<li><a href="../utilities.html">Utilities</a></li>
<li><a href="../programming.html">Programming</a></li>
<li><a href="../reference.html">Reference</a></li>
</ul>
</div>
<div class="document" id="image">
<h1 class="title">image</h1>
<p class="subtitle" id="miscellaneous-image-methods">Miscellaneous image methods</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#accessdefinition" id="id72">AccessDefinition</a></p></li>
<li><p><a class="reference internal" href="#adddefinition" id="id73">AddDefinition</a></p></li>
<li><p><a class="reference internal" href="#adddefinitions" id="id74">AddDefinitions</a></p></li>
<li><p><a class="reference internal" href="#allocateimage" id="id75">AllocateImage</a></p></li>
<li><p><a class="reference internal" href="#allocatenextimage" id="id76">AllocateNextImage</a></p></li>
<li><p><a class="reference internal" href="#animateimages" id="id77">AnimateImages</a></p></li>
<li><p><a class="reference internal" href="#appendimages" id="id78">AppendImages</a></p></li>
<li><p><a class="reference internal" href="#catchimageexception" id="id79">CatchImageException</a></p></li>
<li><p><a class="reference internal" href="#clippathimage" id="id80">ClipPathImage</a></p></li>
<li><p><a class="reference internal" href="#compositepathimage" id="id81">CompositePathImage</a></p></li>
<li><p><a class="reference internal" href="#cloneimage" id="id82">CloneImage</a></p></li>
<li><p><a class="reference internal" href="#cloneimageinfo" id="id83">CloneImageInfo</a></p></li>
<li><p><a class="reference internal" href="#destroyimage" id="id84">DestroyImage</a></p></li>
<li><p><a class="reference internal" href="#destroyimageinfo" id="id85">DestroyImageInfo</a></p></li>
<li><p><a class="reference internal" href="#displayimages" id="id86">DisplayImages</a></p></li>
<li><p><a class="reference internal" href="#getimageclipmask" id="id87">GetImageClipMask</a></p></li>
<li><p><a class="reference internal" href="#getimagecompositemask" id="id88">GetImageCompositeMask</a></p></li>
<li><p><a class="reference internal" href="#getimageexception" id="id89">GetImageException</a></p></li>
<li><p><a class="reference internal" href="#getimagegeometry" id="id90">GetImageGeometry</a></p></li>
<li><p><a class="reference internal" href="#getimageinfo" id="id91">GetImageInfo</a></p></li>
<li><p><a class="reference internal" href="#istaintimage" id="id92">IsTaintImage</a></p></li>
<li><p><a class="reference internal" href="#modifyimage" id="id93">ModifyImage</a></p></li>
<li><p><a class="reference internal" href="#referenceimage" id="id94">ReferenceImage</a></p></li>
<li><p><a class="reference internal" href="#removedefinitions" id="id95">RemoveDefinitions</a></p></li>
<li><p><a class="reference internal" href="#resetimagepage" id="id96">ResetImagePage</a></p></li>
<li><p><a class="reference internal" href="#setimageex" id="id97">SetImageEx</a></p></li>
<li><p><a class="reference internal" href="#setimage" id="id98">SetImage</a></p></li>
<li><p><a class="reference internal" href="#setimagecolor" id="id99">SetImageColor</a></p></li>
<li><p><a class="reference internal" href="#setimagecolorregion" id="id100">SetImageColorRegion</a></p></li>
<li><p><a class="reference internal" href="#setimageclipmask" id="id101">SetImageClipMask</a></p></li>
<li><p><a class="reference internal" href="#setimagecompositemask" id="id102">SetImageCompositeMask</a></p></li>
<li><p><a class="reference internal" href="#setimagedepth" id="id103">SetImageDepth</a></p></li>
<li><p><a class="reference internal" href="#setimageopacity" id="id104">SetImageOpacity</a></p></li>
<li><p><a class="reference internal" href="#setimagetype" id="id105">SetImageType</a></p></li>
<li><p><a class="reference internal" href="#stripimage" id="id106">StripImage</a></p></li>
<li><p><a class="reference internal" href="#syncimage" id="id107">SyncImage</a></p></li>
</ul>
</div>
<div class="section" id="accessdefinition">
<h1><a class="toc-backref" href="#id72">AccessDefinition</a></h1>
<div class="section" id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">const char *AccessDefinition( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *magick,
const char *key );</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>AccessDefinition() searches the definitions for an entry matching the
specified magick and key. NULL is returned if no matching entry is found.</p>
<p>The format of the AccessDefinition method is:</p>
<pre class="literal-block">const char *AccessDefinition( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *magick,
const char *key );</pre>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
<dt>magick:</dt>
<dd><p>Format ID. This is usually the same as the coder name.</p>
</dd>
<dt>key:</dt>
<dd><p>Key to search for.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="adddefinition">
<h1><a class="toc-backref" href="#id73">AddDefinition</a></h1>
<div class="section" id="id2">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail AddDefinition( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *magick, const char *key,
const char *value, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id3">
<h2>Description</h2>
<p>AddDefinition() adds a key/value definition to the current map of
definitions in ImageInfo. Definitions may be used by coders/decoders
that read and write images.</p>
<p>The format of the AddDefinition method is:</p>
<pre class="literal-block">MagickPassFail AddDefinition( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *magick, const char *key,
const char *value, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
<dt>magick:</dt>
<dd><p>format/classification identifier</p>
</dd>
<dt>key:</dt>
<dd><p>subidentifier within format/classification</p>
</dd>
<dt>value:</dt>
<dd><p>definition value</p>
</dd>
<dt>exception:</dt>
<dd><p>Errors result in updates to this structure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="adddefinitions">
<h1><a class="toc-backref" href="#id74">AddDefinitions</a></h1>
<div class="section" id="id4">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail AddDefinitions( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *options );</pre>
</div>
<div class="section" id="id5">
<h2>Description</h2>
<p>AddDefinitions() adds definitions from a key/value based string to the current
map of definitions in ImageInfo. Definitions may be used by coders/decoders
that read and write images.</p>
<p>The format of the AddDefinitions method is:</p>
<pre class="literal-block">MagickPassFail AddDefinitions( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *options );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
<dt>options:</dt>
<dd><p>List of key/value pairs to put in the definitions map. The
format of the string is "key1[=[value1]],key2[=[value2]],...". A missing
value argument (with or without the equal sign) inserts an empty, zero
length string as value for a key.</p>
</dd>
<dt>exception:</dt>
<dd><p>Errors result in updates to this structure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="allocateimage">
<h1><a class="toc-backref" href="#id75">AllocateImage</a></h1>
<div class="section" id="id6">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *AllocateImage( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
</div>
<div class="section" id="id7">
<h2>Description</h2>
<p>AllocateImage() returns a pointer to an image structure initialized to
default values. Currently a failure in this function results in a fatal
error, resulting in program exit.</p>
<p>The format of the AllocateImage method is:</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *AllocateImage( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>Many of the image default values are set from this
structure. For example, filename, compression, depth, background color,
and others.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="allocatenextimage">
<h1><a class="toc-backref" href="#id76">AllocateNextImage</a></h1>
<div class="section" id="id8">
<h2>Synopsis</h2>
<pre class="literal-block">void AllocateNextImage( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id9">
<h2>Description</h2>
<p>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.</p>
<p>It is expected that the image next pointer is null, since otherwise
there is likely to be a memory leak. In the future this may be enforced.</p>
<p>The format of the AllocateNextImage method is:</p>
<pre class="literal-block">void AllocateNextImage( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>Many of the image default values are set from this
structure. For example, filename, compression, depth, background color,
and others.</p>
</dd>
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="animateimages">
<h1><a class="toc-backref" href="#id77">AnimateImages</a></h1>
<div class="section" id="id10">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int AnimateImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id11">
<h2>Description</h2>
<p>AnimateImages() repeatedly displays an image sequence to any X window
screen. It returns a value other than 0 if successful. Check the
exception member of image to determine the reason for any failure.</p>
<p>The format of the AnimateImages method is:</p>
<pre class="literal-block">unsigned int AnimateImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="appendimages">
<h1><a class="toc-backref" href="#id78">AppendImages</a></h1>
<div class="section" id="id12">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *AppendImages( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int stack,
<a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id13">
<h2>Description</h2>
<p>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.</p>
<p>The format of the AppendImage method is:</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *AppendImages( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int stack,
<a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image sequence.</p>
</dd>
<dt>stack:</dt>
<dd><p>A value other than 0 stacks the images top-to-bottom.</p>
</dd>
<dt>exception:</dt>
<dd><p>Return any errors or warnings in this structure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="catchimageexception">
<h1><a class="toc-backref" href="#id79">CatchImageException</a></h1>
<div class="section" id="id14">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#exceptiontype">ExceptionType</a> CatchImageException( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id15">
<h2>Description</h2>
<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>
<p>The format of the CatchImageException method is:</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#exceptiontype">ExceptionType</a> CatchImageException( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>An image sequence.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="clippathimage">
<h1><a class="toc-backref" href="#id80">ClipPathImage</a></h1>
<div class="section" id="id16">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int ClipPathImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *pathname,
const unsigned int inside );</pre>
</div>
<div class="section" id="id17">
<h2>Description</h2>
<p>ClipPathImage() sets the image clip mask based any clipping path information
if it exists.</p>
<p>The format of the ClipPathImage method is:</p>
<pre class="literal-block">unsigned int ClipPathImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *pathname,
const unsigned int inside );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>pathname:</dt>
<dd><p>name of clipping path resource. If name is preceded by #, use
clipping path numbered by name.</p>
</dd>
<dt>inside:</dt>
<dd><p>if non-zero, later operations take effect inside clipping path.
Otherwise later operations take effect outside clipping path.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="compositepathimage">
<h1><a class="toc-backref" href="#id81">CompositePathImage</a></h1>
<div class="section" id="id18">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int CompositePathImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *pathname,
const unsigned int inside );</pre>
</div>
<div class="section" id="id19">
<h2>Description</h2>
<p>CompositePathImage() sets the image composite mask based any compositing path information
if it exists.</p>
<p>The format of the CompositePathImage method is:</p>
<pre class="literal-block">unsigned int CompositePathImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *pathname,
const unsigned int inside );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>pathname:</dt>
<dd><p>name of compositing path resource. If name is preceded by #, use
compositing path numbered by name.</p>
</dd>
<dt>inside:</dt>
<dd><p>if non-zero, later operations take effect inside compositing path.
Otherwise later operations take effect outside compositing path.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="cloneimage">
<h1><a class="toc-backref" href="#id82">CloneImage</a></h1>
<div class="section" id="id20">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *CloneImage( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned long columns,
const unsigned long rows, const unsigned int orphan,
<a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id21">
<h2>Description</h2>
<p>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.</p>
<p>The format of the CloneImage method is:</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *CloneImage( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned long columns,
const unsigned long rows, const unsigned int orphan,
<a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>columns:</dt>
<dd><p>The number of columns in the cloned image.</p>
</dd>
<dt>rows:</dt>
<dd><p>The number of rows in the cloned image.</p>
</dd>
<dt>orphan:</dt>
<dd><p>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.</p>
</dd>
<dt>exception:</dt>
<dd><p>Return any errors or warnings in this structure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="cloneimageinfo">
<h1><a class="toc-backref" href="#id83">CloneImageInfo</a></h1>
<div class="section" id="id22">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *CloneImageInfo( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
</div>
<div class="section" id="id23">
<h2>Description</h2>
<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>
<p>The format of the CloneImageInfo method is:</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *CloneImageInfo( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="destroyimage">
<h1><a class="toc-backref" href="#id84">DestroyImage</a></h1>
<div class="section" id="id24">
<h2>Synopsis</h2>
<pre class="literal-block">void DestroyImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id25">
<h2>Description</h2>
<p>DestroyImage() dereferences an image, deallocating memory associated with
the image if the reference count becomes zero. There is no effect if the
image pointer is null.</p>
<p>In the interest of avoiding dangling pointers or memory leaks, the image
previous and next pointers should be null when this function is called,
and no other image should refer to it. In the future this may be enforced.</p>
<p>The format of the DestroyImage method is:</p>
<pre class="literal-block">void DestroyImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="destroyimageinfo">
<h1><a class="toc-backref" href="#id85">DestroyImageInfo</a></h1>
<div class="section" id="id26">
<h2>Synopsis</h2>
<pre class="literal-block">void DestroyImageInfo( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
</div>
<div class="section" id="id27">
<h2>Description</h2>
<p>DestroyImageInfo() deallocates memory associated with a ImageInfo
structure.</p>
<p>The format of the DestroyImageInfo method is:</p>
<pre class="literal-block">void DestroyImageInfo( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="displayimages">
<h1><a class="toc-backref" href="#id86">DisplayImages</a></h1>
<div class="section" id="id28">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail DisplayImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id29">
<h2>Description</h2>
<p>DisplayImages() displays an image sequence to any X window screen. It
returns MagickPass if successful or MagickFail if not. Check the
exception member of image to determine the reason for any failure.</p>
<p>The format of the DisplayImages method is:</p>
<pre class="literal-block">MagickPassFail DisplayImages( const <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="getimageclipmask">
<h1><a class="toc-backref" href="#id87">GetImageClipMask</a></h1>
<div class="section" id="id30">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *GetImageClipMask( const <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id31">
<h2>Description</h2>
<p>GetImageClipMask returns a reference-counted copy of the current image
clip mask. This copy must be deallocated using DestroyImage() once it is
no longer needed. If the image does not have an associated clip mask,
then NULL is returned. Use SetImageClipMask() to add a clip mask to an
image, or remove a clip mask.</p>
<p>If a component of the clip mask is set to TransparentOpacity (maximum
value) then the corresponding image pixel component will not be updated
when SyncImagePixels() is applied. The clip mask may be used to constrain
the results of an image processing operation to a region of the image.
Regions outside those allowed by the clip mask may be processed, but only
pixel quantums allowed by the clip mask will actually be updated.</p>
<p>The clip mask protects the DirectClass pixels and PseudoClass pixel indexes
from modification. The clip mask does <em>not</em> protect the image colormap since
the image colormap is globally shared by all pixels in a PseudoClass image.</p>
<p>The format of the GetImageClipMask method is</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *GetImageClipMask( const <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<p>A descripton of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>exception:</dt>
<dd><p>Reason for failure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="getimagecompositemask">
<h1><a class="toc-backref" href="#id88">GetImageCompositeMask</a></h1>
<div class="section" id="id32">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *GetImageCompositeMask( const <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id33">
<h2>Description</h2>
<p>GetImageCompositeMask returns a reference-counted copy of the current image
composite mask. This copy must be deallocated using DestroyImage() once it is
no longer needed. If the image does not have an associated composite mask,
then NULL is returned. Use SetImageCompositeMask() to add a composite mask to an
image, or remove a composite mask.</p>
<p>If a component of the composite mask is set to TransparentOpacity (maximum
value) then the corresponding image pixel component will not be updated
when SyncImagePixels() is applied. The composite mask may be used to constrain
the results of an image processing operation to a region of the image.
Regions outside those allowed by the composite mask may be processed, but only
pixel quantums allowed by the composite mask will actually be updated.</p>
<p>The composite mask protects the DirectClass pixels and PseudoClass pixel indexes
from modification. The composite mask does <em>not</em> protect the image colormap since
the image colormap is globally shared by all pixels in a PseudoClass image.</p>
<p>The format of the GetImageCompositeMask method is</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *GetImageCompositeMask( const <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<p>A descripton of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>exception:</dt>
<dd><p>Reason for failure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="getimageexception">
<h1><a class="toc-backref" href="#id89">GetImageException</a></h1>
<div class="section" id="id34">
<h2>Synopsis</h2>
<pre class="literal-block">void GetImageException( <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id35">
<h2>Description</h2>
<p>GetImageException() traverses an image sequence and returns any
error more severe than noted by the exception parameter.</p>
<p>The format of the GetImageException method is:</p>
<pre class="literal-block">void GetImageException( <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>Specifies a pointer to a list of one or more images.</p>
</dd>
<dt>exception:</dt>
<dd><p>return the highest severity exception.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="getimagegeometry">
<h1><a class="toc-backref" href="#id90">GetImageGeometry</a></h1>
<div class="section" id="id36">
<h2>Synopsis</h2>
<pre class="literal-block">int GetImageGeometry( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *geometry,
const unsigned int size_to_fit, <a class="reference external" href="../api/types.html#rectangleinfo">RectangleInfo</a> *region_info );</pre>
</div>
<div class="section" id="id37">
<h2>Description</h2>
<p>GetImageGeometry() returns a region as defined by the geometry string with
respect to the image and its gravity.</p>
<p>The format of the GetImageGeometry method is:</p>
<pre class="literal-block">int GetImageGeometry( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *geometry,
const unsigned int size_to_fit, <a class="reference external" href="../api/types.html#rectangleinfo">RectangleInfo</a> *region_info );</pre>
<dl class="simple">
<dt>flags:</dt>
<dd><p>Method GetImageGeometry returns a bitmask that indicates
which of the four values were located in the geometry string.</p>
</dd>
<dt>geometry:</dt>
<dd><p>The geometry (e.g. 100x100+10+10).</p>
</dd>
<dt>size_to_fit:</dt>
<dd><p>A value other than 0 means to scale the region so it
fits within the specified width and height.</p>
</dd>
<dt>region_info:</dt>
<dd><p>The region as defined by the geometry string with
respect to the image and its gravity.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="getimageinfo">
<h1><a class="toc-backref" href="#id91">GetImageInfo</a></h1>
<div class="section" id="id38">
<h2>Synopsis</h2>
<pre class="literal-block">void GetImageInfo( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
</div>
<div class="section" id="id39">
<h2>Description</h2>
<p>GetImageInfo() initializes image_info to default values.</p>
<p>The format of the GetImageInfo method is:</p>
<pre class="literal-block">void GetImageInfo( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="istaintimage">
<h1><a class="toc-backref" href="#id92">IsTaintImage</a></h1>
<div class="section" id="id40">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int IsTaintImage( const <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id41">
<h2>Description</h2>
<p>IsTaintImage() returns a value other than 0 if any pixel in the image
has been altered since it was first constituted.</p>
<p>The format of the IsTaintImage method is:</p>
<pre class="literal-block">unsigned int IsTaintImage( const <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="modifyimage">
<h1><a class="toc-backref" href="#id93">ModifyImage</a></h1>
<div class="section" id="id42">
<h2>Synopsis</h2>
<pre class="literal-block">ModifyImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id43">
<h2>Description</h2>
<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>
<p>The format of the ModifyImage method is:</p>
<pre class="literal-block">ModifyImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>exception:</dt>
<dd><p>Return any errors or warnings in this structure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="referenceimage">
<h1><a class="toc-backref" href="#id94">ReferenceImage</a></h1>
<div class="section" id="id44">
<h2>Synopsis</h2>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *ReferenceImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id45">
<h2>Description</h2>
<p>ReferenceImage() increments the reference count associated with an image
returning a pointer to the image.</p>
<p>The format of the ReferenceImage method is:</p>
<pre class="literal-block"><a class="reference external" href="../api/types.html#image">Image</a> *ReferenceImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="removedefinitions">
<h1><a class="toc-backref" href="#id95">RemoveDefinitions</a></h1>
<div class="section" id="id46">
<h2>Synopsis</h2>
<pre class="literal-block">void RemoveDefinitions( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *options );</pre>
</div>
<div class="section" id="id47">
<h2>Description</h2>
<p>RemoveDefinitions() removes definitions from the current map of definitions
in ImageInfo. Definitions may be used by coders/decoders that read and
write images. RemoveDefinitions() returns true only if the specified keys
are present in the map and are actually removed.</p>
<p>The format of the RemoveDefinitions method is:</p>
<pre class="literal-block">void RemoveDefinitions( <a class="reference external" href="../api/types.html#imageinfo">ImageInfo</a> *image_info, const char *options );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image_info:</dt>
<dd><p>The image info.</p>
</dd>
<dt>keys:</dt>
<dd><p>List of keys to remove from the definitions map. The
format of the string is "key1,key2,...". A special key, '*', removes
all the key/value pairs in the definitions map. This key always
succeeds.</p>
</dd>
<dt>exception:</dt>
<dd><p>Errors result in updates to this structure.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="resetimagepage">
<h1><a class="toc-backref" href="#id96">ResetImagePage</a></h1>
<div class="section" id="id48">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail ResetImagePage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *page );</pre>
</div>
<div class="section" id="id49">
<h2>Description</h2>
<p>ResetImagePage adjusts the current page canvas and position based on a
relative page specification.</p>
<p>The format of the ResetImagePage method is:</p>
<pre class="literal-block">MagickPassFail ResetImagePage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *page );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>page:</dt>
<dd><p>Relative page offset adjustment</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimageex">
<h1><a class="toc-backref" href="#id97">SetImageEx</a></h1>
<div class="section" id="id50">
<h2>Synopsis</h2>
<pre class="literal-block">void SetImageEx( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#quantum">Quantum</a> opacity, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
</div>
<div class="section" id="id51">
<h2>Description</h2>
<p>SetImageEx() 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.</p>
<p>The format of the SetImageEx method is:</p>
<pre class="literal-block">void SetImageEx( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#quantum">Quantum</a> opacity, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>opacity:</dt>
<dd><p>Set each pixel to this level of transparency.</p>
</dd>
<dt>exception:</dt>
<dd><p>Report any exception here.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimage">
<h1><a class="toc-backref" href="#id98">SetImage</a></h1>
<div class="section" id="id52">
<h2>Synopsis</h2>
<pre class="literal-block">void SetImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#quantum">Quantum</a> opacity );</pre>
</div>
<div class="section" id="id53">
<h2>Description</h2>
<p>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. Any exception is reported to
the image.</p>
<p>The format of the SetImage method is:</p>
<pre class="literal-block">void SetImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#quantum">Quantum</a> opacity );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>opacity:</dt>
<dd><p>Set each pixel to this level of transparency.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimagecolor">
<h1><a class="toc-backref" href="#id99">SetImageColor</a></h1>
<div class="section" id="id54">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail SetImageColor( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#pixelpacket">PixelPacket</a> *pixel );</pre>
</div>
<div class="section" id="id55">
<h2>Description</h2>
<p>SetImageColor() sets the red, green, blue and opacity components of each
pixel to those from a specified pixel value.</p>
<p>The format of the SetImageColor method is:</p>
<pre class="literal-block">MagickPassFail SetImageColor( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#pixelpacket">PixelPacket</a> *pixel );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>pixel:</dt>
<dd><p>Set each pixel in the image to this pixel's color and transparency.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimagecolorregion">
<h1><a class="toc-backref" href="#id100">SetImageColorRegion</a></h1>
<div class="section" id="id56">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail SetImageColorRegion( <a class="reference external" href="../api/types.html#image">Image</a> *image, long x, long y, unsigned long width,
unsigned long height, const <a class="reference external" href="../api/types.html#pixelpacket">PixelPacket</a> *pixel );</pre>
</div>
<div class="section" id="id57">
<h2>Description</h2>
<p>SetImageColorRegion() sets the red, green, blue and opacity components
of each pixel in the specified region to those from a specified pixel
value. Please note that it is assumed that the pixel value is in
the same colorspace as the image.</p>
<p>The format of the SetImageColorRegion method is:</p>
<pre class="literal-block">MagickPassFail SetImageColorRegion( <a class="reference external" href="../api/types.html#image">Image</a> *image, long x, long y, unsigned long width,
unsigned long height, const <a class="reference external" href="../api/types.html#pixelpacket">PixelPacket</a> *pixel );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>pixel:</dt>
<dd><p>Set each pixel in the image to this pixel's color and transparency.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimageclipmask">
<h1><a class="toc-backref" href="#id101">SetImageClipMask</a></h1>
<div class="section" id="id58">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int SetImageClipMask( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#image">Image</a> *clip_mask );</pre>
</div>
<div class="section" id="id59">
<h2>Description</h2>
<p>SetImageClipMask() associates a clip mask with the image. The clip mask
must be the same dimensions as the image.</p>
<p>If a component of the clip mask is set to TransparentOpacity (maximum
value) then the corresponding image pixel component will not be updated
when SyncImagePixels() is applied. The clip mask may be used to constrain
the results of an image processing operation to a region of the image.
Regions outside those allowed by the clip mask may be processed, but only
pixel quantums allowed by the clip mask will actually be updated.</p>
<p>The clip mask protects the DirectClass pixels and PseudoClass pixel indexes
from modification. The clip mask does <em>not</em> protect the image colormap since
the image colormap is globally shared by all pixels in a PseudoClass image.</p>
<p>The format of the SetImageClipMask method is:</p>
<pre class="literal-block">unsigned int SetImageClipMask( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#image">Image</a> *clip_mask );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>clip_mask:</dt>
<dd><p>The image clip mask.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimagecompositemask">
<h1><a class="toc-backref" href="#id102">SetImageCompositeMask</a></h1>
<div class="section" id="id60">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int SetImageCompositeMask( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#image">Image</a> *composite_mask );</pre>
</div>
<div class="section" id="id61">
<h2>Description</h2>
<p>SetImageCompositeMask() associates a composite mask with the image. The mask
must be the same dimensions as the image.</p>
<p>If a component of the composite mask is set to TransparentOpacity (maximum
value) then the corresponding image pixel component will not be updated
when SyncImagePixels() is applied. The composite mask may be used to composite
the results of an image processing operation to a region of the image.
Regions outside those allowed by the composite mask may be processed, but only
pixel quantums covered by the composite mask will actually be updated.</p>
<p>The composite mask protects the DirectClass pixels and PseudoClass pixel indexes
from modification. The composite mask does <em>not</em> protect the image colormap since
the image colormap is globally shared by all pixels in a PseudoClass image.</p>
<p>The format of the SetImageCompositeMask method is:</p>
<pre class="literal-block">unsigned int SetImageCompositeMask( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#image">Image</a> *composite_mask );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>composite_mask:</dt>
<dd><p>The image composite mask.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimagedepth">
<h1><a class="toc-backref" href="#id103">SetImageDepth</a></h1>
<div class="section" id="id62">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int SetImageDepth( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned long depth );</pre>
</div>
<div class="section" id="id63">
<h2>Description</h2>
<p>SetImageDepth() translates the pixel quantums across all of the channels
so that if they are later divided to fit within the specified bit
depth, that no additional information is lost (i.e. no remainder will
result from the division). Note that any subsequent image processing is
likely to increase the effective depth of the image channels. A non-zero
value is returned if the operation is successful. Check the exception
member of image to determine the cause for any failure.</p>
<p>The format of the SetImageDepth method is:</p>
<pre class="literal-block">unsigned int SetImageDepth( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned long depth );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image to update.</p>
</dd>
<dt>depth:</dt>
<dd><p>Desired image depth (range 1 to QuantumDepth)</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimageopacity">
<h1><a class="toc-backref" href="#id104">SetImageOpacity</a></h1>
<div class="section" id="id64">
<h2>Synopsis</h2>
<pre class="literal-block">void SetImageOpacity( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int opacity );</pre>
</div>
<div class="section" id="id65">
<h2>Description</h2>
<p>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 opacity values are blended with the supplied
transparency value.</p>
<p>The format of the SetImageOpacity method is:</p>
<pre class="literal-block">void SetImageOpacity( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int opacity );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>opacity:</dt>
<dd><p>The level of transparency: 0 is fully opaque and MaxRGB is
fully transparent.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimagetype">
<h1><a class="toc-backref" href="#id105">SetImageType</a></h1>
<div class="section" id="id66">
<h2>Synopsis</h2>
<pre class="literal-block">( void )SetImageType( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#imagetype">ImageType</a> image_type );</pre>
</div>
<div class="section" id="id67">
<h2>Description</h2>
<p>(void) SetImageType() sets the type of image. Choose from these types:</p>
<p>BilevelType, GrayscaleType, GrayscaleMatteType, PaletteType,
PaletteMatteType, TrueColorType, TrueColorMatteType,
ColorSeparationType, ColorSeparationMatteType, OptimizeType</p>
<p>The format of the (void) SetImageType method is:</p>
<pre class="literal-block">( void )SetImageType( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#imagetype">ImageType</a> image_type );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>image_type:</dt>
<dd><p>Image type.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="stripimage">
<h1><a class="toc-backref" href="#id106">StripImage</a></h1>
<div class="section" id="id68">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail StripImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id69">
<h2>Description</h2>
<p>StripImage removes all profiles and text attributes from the image.</p>
<p>The format of the StripImage method is:</p>
<pre class="literal-block">MagickPassFail StripImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="syncimage">
<h1><a class="toc-backref" href="#id107">SyncImage</a></h1>
<div class="section" id="id70">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail SyncImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id71">
<h2>Description</h2>
<p>Method SyncImage initializes the red, green, and blue intensities of each
pixel as defined by the colormap index and the current image colormap.
This is a helper function to update the DirectClass representation of
the image pixels after the PseudoClass representation has been updated.</p>
<p>The format of the SyncImage method is:</p>
<pre class="literal-block">MagickPassFail SyncImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
</div>
<hr class="docutils">
<div class="document">
<p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2023<!--SPONSOR_LOGO--></p>
</div>
</div>
</body>
</html>
|