Home | History | Annotate | Download | only in api
      1 
      2 
      3 
      4 
      5 <!DOCTYPE html>
      6 <html lang="en">
      7 <head>
      8     <title>ImageMagick: MagickCore, C API for ImageMagick: Dealing with Image Profiles</title>
      9   <meta charset="utf-8" />
     10   <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     11   <meta name="viewport" content="width=device-width, initial-scale=1" />
     12   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
     13   <meta name="application-name" content="ImageMagick"/>
     14   <meta name="description" content="ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bzier curves."/>
     15   <meta name="application-url" content="http://www.imagemagick.org"/>
     16   <meta name="generator" content="PHP"/>
     17   <meta name="keywords" content="magickcore, c, api, for, imagemagick:, dealing, with, image, profiles, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
     18   <meta name="rating" content="GENERAL"/>
     19   <meta name="robots" content="INDEX, FOLLOW"/>
     20   <meta name="generator" content="ImageMagick Studio LLC"/>
     21   <meta name="author" content="ImageMagick Studio LLC"/>
     22   <meta name="revisit-after" content="2 DAYS"/>
     23   <meta name="resource-type" content="document"/>
     24   <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
     25   <meta name="distribution" content="Global"/>
     26   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
     27   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
     28   <link rel="icon" href="../images/wand.png"/>
     29   <link rel="shortcut icon" href="../images/wand.ico"/>
     30   <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700">
     31   <link rel="stylesheet" href="../css/magick.html"/>
     32 </head>
     33 <body>
     34 <div class="main">
     35 <div class="magick-masthead">
     36   <div class="container">
     37     <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
     38          style="display:block"
     39          data-ad-client="ca-pub-3129977114552745"
     40          data-ad-slot="6345125851"
     41          data-ad-format="auto"></ins>
     42     <script>
     43       (adsbygoogle = window.adsbygoogle || []).push({});
     44     </script>
     45     <nav class="magick-nav">
     46       <a class="magick-nav-item " href="../index.html">Home</a>
     47       <a class="magick-nav-item " href="../binary-releases.html">Download</a>
     48       <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
     49       <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a>
     50       <a class="magick-nav-item " href="../resources.html">Resources</a>
     51       <a class="magick-nav-item " href="api.html">Develop</a>
     52       <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
     53       <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
     54     </nav>
     55   </div>
     56 </div>
     57 <div class="container">
     58 <div class="magick-header">
     59 <p class="text-center"><a href="profile.html#CloneImageProfiles">CloneImageProfiles</a> &#8226; <a href="profile.html#DeleteImageProfile">DeleteImageProfile</a> &#8226; <a href="profile.html#DestroyImageProfiles">DestroyImageProfiles</a> &#8226; <a href="profile.html#GetImageProfile">GetImageProfile</a> &#8226; <a href="profile.html#GetNextImageProfile">GetNextImageProfile</a> &#8226; <a href="profile.html#ProfileImage">ProfileImage</a> &#8226; <a href="profile.html#RemoveImageProfile">RemoveImageProfile</a> &#8226; <a href="profile.html#ResetImageProfileIterator">ResetImageProfileIterator</a> &#8226; <a href="profile.html#SetImageProfile">SetImageProfile</a> &#8226; <a href="profile.html#SyncImageProfiles">SyncImageProfiles</a></p>
     60 
     61 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="CloneImageProfiles">CloneImageProfiles</a></h2>
     62 
     63 <p>CloneImageProfiles() clones one or more image profiles.</p>
     64 
     65 <p>The format of the CloneImageProfiles method is:</p>
     66 
     67 <pre class="text">
     68 MagickBooleanType CloneImageProfiles(Image *image,
     69   const Image *clone_image)
     70 </pre>
     71 
     72 <p>A description of each parameter follows:</p>
     73 
     74 <dd>
     75 </dd>
     76 
     77 <dd> </dd>
     78 <dl class="dl-horizontal">
     79 <dt>image</dt>
     80 <dd>the image. </dd>
     81 
     82 <dd> </dd>
     83 <dt>clone_image</dt>
     84 <dd>the clone image. </dd>
     85 
     86 <dd>  </dd>
     87 </dl>
     88 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="DeleteImageProfile">DeleteImageProfile</a></h2>
     89 
     90 <p>DeleteImageProfile() deletes a profile from the image by its name.</p>
     91 
     92 <p>The format of the DeleteImageProfile method is:</p>
     93 
     94 <pre class="text">
     95 MagickBooleanTyupe DeleteImageProfile(Image *image,const char *name)
     96 </pre>
     97 
     98 <p>A description of each parameter follows:</p>
     99 
    100 <dd>
    101 </dd>
    102 
    103 <dd> </dd>
    104 <dl class="dl-horizontal">
    105 <dt>image</dt>
    106 <dd>the image. </dd>
    107 
    108 <dd> </dd>
    109 <dt>name</dt>
    110 <dd>the profile name. </dd>
    111 
    112 <dd>  </dd>
    113 </dl>
    114 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="DestroyImageProfiles">DestroyImageProfiles</a></h2>
    115 
    116 <p>DestroyImageProfiles() releases memory associated with an image profile map.</p>
    117 
    118 <p>The format of the DestroyProfiles method is:</p>
    119 
    120 <pre class="text">
    121 void DestroyImageProfiles(Image *image)
    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 </dl>
    136 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="GetImageProfile">GetImageProfile</a></h2>
    137 
    138 <p>GetImageProfile() gets a profile associated with an image by name.</p>
    139 
    140 <p>The format of the GetImageProfile method is:</p>
    141 
    142 <pre class="text">
    143 const StringInfo *GetImageProfile(const Image *image,const char *name)
    144 </pre>
    145 
    146 <p>A description of each parameter follows:</p>
    147 
    148 <dd>
    149 </dd>
    150 
    151 <dd> </dd>
    152 <dl class="dl-horizontal">
    153 <dt>image</dt>
    154 <dd>the image. </dd>
    155 
    156 <dd> </dd>
    157 <dt>name</dt>
    158 <dd>the profile name. </dd>
    159 
    160 <dd>  </dd>
    161 </dl>
    162 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="GetNextImageProfile">GetNextImageProfile</a></h2>
    163 
    164 <p>GetNextImageProfile() gets the next profile name for an image.</p>
    165 
    166 <p>The format of the GetNextImageProfile method is:</p>
    167 
    168 <pre class="text">
    169 char *GetNextImageProfile(const Image *image)
    170 </pre>
    171 
    172 <p>A description of each parameter follows:</p>
    173 
    174 <dd>
    175 </dd>
    176 
    177 <dd> </dd>
    178 <dl class="dl-horizontal">
    179 <dt>hash_info</dt>
    180 <dd>the hash info. </dd>
    181 
    182 <dd>  </dd>
    183 </dl>
    184 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="ProfileImage">ProfileImage</a></h2>
    185 
    186 <p>ProfileImage() associates, applies, or removes an ICM, IPTC, or generic profile with / to / from an image.  If the profile is NULL, it is removed from the image otherwise added or applied.  Use a name of '*' and a profile of NULL to remove all profiles from the image.</p>
    187 
    188 <p>ICC and ICM profiles are handled as follows: If the image does not have an associated color profile, the one you provide is associated with the image and the image pixels are not transformed.  Otherwise, the colorspace transform defined by the existing and new profile are applied to the image pixels and the new profile is associated with the image.</p>
    189 
    190 <p>The format of the ProfileImage method is:</p>
    191 
    192 <pre class="text">
    193 MagickBooleanType ProfileImage(Image *image,const char *name,
    194   const void *datum,const size_t length,const MagickBooleanType clone)
    195 </pre>
    196 
    197 <p>A description of each parameter follows:</p>
    198 
    199 <dd>
    200 </dd>
    201 
    202 <dd> </dd>
    203 <dl class="dl-horizontal">
    204 <dt>image</dt>
    205 <dd>the image. </dd>
    206 
    207 <dd> </dd>
    208 <dt>name</dt>
    209 <dd>Name of profile to add or remove: ICC, IPTC, or generic profile. </dd>
    210 
    211 <dd> </dd>
    212 <dt>datum</dt>
    213 <dd>the profile data. </dd>
    214 
    215 <dd> </dd>
    216 <dt>length</dt>
    217 <dd>the length of the profile. </dd>
    218 
    219 <dd> </dd>
    220 <dt>clone</dt>
    221 <dd>should be MagickFalse. </dd>
    222 
    223 <dd>  </dd>
    224 </dl>
    225 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="RemoveImageProfile">RemoveImageProfile</a></h2>
    226 
    227 <p>RemoveImageProfile() removes a named profile from the image and returns its value.</p>
    228 
    229 <p>The format of the RemoveImageProfile method is:</p>
    230 
    231 <pre class="text">
    232 void *RemoveImageProfile(Image *image,const char *name)
    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>name</dt>
    247 <dd>the profile name. </dd>
    248 
    249 <dd>  </dd>
    250 </dl>
    251 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="ResetImageProfileIterator">ResetImageProfileIterator</a></h2>
    252 
    253 <p>ResetImageProfileIterator() resets the image profile iterator.  Use it in conjunction with GetNextImageProfile() to iterate over all the profiles associated with an image.</p>
    254 
    255 <p>The format of the ResetImageProfileIterator method is:</p>
    256 
    257 <pre class="text">
    258 ResetImageProfileIterator(Image *image)
    259 </pre>
    260 
    261 <p>A description of each parameter follows:</p>
    262 
    263 <dd>
    264 </dd>
    265 
    266 <dd> </dd>
    267 <dl class="dl-horizontal">
    268 <dt>image</dt>
    269 <dd>the image. </dd>
    270 
    271 <dd>  </dd>
    272 </dl>
    273 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="SetImageProfile">SetImageProfile</a></h2>
    274 
    275 <p>SetImageProfile() adds a named profile to the image.  If a profile with the same name already exists, it is replaced.  This method differs from the ProfileImage() method in that it does not apply CMS color profiles.</p>
    276 
    277 <p>The format of the SetImageProfile method is:</p>
    278 
    279 <pre class="text">
    280 MagickBooleanType SetImageProfile(Image *image,const char *name,
    281   const StringInfo *profile)
    282 </pre>
    283 
    284 <p>A description of each parameter follows:</p>
    285 
    286 <dd>
    287 </dd>
    288 
    289 <dd> </dd>
    290 <dl class="dl-horizontal">
    291 <dt>image</dt>
    292 <dd>the image. </dd>
    293 
    294 <dd> </dd>
    295 <dt>name</dt>
    296 <dd>the profile name, for example icc, exif, and 8bim (8bim is the Photoshop wrapper for iptc profiles). </dd>
    297 
    298 <dd> </dd>
    299 <dt>profile</dt>
    300 <dd>A StringInfo structure that contains the named profile. </dd>
    301 
    302 <dd>  </dd>
    303 </dl>
    304 <h2><a href="http://www.imagemagick.org/api/MagickCore/profile_8c.html" id="SyncImageProfiles">SyncImageProfiles</a></h2>
    305 
    306 <p>SyncImageProfiles() synchronizes image properties with the image profiles. Currently we only support updating the EXIF resolution and orientation.</p>
    307 
    308 <p>The format of the SyncImageProfiles method is:</p>
    309 
    310 <pre class="text">
    311 MagickBooleanType SyncImageProfiles(Image *image)
    312 </pre>
    313 
    314 <p>A description of each parameter follows:</p>
    315 
    316 <dd>
    317 </dd>
    318 
    319 <dd> </dd>
    320 <dl class="dl-horizontal">
    321 <dt>image</dt>
    322 <dd>the image. </dd>
    323 
    324 <dd>  </dd>
    325 </dl>
    326 </div>
    327   <footer class="magick-footer">
    328     <p><a href="../support.html">Donate</a> 
    329      <a href="../sitemap.html">Sitemap</a> 
    330     <a href="../links.html">Related</a> 
    331     <a href="../architecture.html">Architecture</a>
    332 </p>
    333     <p><a href="profile.html#">Back to top</a> 
    334     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 
    335     <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
    336         <p><small>  1999-2016 ImageMagick Studio LLC</small></p>
    337   </footer>
    338 </div><!-- /.container -->
    339 
    340   <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    341   <script src="../js/magick.html"></script>
    342 </div>
    343 </body>
    344 </html>
    345