profile.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <title>ImageMagick – MagickCore, C API: Dealing with Image Profiles</title>
  7. <meta name="application-name" content="ImageMagick" />
  8. <meta name="description" content="" />
  9. <meta name="application-url" content="https://imagemagick.org" />
  10. <meta name="generator" content="PHP" />
  11. <meta name="keywords" content="magickcore, c, api:, dealing, with, image, profiles, image processing software" />
  12. <meta name="rating" content="GENERAL" />
  13. <meta name="robots" content="INDEX, FOLLOW" />
  14. <meta name="generator" content="ImageMagick Studio LLC" />
  15. <meta name="author" content="ImageMagick Studio LLC" />
  16. <meta name="revisit-after" content="2 DAYS" />
  17. <meta name="resource-type" content="document" />
  18. <meta name="copyright" content="Copyright (c) 1999 ImageMagick Studio LLC" />
  19. <meta name="distribution" content="Global" />
  20. <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" />
  21. <meta property='og:url' content='../../' />
  22. <meta property='og:title' content='ImageMagick' />
  23. <meta property='og:image' content='../../../images/logo.png' />
  24. <meta property='og:type' content='website' />
  25. <meta property='og:site_name' content='ImageMagick' />
  26. <meta property='og:description' content="Create, Edit, Compose, or Convert Digital Images" />
  27. <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
  28. <link href="profile.html" rel="canonical" />
  29. <link href="../../../images/wand.png" rel="icon" />
  30. <link href="../../../images/wand.ico" rel="shortcut icon" />
  31. <link href="../../assets/magick.css" rel="stylesheet" />
  32. </head>
  33. <body>
  34. <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
  35. <div class="container-fluid">
  36. <a class="navbar-brand" href="../../"><img class="d-block" id="icon" alt="ImageMagick" width="32" height="32" src="../../../images/wand.ico"/></a>
  37. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#magick-navbars" aria-controls="magick-navbars" aria-expanded="false" aria-label="Toggle navigation">
  38. <span class="navbar-toggler-icon"></span>
  39. </button>
  40. <div class="collapse navbar-collapse" id="magick-navbars">
  41. <ul class="navbar-nav me-auto mb-2 mb-md-0">
  42. <li class="nav-item">
  43. <a class="nav-link " href="../../www/download.html">Download</a>
  44. </li>
  45. <li class="nav-item">
  46. <a class="nav-link " href="../../www/command-line-tools.html">Tools</a>
  47. </li>
  48. <li class="nav-item">
  49. <a class="nav-link " href="../../www/command-line-processing.html">CLI</a>
  50. </li>
  51. <li class="nav-item">
  52. <a class="nav-link " href="../../www/develop.html">Develop</a>
  53. </li>
  54. <li class="nav-item">
  55. <a class="nav-link" target="_blank" href="https://github.com/ImageMagick/ImageMagick/discussions">Community</a>
  56. </li>
  57. <li class="nav-item">
  58. <iframe src="https://github.com/sponsors/ImageMagick/button" title="Sponsor ImageMagick" height="35" width="107" style="border: 0;"></iframe>
  59. </li>
  60. </ul>
  61. <form class="d-flex form-inline" action="https://imagemagick.org/script/search.php">
  62. <input class="form-control me-2" type="text" name="q" placeholder="Search" aria-label="Search">
  63. <button class="btn btn-outline-success" type="submit" name="sa">Search</button>
  64. </form>
  65. </div>
  66. </div>
  67. </nav>
  68. <div class="container">
  69. <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script>
  70. <ins class="adsbygoogle"
  71. style="display:block"
  72. data-ad-client="ca-pub-3129977114552745"
  73. data-ad-slot="6345125851"
  74. data-full-width-responsive="true"
  75. data-ad-format="horizontal"></ins>
  76. <script>
  77. (adsbygoogle = window.adsbygoogle || []).push({});
  78. </script>
  79. </div>
  80. <main class="container">
  81. <div class="magick-template">
  82. <br/>
  83. <div class="btn-group">
  84. <button class="btn btn-secondary dropdown-toggle" type="button" id="defaultDropdown" data-bs-toggle="dropdown" data-bs-auto-close="true" aria-expanded="false">
  85. Select API Method
  86. </button>
  87. <ul class="dropdown-menu pre-scrollable" aria-labelledby="defaultDropdown">
  88. <li><a href="profile.html#CloneImageProfiles">CloneImageProfiles</a></li>
  89. <li><a href="profile.html#DeleteImageProfile">DeleteImageProfile</a></li>
  90. <li><a href="profile.html#DestroyImageProfiles">DestroyImageProfiles</a></li>
  91. <li><a href="profile.html#GetImageProfile">GetImageProfile</a></li>
  92. <li><a href="profile.html#GetNextImageProfile">GetNextImageProfile</a></li>
  93. <li><a href="profile.html#ProfileImage">ProfileImage</a></li>
  94. <li><a href="profile.html#RemoveImageProfile">RemoveImageProfile</a></li>
  95. <li><a href="profile.html#ResetImageProfileIterator">ResetImageProfileIterator</a></li>
  96. <li><a href="profile.html#SetImageProfile">SetImageProfile</a></li>
  97. </ul>
  98. </div>
  99. <br/>
  100. <br/>
  101. <div class="magick-header">
  102. <h2><a href="../../api/MagickCore/profile_8c.html" id="CloneImageProfiles">CloneImageProfiles</a></h2>
  103. <p>CloneImageProfiles() clones one or more image profiles.</p>
  104. <p>The format of the CloneImageProfiles method is:</p>
  105. <pre class="bg-light text-dark mx-4"><samp>MagickBooleanType CloneImageProfiles(Image *image,
  106. const Image *clone_image)
  107. </samp></pre>
  108. <p>A description of each parameter follows:</p>
  109. <dd>
  110. </dd>
  111. <dd> </dd>
  112. <dl class="dl-horizontal">
  113. <dt>image</dt>
  114. <dd>the image. </dd>
  115. <dd> </dd>
  116. <dt>clone_image</dt>
  117. <dd>the clone image. </dd>
  118. <dd> </dd>
  119. </dl>
  120. <h2><a href="../../api/MagickCore/profile_8c.html" id="DeleteImageProfile">DeleteImageProfile</a></h2>
  121. <p>DeleteImageProfile() deletes a profile from the image by its name.</p>
  122. <p>The format of the DeleteImageProfile method is:</p>
  123. <pre class="bg-light text-dark mx-4"><samp>MagickBooleanType DeleteImageProfile(Image *image,const char *name)
  124. </samp></pre>
  125. <p>A description of each parameter follows:</p>
  126. <dd>
  127. </dd>
  128. <dd> </dd>
  129. <dl class="dl-horizontal">
  130. <dt>image</dt>
  131. <dd>the image. </dd>
  132. <dd> </dd>
  133. <dt>name</dt>
  134. <dd>the profile name. </dd>
  135. <dd> </dd>
  136. </dl>
  137. <h2><a href="../../api/MagickCore/profile_8c.html" id="DestroyImageProfiles">DestroyImageProfiles</a></h2>
  138. <p>DestroyImageProfiles() releases memory associated with an image profile map.</p>
  139. <p>The format of the DestroyProfiles method is:</p>
  140. <pre class="bg-light text-dark mx-4"><samp>void DestroyImageProfiles(Image *image)
  141. </samp></pre>
  142. <p>A description of each parameter follows:</p>
  143. <dd>
  144. </dd>
  145. <dd> </dd>
  146. <dl class="dl-horizontal">
  147. <dt>image</dt>
  148. <dd>the image. </dd>
  149. <dd> </dd>
  150. </dl>
  151. <h2><a href="../../api/MagickCore/profile_8c.html" id="GetImageProfile">GetImageProfile</a></h2>
  152. <p>GetImageProfile() gets a profile associated with an image by name.</p>
  153. <p>The format of the GetImageProfile method is:</p>
  154. <pre class="bg-light text-dark mx-4"><samp>const StringInfo *GetImageProfile(const Image *image,const char *name)
  155. </samp></pre>
  156. <p>A description of each parameter follows:</p>
  157. <dd>
  158. </dd>
  159. <dd> </dd>
  160. <dl class="dl-horizontal">
  161. <dt>image</dt>
  162. <dd>the image. </dd>
  163. <dd> </dd>
  164. <dt>name</dt>
  165. <dd>the profile name. </dd>
  166. <dd> </dd>
  167. </dl>
  168. <h2><a href="../../api/MagickCore/profile_8c.html" id="GetNextImageProfile">GetNextImageProfile</a></h2>
  169. <p>GetNextImageProfile() gets the next profile name for an image.</p>
  170. <p>The format of the GetNextImageProfile method is:</p>
  171. <pre class="bg-light text-dark mx-4"><samp>char *GetNextImageProfile(const Image *image)
  172. </samp></pre>
  173. <p>A description of each parameter follows:</p>
  174. <dd>
  175. </dd>
  176. <dd> </dd>
  177. <dl class="dl-horizontal">
  178. <dt>hash_info</dt>
  179. <dd>the hash info. </dd>
  180. <dd> </dd>
  181. </dl>
  182. <h2><a href="../../api/MagickCore/profile_8c.html" id="ProfileImage">ProfileImage</a></h2>
  183. <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>
  184. <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>
  185. <p>The format of the ProfileImage method is:</p>
  186. <pre class="bg-light text-dark mx-4"><samp>MagickBooleanType ProfileImage(Image *image,const char *name,
  187. const void *datum,const size_t length,const MagickBooleanType clone)
  188. </samp></pre>
  189. <p>A description of each parameter follows:</p>
  190. <dd>
  191. </dd>
  192. <dd> </dd>
  193. <dl class="dl-horizontal">
  194. <dt>image</dt>
  195. <dd>the image. </dd>
  196. <dd> </dd>
  197. <dt>name</dt>
  198. <dd>Name of profile to add or remove: ICC, IPTC, or generic profile. </dd>
  199. <dd> </dd>
  200. <dt>datum</dt>
  201. <dd>the profile data. </dd>
  202. <dd> </dd>
  203. <dt>length</dt>
  204. <dd>the length of the profile. </dd>
  205. <dd> </dd>
  206. <dt>clone</dt>
  207. <dd>should be MagickFalse. </dd>
  208. <dd> </dd>
  209. </dl>
  210. <h2><a href="../../api/MagickCore/profile_8c.html" id="RemoveImageProfile">RemoveImageProfile</a></h2>
  211. <p>RemoveImageProfile() removes a named profile from the image and returns its value.</p>
  212. <p>The format of the RemoveImageProfile method is:</p>
  213. <pre class="bg-light text-dark mx-4"><samp>void *RemoveImageProfile(Image *image,const char *name)
  214. </samp></pre>
  215. <p>A description of each parameter follows:</p>
  216. <dd>
  217. </dd>
  218. <dd> </dd>
  219. <dl class="dl-horizontal">
  220. <dt>image</dt>
  221. <dd>the image. </dd>
  222. <dd> </dd>
  223. <dt>name</dt>
  224. <dd>the profile name. </dd>
  225. <dd> </dd>
  226. </dl>
  227. <h2><a href="../../api/MagickCore/profile_8c.html" id="ResetImageProfileIterator">ResetImageProfileIterator</a></h2>
  228. <p>ResetImageProfileIterator() resets the image profile iterator. Use it in conjunction with GetNextImageProfile() to iterate over all the profiles associated with an image.</p>
  229. <p>The format of the ResetImageProfileIterator method is:</p>
  230. <pre class="bg-light text-dark mx-4"><samp>ResetImageProfileIterator(Image *image)
  231. </samp></pre>
  232. <p>A description of each parameter follows:</p>
  233. <dd>
  234. </dd>
  235. <dd> </dd>
  236. <dl class="dl-horizontal">
  237. <dt>image</dt>
  238. <dd>the image. </dd>
  239. <dd> </dd>
  240. </dl>
  241. <h2><a href="../../api/MagickCore/profile_8c.html" id="SetImageProfile">SetImageProfile</a></h2>
  242. <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>
  243. <p>The format of the SetImageProfile method is:</p>
  244. <pre class="bg-light text-dark mx-4"><samp>MagickBooleanType SetImageProfile(Image *image,const char *name,
  245. const StringInfo *profile)
  246. </samp></pre>
  247. <p>A description of each parameter follows:</p>
  248. <dd>
  249. </dd>
  250. <dd> </dd>
  251. <dl class="dl-horizontal">
  252. <dt>image</dt>
  253. <dd>the image. </dd>
  254. <dd> </dd>
  255. <dt>name</dt>
  256. <dd>the profile name, for example icc, exif, and 8bim (8bim is the Photoshop wrapper for iptc profiles). </dd>
  257. <dd> </dd>
  258. <dt>profile</dt>
  259. <dd>A StringInfo structure that contains the named profile. </dd>
  260. <dd> </dd>
  261. </dl>
  262. <h2><a href="../../api/MagickCore/profile_8c.html" id="SyncImageProfiles">SyncImageProfiles</a></h2>
  263. <p>SyncImageProfiles() synchronizes image properties with the image profiles.</p>
  264. <p>The format of the SyncImageProfiles method is:</p>
  265. <pre class="bg-light text-dark mx-4"><samp>void SyncImageProfiles(Image *image)
  266. </samp></pre>
  267. <p>A description of each parameter follows:</p>
  268. <dd>
  269. </dd>
  270. <dd> </dd>
  271. <dl class="dl-horizontal">
  272. <dt>image</dt>
  273. <dd>the image. </dd>
  274. <dd> </dd>
  275. </dl>
  276. </div>
  277. </div>
  278. </main><!-- /.container -->
  279. <footer class="magick-footer">
  280. <div class="container-fluid">
  281. <a href="../../www/security-policy.html">Security</a> •
  282. <a href="../../www/news.html">News</a>
  283. <a href="profile.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../../images/wand.ico"/></a>
  284. <a href="../../www/links.html">Related</a> •
  285. <a href="../../www/sitemap.html">Sitemap</a>
  286. <br/>
  287. <a href="../../www/support.html">Sponsor</a> •
  288. <a href="../../www/cite.html">Cite</a> •
  289. <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
  290. <a href="../../www/contact.html">Contact Us</a>
  291. <br/>
  292. <a href="https://github.com/imagemagick/imagemagick" target="_blank" rel="noopener" aria-label="GitHub"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 512 499.36" width="2%" height="2%" role="img" focusable="false"><title>GitHub</title><path fill="currentColor" fill-rule="evenodd" d="M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z"/></svg></a> •
  293. <a href="https://twitter.com/imagemagick" target="_blank" rel="noopener" aria-label="Twitter"><svg xmlns="http://www.w3.org/2000/svg" class="navbar-nav-svg" viewBox="0 0 300 300" width="2%" height="2%" role="img" focusable="false"><title>Twitter</title><path d="M178.57 127.15 290.27 0h-26.46l-97.03 110.38L89.34 0H0l117.13 166.93L0 300.25h26.46l102.4-116.59 81.8 116.59h89.34M36.01 19.54H76.66l187.13 262.13h-40.66"/></svg></a>
  294. <br/>
  295. <small>Copyright © 1999 ImageMagick Studio LLC</small>
  296. </div>
  297. </footer>
  298. <!-- Javascript assets -->
  299. <script src="../../assets/magick.js" ></script>
  300. </body>
  301. </html>