• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2
3
4
5<!DOCTYPE html>
6<html lang="en">
7<head>
8  <meta charset="utf-8"  />
9  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1,shrink-to-fit=no"  />
10  <title>ImageMagick - MagickCore, C API: Get/Set Image Properties</title>
11  <meta name="application-name" content="ImageMagick" />
12  <meta name="description" content="Use ImageMagick® to create, edit, compose, and convert bitmap images. Resize an image, crop it, change its shades and colors, add captions, and more." />
13  <meta name="application-url" content="https://imagemagick.org" />
14  <meta name="generator" content="PHP" />
15  <meta name="keywords" content="magickcore, c, api:, get/set, image, properties, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" />
16  <meta name="rating" content="GENERAL" />
17  <meta name="robots" content="INDEX, FOLLOW" />
18  <meta name="generator" content="ImageMagick Studio LLC" />
19  <meta name="author" content="ImageMagick Studio LLC" />
20  <meta name="revisit-after" content="2 DAYS" />
21  <meta name="resource-type" content="document" />
22  <meta name="copyright" content="Copyright (c) 1999-2020 ImageMagick Studio LLC" />
23  <meta name="distribution" content="Global" />
24  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
25  <meta property='og:url' content='../../' />
26  <meta property='og:title' content='ImageMagick' />
27  <meta property='og:image' content='../../images/logo.png' />
28  <meta property='og:type' content='website' />
29  <meta property='og:site_name' content='ImageMagick' />
30  <meta property='og:description' content="Convert, Edit, or Compose Bitmap Images" />
31  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
32  <link href="../../api/property.html" rel="canonical" />
33  <link href="../images/wand.png" rel="icon" />
34  <link href="../images/wand.ico" rel="shortcut icon" />
35  <link href="assets/magick.css" rel="stylesheet" />
36</head>
37<body>
38  <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
39    <a class="navbar-brand" href="../index.html"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a>
40    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsMagick" aria-controls="navbarsMagick" aria-expanded="false" aria-label="Toggle navigation">
41      <span class="navbar-toggler-icon"></span>
42    </button>
43
44    <div class="navbar-collapse collapse" id="navbarsMagick" style="">
45    <ul class="navbar-nav mr-auto">
46      <li class="nav-item ">
47        <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a>
48      </li>
49      <li class="nav-item ">
50        <a class="nav-link" href="../www/download.html">Download</a>
51      </li>
52      <li class="nav-item ">
53        <a class="nav-link" href="../www/command-line-tools.html">Tools</a>
54      </li>
55      <li class="nav-item ">
56        <a class="nav-link" href="../www/command-line-processing.html">Command-line</a>
57      </li>
58      <li class="nav-item ">
59        <a class="nav-link" href="../www/resources.html">Resources</a>
60      </li>
61      <li class="nav-item ">
62        <a class="nav-link" href="../www/develop.html">Develop</a>
63      </li>
64      <li class="nav-item">
65        <a class="nav-link" target="_blank" href="https://imagemagick.org/discourse-server/">Community</a>
66      </li>
67    </ul>
68    <form class="form-inline my-2 my-lg-0" action="../https://imagemagick.org/script/search.php">
69      <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search">
70      <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button>
71    </form>
72    </div>
73  </nav>
74  <div class="container">
75   <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
76         style="display:block"
77         data-ad-client="ca-pub-3129977114552745"
78         data-ad-slot="6345125851"
79         data-full-width-responsive="true"
80         data-ad-format="horizontal"></ins>
81    <script>
82      (adsbygoogle = window.adsbygoogle || []).push({});
83    </script>
84
85  </div>
86
87  <main class="container">
88    <div class="magick-template">
89<div class="magick-header">
90<p class="text-center"><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>
91
92<h2><a href="../../api/MagickCore/property_8c.html" id="CloneImageProperties">CloneImageProperties</a></h2>
93
94<p>CloneImageProperties() clones all the image properties to another image.</p>
95
96<p>The format of the CloneImageProperties method is:</p>
97
98<pre class="text">
99MagickBooleanType CloneImageProperties(Image *image,
100  const Image *clone_image)
101</pre>
102
103<p>A description of each parameter follows:</p>
104
105<dd>
106</dd>
107
108<dd> </dd>
109<dl class="dl-horizontal">
110<dt>image</dt>
111<dd>the image. </dd>
112
113<dd> </dd>
114<dt>clone_image</dt>
115<dd>the clone image. </dd>
116
117<dd>  </dd>
118</dl>
119<h2><a href="../../api/MagickCore/property_8c.html" id="DefineImageProperty">DefineImageProperty</a></h2>
120
121<p>DefineImageProperty() associates an assignment string of the form "key=value" with an artifact or options. It is equivelent to SetImageProperty().</p>
122
123<p>The format of the DefineImageProperty method is:</p>
124
125<pre class="text">
126MagickBooleanType DefineImageProperty(Image *image,const char *property,
127  ExceptionInfo *exception)
128</pre>
129
130<p>A description of each parameter follows:</p>
131
132<dd>
133</dd>
134
135<dd> </dd>
136<dl class="dl-horizontal">
137<dt>image</dt>
138<dd>the image. </dd>
139
140<dd> </dd>
141<dt>property</dt>
142<dd>the image property. </dd>
143
144<dd> </dd>
145<dt>exception</dt>
146<dd>return any errors or warnings in this structure. </dd>
147
148<dd>  </dd>
149</dl>
150<h2><a href="../../api/MagickCore/property_8c.html" id="DeleteImageProperty">DeleteImageProperty</a></h2>
151
152<p>DeleteImageProperty() deletes an image property.</p>
153
154<p>The format of the DeleteImageProperty method is:</p>
155
156<pre class="text">
157MagickBooleanType DeleteImageProperty(Image *image,const char *property)
158</pre>
159
160<p>A description of each parameter follows:</p>
161
162<dd>
163</dd>
164
165<dd> </dd>
166<dl class="dl-horizontal">
167<dt>image</dt>
168<dd>the image. </dd>
169
170<dd> </dd>
171<dt>property</dt>
172<dd>the image property. </dd>
173
174<dd>  </dd>
175</dl>
176<h2><a href="../../api/MagickCore/property_8c.html" id="DestroyImageProperties">DestroyImageProperties</a></h2>
177
178<p>DestroyImageProperties() destroys all properties and associated memory attached to the given image.</p>
179
180<p>The format of the DestroyDefines method is:</p>
181
182<pre class="text">
183void DestroyImageProperties(Image *image)
184</pre>
185
186<p>A description of each parameter follows:</p>
187
188<dd>
189</dd>
190
191<dd> </dd>
192<dl class="dl-horizontal">
193<dt>image</dt>
194<dd>the image. </dd>
195
196<dd>  </dd>
197</dl>
198<h2><a href="../../api/MagickCore/property_8c.html" id="FormatImageProperty">FormatImageProperty</a></h2>
199
200<p>FormatImageProperty() permits formatted property/value pairs to be saved as an image property.</p>
201
202<p>The format of the FormatImageProperty method is:</p>
203
204<pre class="text">
205MagickBooleanType FormatImageProperty(Image *image,const char *property,
206  const char *format,...)
207</pre>
208
209<p>A description of each parameter follows.</p>
210
211<dt> image</dt>
212<p>The image.</p>
213
214<dt> property</dt>
215<p>The attribute property.</p>
216
217<dt> format</dt>
218<p>A string describing the format to use to write the remaining arguments.</p>
219
220<h2><a href="../../api/MagickCore/property_8c.html" id="GetImageProperty">GetImageProperty</a></h2>
221
222<p>GetImageProperty() gets a value associated with an image property.</p>
223
224<p>This includes,  profile prefixes, such as "exif:", "iptc:" and "8bim:" It does not handle non-prifile prefixes, such as "fx:", "option:", or "artifact:".</p>
225
226<p>The returned string is stored as a properity of the same name for faster lookup later. It should NOT be freed by the caller.</p>
227
228<p>The format of the GetImageProperty method is:</p>
229
230<pre class="text">
231const char *GetImageProperty(const Image *image,const char *key,
232  ExceptionInfo *exception)
233</pre>
234
235<p>A description of each parameter follows:</p>
236
237<dd>
238</dd>
239
240<dd> </dd>
241<dl class="dl-horizontal">
242<dt>image</dt>
243<dd>the image. </dd>
244
245<dd> </dd>
246<dt>key</dt>
247<dd>the key. </dd>
248
249<dd> </dd>
250<dt>exception</dt>
251<dd>return any errors or warnings in this structure. </dd>
252
253<dd>  </dd>
254</dl>
255<h2><a href="../../api/MagickCore/property_8c.html" id="GetNextImageProperty">GetNextImageProperty</a></h2>
256
257<p>GetNextImageProperty() gets the next free-form string property name.</p>
258
259<p>The format of the GetNextImageProperty method is:</p>
260
261<pre class="text">
262char *GetNextImageProperty(const Image *image)
263</pre>
264
265<p>A description of each parameter follows:</p>
266
267<dd>
268</dd>
269
270<dd> </dd>
271<dl class="dl-horizontal">
272<dt>image</dt>
273<dd>the image. </dd>
274
275<dd>  </dd>
276</dl>
277<h2><a href="../../api/MagickCore/property_8c.html" id="InterpretImageProperties">InterpretImageProperties</a></h2>
278
279<p>InterpretImageProperties() replaces any embedded formatting characters with the appropriate image property and returns the interpreted text.</p>
280
281<p>This searches for and replaces \n \r \          replaced by newline, return, and percent resp. &amp;lt; &amp;gt; &amp;amp;   replaced by '&lt;', '&gt;', '&amp;' resp. replaced by percent</p>
282
283<p>x [x]       where 'x' is a single letter properity, case sensitive). [type:name]  where 'type' a is special and 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). It may contain ':' as long as the prefix is not special.</p>
284
285<p>Single letter  substitutions will only happen if the character before the percent is NOT a number. But braced substitutions will always be performed. This prevents the typical usage of percent in a interpreted geometry argument from being substituted when the percent is a geometry flag.</p>
286
287<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 properties.</p>
288
289<p>The returned string must be freed using DestoryString() by the caller.</p>
290
291<p>The format of the InterpretImageProperties method is:</p>
292
293<pre class="text">
294char *InterpretImageProperties(ImageInfo *image_info,
295  Image *image,const char *embed_text,ExceptionInfo *exception)
296</pre>
297
298<p>A description of each parameter follows:</p>
299
300<dd>
301</dd>
302
303<dd> </dd>
304<dl class="dl-horizontal">
305<dt>image_info</dt>
306<dd>the image info. (required) </dd>
307
308<dd> </dd>
309<dt>image</dt>
310<dd>the image. (optional) </dd>
311
312<dd> </dd>
313<dt>embed_text</dt>
314<dd>the address of a character string containing the embedded formatting characters. </dd>
315
316<dd> </dd>
317<dt>exception</dt>
318<dd>return any errors or warnings in this structure. </dd>
319
320<dd>  </dd>
321</dl>
322<h2><a href="../../api/MagickCore/property_8c.html" id="RemoveImageProperty">RemoveImageProperty</a></h2>
323
324<p>RemoveImageProperty() removes a property from the image and returns its value.</p>
325
326<p>In this case the ConstantString() value returned should be freed by the caller when finished.</p>
327
328<p>The format of the RemoveImageProperty method is:</p>
329
330<pre class="text">
331char *RemoveImageProperty(Image *image,const char *property)
332</pre>
333
334<p>A description of each parameter follows:</p>
335
336<dd>
337</dd>
338
339<dd> </dd>
340<dl class="dl-horizontal">
341<dt>image</dt>
342<dd>the image. </dd>
343
344<dd> </dd>
345<dt>property</dt>
346<dd>the image property. </dd>
347
348<dd>  </dd>
349</dl>
350<h2><a href="../../api/MagickCore/property_8c.html" id="ResetImagePropertyIterator">ResetImagePropertyIterator</a></h2>
351
352<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>
353
354<p>The format of the ResetImagePropertyIterator method is:</p>
355
356<pre class="text">
357ResetImagePropertyIterator(Image *image)
358</pre>
359
360<p>A description of each parameter follows:</p>
361
362<dd>
363</dd>
364
365<dd> </dd>
366<dl class="dl-horizontal">
367<dt>image</dt>
368<dd>the image. </dd>
369
370<dd>  </dd>
371</dl>
372<h2><a href="../../api/MagickCore/property_8c.html" id="SetImageProperty">SetImageProperty</a></h2>
373
374<p>SetImageProperty() saves the given string value either to specific known attribute or to a freeform property string.</p>
375
376<p>Attempting to set a property that is normally calculated will produce an exception.</p>
377
378<p>The format of the SetImageProperty method is:</p>
379
380<pre class="text">
381MagickBooleanType SetImageProperty(Image *image,const char *property,
382  const char *value,ExceptionInfo *exception)
383</pre>
384
385<p>A description of each parameter follows:</p>
386
387<dd>
388</dd>
389
390<dd> </dd>
391<dl class="dl-horizontal">
392<dt>image</dt>
393<dd>the image. </dd>
394
395<dd> </dd>
396<dt>property</dt>
397<dd>the image property. </dd>
398
399<dd> </dd>
400<dt>values</dt>
401<dd>the image property values. </dd>
402
403<dd> </dd>
404<dt>exception</dt>
405<dd>return any errors or warnings in this structure. </dd>
406
407<dd>  </dd>
408</dl>
409</div>
410    </div>
411  </main><!-- /.container -->
412  <footer class="magick-footer">
413    <p><a href="../www/security-policy.html">Security</a> •
414    <a href="../www/architecture.html">Architecture</a>
415
416    <a href="property.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico"/></a>
417
418    <a href="../www/links.html">Related</a> •
419     <a href="../www/sitemap.html">Sitemap</a>
420    <br/>
421    <a href="../www/support.html">Donate</a> •
422    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
423    <a href="../www/contact.html">Contact Us</a>
424    <br/>
425    <small>© 1999-2020 ImageMagick Studio LLC</small></p>
426  </footer>
427
428  <!-- Javascript assets -->
429  <script src="assets/magick.js" crossorigin="anonymous"></script>
430  <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.4.1/jquery.min.js"><\/script>')</script>
431</body>
432</html>
433<!-- Magick Cache 29th December 2019 23:26 -->