]> granicus.if.org Git - imagemagick/blob - www/api/property.html
59c7daf6273b289b6519f4179156695fc0ffb563
[imagemagick] / www / api / property.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
2   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html version="-//W3C//DTD XHTML 1.1//EN"
4       xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
5       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6       xsi:schemaLocation="http://www.w3.org/1999/xhtml
7                           http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
8 <head>
9   <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
10   <meta name=viewport content="width=device-width, initial-scale=0.3333334">
11   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"/>
12   <title>ImageMagick: MagickCore, C API for ImageMagick: Get/Set Image Properties</title>
13   <meta http-equiv="content-language" content="en-US"/>
14   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
15   <meta http-equiv="reply-to" content="magick-users@imagemagick.org"/>
16   <meta name="application-name" content="ImageMagick"/>
17   <meta name="description" content="A collection of tools and libraries to read, write, and manipulate an image in any of the more popular image formats."/>
18   <meta name="application-url" content="http://www.imagemagick.org"/>
19   <meta name="generator" content="PHP"/>
20   <meta name="keywords" content="magickcore, c, api, for, imagemagick:, get/set, image, properties, convert, edit, compose, image, pixel"/>
21   <meta name="rating" content="GENERAL"/>
22   <meta name="robots" content="INDEX, FOLLOW"/>
23   <meta name="generator" content="ImageMagick Studio LLC"/>
24   <meta name="author" content="ImageMagick Studio LLC"/>
25   <meta name="revisit-after" content="2 DAYS"/>
26   <meta name="resource-type" content="document"/>
27   <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"/>
28   <meta name="distribution" content="Global"/>
29   <link rel="icon" href="../../images/wand.png"/>
30   <link rel="shortcut icon" href="../../images/wand.ico" type="images/x-icon"/>
31   <link rel="canonical" href="http://www.imagemagick.org" />
32   <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
33
34   <!-- Add jQuery library -->
35   <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
36   
37   <!-- Add mousewheel plugin (this is optional) -->
38   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
39   
40   <!-- Add fancyBox -->
41   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
42   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
43   
44   <!-- Optionally add helpers - button, thumbnail and/or media -->
45   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
46   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
47   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>
48   
49   <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
50   <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
51   
52   <script type="text/javascript">
53         $(document).ready(function() {
54                 $(".fancybox").fancybox();
55         });
56   </script>
57
58   <!-- ImageMagick style -->
59   <style type="text/css" media="all">
60     @import url("../../www/magick.css");
61   </style>
62 </head>
63
64 <body id="www-imagemagick-org">
65
66 <script type="text/javascript">
67   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
68   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
69   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
70   })(window,document,'offline-script','//www.google-analytics.com/analytics.js','ga');
71
72   ga('create', 'UA-40133312-1', 'imagemagick.org');
73   ga('send', 'pageview');
74 </script>
75
76 <div class="titlebar">
77 <div style="margin: 17px auto; float: left;">
78   <script type="text/javascript">
79   <!--
80     google_ad_client = "pub-3129977114552745";
81     google_ad_slot = "5439289906";
82     google_ad_width = 728;
83     google_ad_height = 90;
84   //-->
85   </script>
86   <script type="text/javascript"
87     src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
88   </script>
89 </div>
90 <a href="../../discourse-server">
91   <img src="../../images/logo.jpg"
92   alt="ImageMagick Logo" width="123" height="118"
93   style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
94 <a href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">
95   <img src="../../images/sprite.jpg"
96   alt="ImageMagick Sprite" width="114" height="118"
97   style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
98 </div>
99
100 <div class="westbar">
101
102 <div class="menu">
103   <a title="About ImageMagick" href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">About ImageMagick</a>
104 </div>
105 <div class="menu">
106   <a title="Binary Releases" href="../../www/binary-releases.html">Binary Releases</a>
107 </div>
108 <div class="sub">
109     <a title="Binary Release: Unix" href="../../www/binary-releases.html#unix">Unix</a>
110 </div>
111 <div class="sub">
112     <a title="Binary Release: MacOS X" href="../../www/binary-releases.html#macosx">Mac OS X</a>
113 </div>
114 <div class="sub">
115     <a title="Binary Release: iOS" href="../../www/binary-releases.html#iOS">iOS</a>
116 </div>
117 <div class="sub">
118     <a title="Binary Release: Windows" href="../../www/binary-releases.html#windows">Windows</a>
119 </div>
120 <div class="sep"></div>
121 <div class="menu">
122   <a title="Command-line Tools" href="../../www/command-line-tools.html">Command-line Tools</a>
123 </div>
124 <div class="sub">
125     <a title="Command-line Tools: Processing" href="../../www/command-line-processing.html">Processing</a>
126 </div>
127 <div class="sub">
128     <a title="Command-line Tools: Options" href="../../www/command-line-options.html">Options</a>
129 </div>
130 <div class="sub">
131     <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
132 </div>
133 <div class="menu">
134   <a title="Program Interfaces" href="../../www/api.html">Program Interfaces</a>
135 </div>
136 <div class="sub">
137     <a title="Program Interface: MagickWand" href="../../www/magick-wand.html">MagickWand</a>
138 </div>
139 <div class="sub">
140     <a title="Program Interface: MagickCore" href="../../www/magick-core.html">MagickCore</a>
141 </div>
142 <div class="sub">
143     <a title="Program Interface: PerlMagick" href="../../www/perl-magick.html">PerlMagick</a>
144 </div>
145 <div class="sub">
146     <a title="Program Interface: Magick++" href="../../www/magick++.html">Magick++</a>
147 </div>
148 <div class="sep"></div>
149 <div  class="menu">
150    <a title="Install from Source" href="../../www/install-source.html">Install from Source</a>
151 </div>
152 <div class="sub">
153     <a title="Install from Source: Unix" href="../../www/install-source.html#unix">Unix</a>
154 </div>
155 <div class="sub">
156     <a title="Install from Source: Windows" href="../../www/install-source.html#windows">Windows</a>
157  </div>
158 <div class="menu">
159   <a title="Resources" href="../../www/resources.html">Resources</a>
160 </div>
161 <div class="menu">
162   <a title="Architecture" href="../../www/architecture.html">Architecture</a>
163 </div>
164 <div class="menu">
165   <a title="Download" href="../../www/download.html">Download</a>
166 </div>
167 <div class="sep"></div>
168 <div class="menu">
169   <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a>
170 </div>
171 <div class="sep"></div>
172 <div class="menu">
173   <a title="Site Map" href="../../www/sitemap.html">Site Map</a>
174 </div>
175 <div  class="sub">
176   <a title="Site Map: Links" href="../../www/links.html">Links</a>
177 </div>
178 <div class="sep"></div>
179 </div>
180
181 <div class="eastbar">
182   <script type="text/javascript">
183     /* <![CDATA[ */
184     window.___gcfg = {
185       lang: 'en-US'
186     };
187
188     (function() {
189       var po = document.createElement('offline-script');
190       po.type = 'text/javascript';
191       po.async = true;
192       po.src = 'https://apis.google.com/js/plusone.js';
193       var script = document.getElementsByTagName('offline-script')[0];
194       script.parentNode.insertBefore(po, script);
195     })();
196     var gplusone = document.getElementById("gplusone");
197     gplusone.setAttribute("data-size","medium");
198     gplusone.setAttribute("data-count","true");
199     /* ]]> */
200   </script>
201   <script type="text/javascript">
202     /* <![CDATA[ */
203     (function() {
204         var po = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
205         po.type = 'text/javascript';
206         po.async = true;
207         po.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
208         var script = document.getElementsByTagName('offline-script')[0];
209         script.parentNode.insertBefore(po, script);
210     })();
211     /* ]]> */
212   </script>
213   <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.imagemagick.org/"></a></div>
214   <noscript>
215     <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
216     <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0" /></a>
217   </noscript>
218   <div class="g-plusone" data-size="standard" data-count="true"></div>
219 </div>
220
221 <div class="main">
222
223 <h1>Module property Methods</h1>
224 <p class="navigation-index">[<a href="property.html#CloneImageProperties">CloneImageProperties</a> &#8226; <a href="property.html#DefineImageProperty">DefineImageProperty</a> &#8226; <a href="property.html#DeleteImageProperty">DeleteImageProperty</a> &#8226; <a href="property.html#DestroyImageProperties">DestroyImageProperties</a> &#8226; <a href="property.html#FormatImageProperty">FormatImageProperty</a> &#8226; <a href="property.html#GetImageProperty">GetImageProperty</a> &#8226; <a href="property.html#GetNextImageProperty">GetNextImageProperty</a> &#8226; <a href="property.html#InterpretImageProperties">InterpretImageProperties</a> &#8226; <a href="property.html#RemoveImageProperty">RemoveImageProperty</a> &#8226; <a href="property.html#ResetImagePropertyIterator">ResetImagePropertyIterator</a> &#8226; <a href="property.html#SetImageProperty">SetImageProperty</a>]</p>
225
226 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="CloneImageProperties">CloneImageProperties</a></h2>
227 <div class="doc-section">
228
229 <p>CloneImageProperties() clones one or more image properties.</p>
230
231 <p>The format of the CloneImageProperties method is:</p>
232
233 <pre class="code">
234   MagickBooleanType CloneImageProperties(Image *image,
235     const Image *clone_image)
236 </pre>
237
238 <p>A description of each parameter follows:</p>
239
240 <h5>image</h5>
241 <p>the image.</p>
242
243 <h5>clone_image</h5>
244 <p>the clone image.</p>
245
246  </div>
247 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="DefineImageProperty">DefineImageProperty</a></h2>
248 <div class="doc-section">
249
250 <p>DefineImageProperty() associates a key/value pair with an image property.</p>
251
252 <p>The format of the DefineImageProperty method is:</p>
253
254 <pre class="code">
255   MagickBooleanType DefineImageProperty(Image *image,
256     const char *property)
257 </pre>
258
259 <p>A description of each parameter follows:</p>
260
261 <h5>image</h5>
262 <p>the image.</p>
263
264 <h5>property</h5>
265 <p>the image property.</p>
266
267  </div>
268 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="DeleteImageProperty">DeleteImageProperty</a></h2>
269 <div class="doc-section">
270
271 <p>DeleteImageProperty() deletes an image property.</p>
272
273 <p>The format of the DeleteImageProperty method is:</p>
274
275 <pre class="code">
276   MagickBooleanType DeleteImageProperty(Image *image,const char *property)
277 </pre>
278
279 <p>A description of each parameter follows:</p>
280
281 <h5>image</h5>
282 <p>the image.</p>
283
284 <h5>property</h5>
285 <p>the image property.</p>
286
287  </div>
288 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="DestroyImageProperties">DestroyImageProperties</a></h2>
289 <div class="doc-section">
290
291 <p>DestroyImageProperties() releases memory associated with image property values.</p>
292
293 <p>The format of the DestroyDefines method is:</p>
294
295 <pre class="code">
296   void DestroyImageProperties(Image *image)
297 </pre>
298
299 <p>A description of each parameter follows:</p>
300
301 <h5>image</h5>
302 <p>the image.</p>
303
304  </div>
305 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="FormatImageProperty">FormatImageProperty</a></h2>
306 <div class="doc-section">
307
308 <p>FormatImageProperty() permits formatted property/value pairs to be saved as an image property.</p>
309
310 <p>The format of the FormatImageProperty method is:</p>
311
312 <pre class="code">
313   MagickBooleanType FormatImageProperty(Image *image,const char *property,
314     const char *format,...)
315 </pre>
316
317 <p>A description of each parameter follows.</p>
318
319 <h5> image</h5>
320 <p>The image.</p>
321
322 <h5> property</h5>
323 <p>The attribute property.</p>
324
325 <h5> format</h5>
326 <p>A string describing the format to use to write the remaining arguments.</p>
327
328  </div>
329 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="GetImageProperty">GetImageProperty</a></h2>
330 <div class="doc-section">
331
332 <p>GetImageProperty() gets a value associated with an image property.</p>
333
334 <p>The format of the GetImageProperty method is:</p>
335
336 <pre class="code">
337   const char *GetImageProperty(const Image *image,const char *key)
338 </pre>
339
340 <p>A description of each parameter follows:</p>
341
342 <h5>image</h5>
343 <p>the image.</p>
344
345 <h5>key</h5>
346 <p>the key.</p>
347
348  </div>
349 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="GetNextImageProperty">GetNextImageProperty</a></h2>
350 <div class="doc-section">
351
352 <p>GetNextImageProperty() gets the next free-form string property name.</p>
353
354 <p>The format of the GetNextImageProperty method is:</p>
355
356 <pre class="code">
357   char *GetNextImageProperty(const Image *image)
358 </pre>
359
360 <p>A description of each parameter follows:</p>
361
362 <h5>image</h5>
363 <p>the image.</p>
364
365  </div>
366 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="InterpretImageProperties">InterpretImageProperties</a></h2>
367 <div class="doc-section">
368
369 <p>InterpretImageProperties() replaces any embedded formatting characters with the appropriate image property and returns the interpreted text.</p>
370
371 <p>This searches for and replaces \n \r \          replaced by newline, return, and percent resp. &lt; &gt; &amp;   replaced by '<', '>', '&' resp. replaced by percent</p>
372
373 <p>x            where 'x' is a single letter, case sensitive). [type:name]  where 'type' is specifically known prefix. [name]       where 'name' is a specifically known attribute, calculated value, or a per-image property string name, or a per-image 'artifact' (as generated from a global option)</p>
374
375 <p>If 'glob-expresions' ('*' or '?' characters) is used for 'name' it may be used as a search pattern to print multiple lines of "name=value\n" pairs of the associacted set of properities.</p>
376
377 <p>The returned string must be freed using DestoryString().</p>
378
379 <p>The format of the InterpretImageProperties method is:</p>
380
381 <pre class="code">
382   char *InterpretImageProperties(const ImageInfo *image_info,Image *image,
383     const char *embed_text)
384 </pre>
385
386 <p>A description of each parameter follows:</p>
387
388 <h5>image_info</h5>
389 <p>the image info.</p>
390
391 <h5>image</h5>
392 <p>the image.</p>
393
394 <h5>embed_text</h5>
395 <p>the address of a character string containing the embedded formatting characters.</p>
396
397  </div>
398 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="RemoveImageProperty">RemoveImageProperty</a></h2>
399 <div class="doc-section">
400
401 <p>RemoveImageProperty() removes a property from the image and returns its value.</p>
402
403 <p>The format of the RemoveImageProperty method is:</p>
404
405 <pre class="code">
406   char *RemoveImageProperty(Image *image,const char *property)
407 </pre>
408
409 <p>A description of each parameter follows:</p>
410
411 <h5>image</h5>
412 <p>the image.</p>
413
414 <h5>property</h5>
415 <p>the image property.</p>
416
417  </div>
418 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="ResetImagePropertyIterator">ResetImagePropertyIterator</a></h2>
419 <div class="doc-section">
420
421 <p>ResetImagePropertyIterator() resets the image properties iterator.  Use it in conjunction with GetNextImageProperty() to iterate over all the values associated with an image property.</p>
422
423 <p>The format of the ResetImagePropertyIterator method is:</p>
424
425 <pre class="code">
426   ResetImagePropertyIterator(Image *image)
427 </pre>
428
429 <p>A description of each parameter follows:</p>
430
431 <h5>image</h5>
432 <p>the image.</p>
433
434  </div>
435 <h2><a href="http://www.imagemagick.org/api/MagickCore/property_8c.html" id="SetImageProperty">SetImageProperty</a></h2>
436 <div class="doc-section">
437
438 <p>SetImageProperty() saves the given string value either to specific known attribute or to a freeform property string.</p>
439
440 <p>The format of the SetImageProperty method is:</p>
441
442 <pre class="code">
443   MagickBooleanType SetImageProperty(Image *image,const char *property,
444     const char *value)
445 </pre>
446
447 <p>A description of each parameter follows:</p>
448
449 <h5>image</h5>
450 <p>the image.</p>
451
452 <h5>property</h5>
453 <p>the image property.</p>
454
455 <h5>values</h5>
456 <p>the image property values.</p>
457
458  </div>
459
460 </div>
461
462 <div id="linkbar">
463     <span id="linkbar-west"> </span>
464
465     <span id="linkbar-center">
466       <a href="../../discourse-server">Discourse Server</a> •
467       <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
468       <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a> •
469       <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
470     </span>
471     <span id="linkbar-east"> </span>
472 </div>
473 <div class="footer">
474   <span id="footer-west">©  1999-2014 ImageMagick Studio LLC</span>
475   <span id="footer-east"> <a href="../../www/contact.html">Contact the Wizards</a></span>
476 </div>
477 <div style="clear: both; margin: 0; width: 100%; "></div>
478 </body>
479 </html>