• 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>MagickCore, C API: Set Text Attributes @ 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:, set, text, attributes, 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="attribute.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="attribute.html#GetImageDepth">GetImageDepth</a> &#8226; <a href="attribute.html#GetImageQuantumDepth">GetImageQuantumDepth</a> &#8226; <a href="attribute.html#GetImageType">GetImageType</a> &#8226; <a href="attribute.html#IdentifyImageGray">IdentifyImageGray</a> &#8226; <a href="attribute.html#IdentifyImageMonochrome">IdentifyImageMonochrome</a> &#8226; <a href="attribute.html#IdentifyImageType">IdentifyImageType</a> &#8226; <a href="attribute.html#IsImageGray">IsImageGray</a> &#8226; <a href="attribute.html#IsImageMonochrome">IsImageMonochrome</a> &#8226; <a href="attribute.html#IsImageOpaque">IsImageOpaque</a> &#8226; <a href="attribute.html#SetImageDepth">SetImageDepth</a> &#8226; <a href="attribute.html#SetImageType">SetImageType</a></p>
85
86<h2><a href="../../api/MagickCore/attribute_8c.html" id="GetImageDepth">GetImageDepth</a></h2>
87
88<p>GetImageDepth() returns the depth of a particular image channel.</p>
89
90<p>The format of the GetImageDepth method is:</p>
91
92<pre class="text">
93size_t GetImageDepth(const Image *image,ExceptionInfo *exception)
94</pre>
95
96<p>A description of each parameter follows:</p>
97
98<dd>
99</dd>
100
101<dd> </dd>
102<dl class="dl-horizontal">
103<dt>image</dt>
104<dd>the image. </dd>
105
106<dd> </dd>
107<dt>exception</dt>
108<dd>return any errors or warnings in this structure. </dd>
109
110<dd>  </dd>
111</dl>
112<h2><a href="../../api/MagickCore/attribute_8c.html" id="GetImageQuantumDepth">GetImageQuantumDepth</a></h2>
113
114<p>GetImageQuantumDepth() returns the depth of the image rounded to a legal quantum depth: 8, 16, or 32.</p>
115
116<p>The format of the GetImageQuantumDepth method is:</p>
117
118<pre class="text">
119size_t GetImageQuantumDepth(const Image *image,
120  const MagickBooleanType constrain)
121</pre>
122
123<p>A description of each parameter follows:</p>
124
125<dd>
126</dd>
127
128<dd> </dd>
129<dl class="dl-horizontal">
130<dt>image</dt>
131<dd>the image. </dd>
132
133<dd> </dd>
134<dt>constrain</dt>
135<dd>A value other than MagickFalse, constrains the depth to a maximum of MAGICKCORE_QUANTUM_DEPTH. </dd>
136
137<dd>  </dd>
138</dl>
139<h2><a href="../../api/MagickCore/attribute_8c.html" id="GetImageType">GetImageType</a></h2>
140
141<p>GetImageType() returns the type of image:</p>
142
143<p>Bilevel         Grayscale        GrayscaleMatte Palette         PaletteMatte     TrueColor TrueColorMatte  ColorSeparation  ColorSeparationMatte</p>
144
145<p>The format of the GetImageType method is:</p>
146
147<pre class="text">
148ImageType GetImageType(const Image *image)
149</pre>
150
151<p>A description of each parameter follows:</p>
152
153<dd>
154</dd>
155
156<dd> </dd>
157<dl class="dl-horizontal">
158<dt>image</dt>
159<dd>the image. </dd>
160
161<dd>  </dd>
162</dl>
163<h2><a href="../../api/MagickCore/attribute_8c.html" id="IdentifyImageGray">IdentifyImageGray</a></h2>
164
165<p>IdentifyImageGray() returns grayscale if all the pixels in the image have the same red, green, and blue intensities, and bi-level is the intensity is either 0 or QuantumRange. Otherwise undefined is returned.</p>
166
167<p>The format of the IdentifyImageGray method is:</p>
168
169<pre class="text">
170ImageType IdentifyImageGray(const Image *image,ExceptionInfo *exception)
171</pre>
172
173<p>A description of each parameter follows:</p>
174
175<dd>
176</dd>
177
178<dd> </dd>
179<dl class="dl-horizontal">
180<dt>image</dt>
181<dd>the image. </dd>
182
183<dd> </dd>
184<dt>exception</dt>
185<dd>return any errors or warnings in this structure. </dd>
186
187<dd>  </dd>
188</dl>
189<h2><a href="../../api/MagickCore/attribute_8c.html" id="IdentifyImageMonochrome">IdentifyImageMonochrome</a></h2>
190
191<p>IdentifyImageMonochrome() returns MagickTrue if all the pixels in the image have the same red, green, and blue intensities and the intensity is either 0 or QuantumRange.</p>
192
193<p>The format of the IdentifyImageMonochrome method is:</p>
194
195<pre class="text">
196MagickBooleanType IdentifyImageMonochrome(const Image *image,
197  ExceptionInfo *exception)
198</pre>
199
200<p>A description of each parameter follows:</p>
201
202<dd>
203</dd>
204
205<dd> </dd>
206<dl class="dl-horizontal">
207<dt>image</dt>
208<dd>the image. </dd>
209
210<dd> </dd>
211<dt>exception</dt>
212<dd>return any errors or warnings in this structure. </dd>
213
214<dd>  </dd>
215</dl>
216<h2><a href="../../api/MagickCore/attribute_8c.html" id="IdentifyImageType">IdentifyImageType</a></h2>
217
218<p>IdentifyImageType() returns the potential type of image:</p>
219
220<p>Bilevel         Grayscale        GrayscaleMatte Palette         PaletteMatte     TrueColor TrueColorMatte  ColorSeparation  ColorSeparationMatte</p>
221
222<p>To ensure the image type matches its potential, use SetImageType():</p>
223
224<pre class="text">
225    (void) SetImageType(image,IdentifyImageType(image,exception),exception);
226</pre>
227
228<p>The format of the IdentifyImageType method is:</p>
229
230<pre class="text">
231ImageType IdentifyImageType(const Image *image,ExceptionInfo *exception)
232</pre>
233
234<p>A description of each parameter follows:</p>
235
236<dd>
237</dd>
238
239<dd> </dd>
240<dl class="dl-horizontal">
241<dt>image</dt>
242<dd>the image. </dd>
243
244<dd> </dd>
245<dt>exception</dt>
246<dd>return any errors or warnings in this structure. </dd>
247
248<dd>  </dd>
249</dl>
250<h2><a href="../../api/MagickCore/attribute_8c.html" id="IsImageGray">IsImageGray</a></h2>
251
252<p>IsImageGray() returns MagickTrue if the type of the image is grayscale or bi-level.</p>
253
254<p>The format of the IsImageGray method is:</p>
255
256<pre class="text">
257MagickBooleanType IsImageGray(const Image *image)
258</pre>
259
260<p>A description of each parameter follows:</p>
261
262<dd>
263</dd>
264
265<dd> </dd>
266<dl class="dl-horizontal">
267<dt>image</dt>
268<dd>the image. </dd>
269
270<dd>  </dd>
271</dl>
272<h2><a href="../../api/MagickCore/attribute_8c.html" id="IsImageMonochrome">IsImageMonochrome</a></h2>
273
274<p>IsImageMonochrome() returns MagickTrue if type of the image is bi-level.</p>
275
276<p>The format of the IsImageMonochrome method is:</p>
277
278<pre class="text">
279MagickBooleanType IsImageMonochrome(const Image *image)
280</pre>
281
282<p>A description of each parameter follows:</p>
283
284<dd>
285</dd>
286
287<dd> </dd>
288<dl class="dl-horizontal">
289<dt>image</dt>
290<dd>the image. </dd>
291
292<dd>  </dd>
293</dl>
294<h2><a href="../../api/MagickCore/attribute_8c.html" id="IsImageOpaque">IsImageOpaque</a></h2>
295
296<p>IsImageOpaque() returns MagickTrue if none of the pixels in the image have an alpha value other than OpaqueAlpha (QuantumRange).</p>
297
298<p>Will return true immediatally is alpha channel is not available.</p>
299
300<p>The format of the IsImageOpaque method is:</p>
301
302<pre class="text">
303MagickBooleanType IsImageOpaque(const Image *image,
304  ExceptionInfo *exception)
305</pre>
306
307<p>A description of each parameter follows:</p>
308
309<dd>
310</dd>
311
312<dd> </dd>
313<dl class="dl-horizontal">
314<dt>image</dt>
315<dd>the image. </dd>
316
317<dd> </dd>
318<dt>exception</dt>
319<dd>return any errors or warnings in this structure. </dd>
320
321<dd>  </dd>
322</dl>
323<h2><a href="../../api/MagickCore/attribute_8c.html" id="SetImageDepth">SetImageDepth</a></h2>
324
325<p>SetImageDepth() sets the depth of the image.</p>
326
327<p>The format of the SetImageDepth method is:</p>
328
329<pre class="text">
330MagickBooleanType SetImageDepth(Image *image,const size_t depth,
331  ExceptionInfo *exception)
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>channel</dt>
346<dd>the channel. </dd>
347
348<dd> </dd>
349<dt>depth</dt>
350<dd>the image depth. </dd>
351
352<dd> </dd>
353<dt>exception</dt>
354<dd>return any errors or warnings in this structure. </dd>
355
356<dd>  </dd>
357</dl>
358<h2><a href="../../api/MagickCore/attribute_8c.html" id="SetImageType">SetImageType</a></h2>
359
360<p>SetImageType() sets the type of image.  Choose from these types:</p>
361
362<p>Bilevel        Grayscale       GrayscaleMatte Palette        PaletteMatte    TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte OptimizeType</p>
363
364<p>The format of the SetImageType method is:</p>
365
366<pre class="text">
367MagickBooleanType SetImageType(Image *image,const ImageType type,
368  ExceptionInfo *exception)
369</pre>
370
371<p>A description of each parameter follows:</p>
372
373<dd>
374</dd>
375
376<dd> </dd>
377<dl class="dl-horizontal">
378<dt>image</dt>
379<dd>the image. </dd>
380
381<dd> </dd>
382<dt>type</dt>
383<dd>Image type. </dd>
384
385<dd> </dd>
386<dt>exception</dt>
387<dd>return any errors or warnings in this structure. </dd>
388
389<dd>  </dd>
390</dl>
391</div>
392    </div>
393  </main><!-- /.container -->
394  <footer class="magick-footer">
395    <p><a href="../../www/security-policy.html">Security</a> •
396    <a href="../../www/architecture.html">Architecture</a> •
397    <a href="../../www/links.html">Related</a> •
398     <a href="../../www/sitemap.html">Sitemap</a>
399
400    <a href="attribute.html#"><img class="d-inline" id="wand" alt="And Now a Touch of Magick" width="16" height="16" src="../../images/wand.ico"/></a>
401
402    <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
403    <a href="../../www/support.html">Donate</a> •
404    <a href="../../www/contact.html">Contact Us</a>
405    <br/>
406    <small>© 1999-2019 ImageMagick Studio LLC</small></p>
407  </footer>
408
409  <!-- Javascript assets -->
410  <script src="../assets/magick.js" crossorigin="anonymous"></script>
411  <script>window.jQuery || document.write('<script src="https://localhost/ajax/libs/jquery/3.3.1/jquery.min.js"><\/script>')</script>
412</body>
413</html>
414<!-- Magick Cache 3rd January 2019 05:28 -->