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