summaryrefslogtreecommitdiff
path: root/www/api/attribute.html
blob: 3887cf73beb739dfae9b4e4a9c38987bc3fdd7ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta content="en" name="language">
	<title>attribute</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link media="screen" href="../docutils-api.css" type="text/css" rel="stylesheet">

</head>

<body>

<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
  <input type="hidden" name="domains" value="www.graphicsmagick.org" />
  <input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
</form>
</div>


<div class="navmenu">
<ul>
  <li><a href="../index.html">Home</a></li>
  <li><a href="../project.html">Project</a></li>
  <li><a href="../download.html">Download</a></li>
  <li><a href="../README.html">Install</a></li>
  <li><a href="../Hg.html">Source</a></li>
  <li><a href="../NEWS.html">News</a> </li>
  <li><a href="../utilities.html">Utilities</a></li>
  <li><a href="../programming.html">Programming</a></li>
  <li><a href="../reference.html">Reference</a></li>
</ul>
</div>

<div class="document" id="attribute">
<h1 class="title">attribute</h1>
<p class="subtitle" id="access-key-value-image-attributes">Access key,value image attributes</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#cloneimageattributes" id="id9">CloneImageAttributes</a></p></li>
<li><p><a class="reference internal" href="#destroyimageattributes" id="id10">DestroyImageAttributes</a></p></li>
<li><p><a class="reference internal" href="#getimageattribute" id="id11">GetImageAttribute</a></p></li>
<li><p><a class="reference internal" href="#getimageclippingpathattribute" id="id12">GetImageClippingPathAttribute</a></p></li>
<li><p><a class="reference internal" href="#setimageattribute" id="id13">SetImageAttribute</a></p></li>
</ul>
</div>
<div class="section" id="cloneimageattributes">
<h1><a class="toc-backref" href="#id9">CloneImageAttributes</a></h1>
<div class="section" id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail CloneImageAttributes( <a class="reference external" href="../api/types.html#image">Image</a> *clone_image,
                                     const <a class="reference external" href="../api/types.html#image">Image</a> *original_image );</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>CloneImageAttributes() copies the text attributes from one image to another.
Any text attributes in the destination image are preserved.
CloneImageAttributes returns MagickPass if all of the attribututes are
successfully cloned or MagickFail if there is a memory allocation error.</p>
<p>The format of the CloneImageAttributes method is:</p>
<pre class="literal-block">MagickPassFail CloneImageAttributes( <a class="reference external" href="../api/types.html#image">Image</a> *clone_image,
                                     const <a class="reference external" href="../api/types.html#image">Image</a> *original_image );</pre>
<dl class="simple">
<dt>clone_image:</dt>
<dd><p>The destination image.</p>
</dd>
<dt>original_image:</dt>
<dd><p>The source image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="destroyimageattributes">
<h1><a class="toc-backref" href="#id10">DestroyImageAttributes</a></h1>
<div class="section" id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">DestroyImageAttributes( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id2">
<h2>Description</h2>
<p>DestroyImageAttributes() deallocates memory associated with the image
attribute list.</p>
<p>The format of the DestroyImageAttributes method is:</p>
<pre class="literal-block">DestroyImageAttributes( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="getimageattribute">
<h1><a class="toc-backref" href="#id11">GetImageAttribute</a></h1>
<div class="section" id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">const ImageAttribute *GetImageAttribute( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *key );</pre>
</div>
<div class="section" id="id4">
<h2>Description</h2>
<p>GetImageAttribute() searches the list of image attributes and returns
a pointer to the attribute if it exists otherwise NULL.</p>
<p>The format of the GetImageAttribute method is:</p>
<pre class="literal-block">const ImageAttribute *GetImageAttribute( const <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *key );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>key:</dt>
<dd><p>These character strings are the name of an image attribute to
return.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="getimageclippingpathattribute">
<h1><a class="toc-backref" href="#id12">GetImageClippingPathAttribute</a></h1>
<div class="section" id="id5">
<h2>Synopsis</h2>
<pre class="literal-block">const ImageAttribute *GetImageClippingPathAttribute( const <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</div>
<div class="section" id="id6">
<h2>Description</h2>
<p>Method GetImageClippingPathAttribute searches the list of image attributes
and returns a pointer to a clipping path if it exists otherwise NULL.</p>
<p>The format of the GetImageClippingPathAttribute method is:</p>
<pre class="literal-block">const ImageAttribute *GetImageClippingPathAttribute( const <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>attribute:</dt>
<dd><p>Method GetImageClippingPathAttribute returns the clipping
path if it exists otherwise NULL.</p>
</dd>
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</div>
</div>
<div class="section" id="setimageattribute">
<h1><a class="toc-backref" href="#id13">SetImageAttribute</a></h1>
<div class="section" id="id7">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int SetImageAttribute( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *key, const char *value );</pre>
</div>
<div class="section" id="id8">
<h2>Description</h2>
<p>SetImageAttribute() searches the list of image attributes and replaces the
attribute value.  If it is not found in the list, the attribute name
and value is added to the list.   If the attribute exists in the list,
the value is concatenated to the attribute.  SetImageAttribute returns
True if the attribute is successfully concatenated or added to the list,
otherwise False.  If the value is NULL, the matching key is deleted
from the list.</p>
<p>There is special handling for the EXIF:Orientation attribute. Setting this
attribute will also update the EXIF tag in the image's EXIF profile to the
given value provided an EXIF profile exists and has an existing EXIF
orientation tag and the attribute value is a valid orientation
(see orientationType). The attribute value will be set regardless of
whether the EXIF profile was successfully updated. The new
EXIF:Orientation attribute replaces the existing value rather than
being concatenated to it as when setting other attributes.</p>
<p>The 'comment' and 'label' attributes are treated specially in that
embedded format specifications are translated according to the formatting
rules of TranslateText().</p>
<p>The format of the SetImageAttribute method is:</p>
<pre class="literal-block">unsigned int SetImageAttribute( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *key, const char *value );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>key,value:</dt>
<dd><p>These character strings are the name and value of an image
attribute to replace or add to the list.</p>
</dd>
</dl>
</div>
</div>
</div>


<hr class="docutils">
<div class="document">
    <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2023<!--SPONSOR_LOGO--></p>
</div>

</div>
</body>
</html>