blob: bd1c2bd82c6843d483b430bda9577f2f06a0d858 [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
2<html>
3<head>
4 <meta http-equiv="Content-Type"
5 content="text/html; charset=iso-8859-1">
6 <meta name="GENERATOR"
7 content="Mozilla/4.78 [en] (X11; U; SunOS 5.6 sun4u) [Netscape]">
8 <meta name="Author" content="Bob Friesenhahn">
9 <meta name="Description" content="Description of Magick::Image Class">
10 <title>Magick::Image Class</title>
11</head>
12<body text="#000000" bgcolor="#ffffff" link="#0000ee" vlink="#551a8b"
13 alink="#ff0000">
14<center>
15<h1> Magick::Image Class</h1>
16</center>
17<h4> Quick Contents</h4>
18<ul>
19 <li> <a href="#BLOBs">BLOBs</a> </li>
20 <li> <a href="#Constructors">Constructors</a> </li>
21 <li> <a href="#Image%20Manipulation%20Methods">Image Manipulation
22Methods</a> </li>
23 <li> <a href="#Image%20Attributes">Image Attributes</a> </li>
24 <li> <a href="#Raw%20Image%20Pixel%20Access">Low-Level Image Pixel
25Access</a> </li>
26</ul>
27<hr width="100%">Image is the primary object in Magick++ and represents
28a single image frame (see <a href="ImageDesign.html">design</a> ). The <a
29 href="STL.html">STL interface</a> <b>must</b> be used to operate on
30image sequences or images (e.g. of format GIF, TIFF, MIFF, Postscript,
31&amp; MNG) which are comprized of multiple image frames. Individual
32frames of a multi-frame image may be requested by adding array-style
33notation to the end of the file name (e.g. "animation.gif[3]" retrieves
34the fourth frame of a GIF animation.&nbsp; Various image manipulation
35operations may be applied to the image. Attributes may be set on the
36image to influence the operation of the manipulation operations. The <a
37 href="Pixels.html"> Pixels</a> class provides low-level access to image
38pixels. As a convenience, including <tt><font color="#663366">&lt;Magick++.h&gt;</font></tt>
39is sufficient in order to use the complete Magick++ API. The Magick++
40API is enclosed within the <i>Magick</i> namespace so you must either
41add the prefix "<tt> Magick::</tt> " to each class/enumeration name or add
42the statement "<tt> using namespace Magick;</tt>" after including the <tt>Magick++.h</tt>
43header.
44<p>The preferred way to allocate Image objects is via automatic
45allocation (on the stack). There is no concern that allocating Image
46objects on the stack will excessively enlarge the stack since Magick++
47allocates all large data objects (such as the actual image data) from
48the heap. Use of automatic allocation is preferred over explicit
49allocation (via <i>new</i>) since it is much less error prone and
50allows use of C++ scoping rules to avoid memory leaks. Use of automatic
51allocation allows Magick++ objects to be assigned and copied just like
52the C++ intrinsic data types (e.g. '<i>int</i> '), leading to clear and
53easy to read code. Use of automatic allocation leads to naturally
54exception-safe code since if an exception is thrown, the object is
55automatically deallocated once the stack unwinds past the scope of the
56allocation (not the case for objects allocated via <i>new</i> ). </p>
57<p>Image is very easy to use. For example, here is a the source to a
58program which reads an image, crops it, and writes it to a new file (the
59exception handling is optional but strongly recommended): </p>
60<blockquote><tt><font color="#000066">#include &lt;Magick++.h&gt;</font></tt> <br>
61 <tt><font color="#000066">#include &lt;iostream&gt;</font></tt> <br>
62 <tt><font color="#000066">using namespace std;</font></tt> <br>
63 <tt><font color="#000066">using namespace Magick;</font></tt> <br>
64 <tt><font color="#000066">int main(int argc,char **argv)</font></tt> <br>
65 <tt><font color="#000066">{</font></tt> <br>
66 <tt><font color="#000066">&nbsp; // Construct the image object.
67Seperating image construction from the</font></tt> <br>
68 <tt><font color="#000066">&nbsp; // the read operation ensures that a
69failure to read the image file</font></tt> <br>
70 <tt><font color="#000066">&nbsp; // doesn't render the image object
71useless.</font></tt> <br>
72 <tt><font color="#000066">&nbsp; Image image;</font></tt><tt><font
73 color="#000066"></font></tt>
74 <p><tt><font color="#000066">&nbsp; try {</font></tt> <br>
75 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; // Read a file into
76image object</font></tt> <br>
77 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.read( "girl.gif" );</font></tt> </p>
78 <p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; // Crop the image to
79specified size</font></tt> (width, height, xOffset, yOffset)<br>
80 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.crop(
81Geometry(100,100, 100, 100) );</font></tt> </p>
82 <p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; // Write the image to
83a file</font></tt> <br>
84 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.write( "x.gif" );</font></tt> <br>
85 <tt><font color="#000066">&nbsp; }</font></tt> <br>
86 <tt><font color="#000066">&nbsp; catch( Exception &amp;error_ )</font></tt> <br>
87 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; {</font></tt> <br>
88 <tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout
89&lt;&lt; "Caught exception: " &lt;&lt; error_.what() &lt;&lt; endl;</font></tt> <br>
90 <tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 1;</font></tt> <br>
91 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; }</font></tt> <br>
92 <tt><font color="#000066">&nbsp; return 0;</font></tt> <br>
93 <tt><font color="#000066">}</font></tt></p>
94</blockquote>
95The following is the source to a program which illustrates the use of
96Magick++'s efficient reference-counted assignment and copy-constructor
97operations which minimize use of memory and eliminate unncessary copy
98operations (allowing Image objects to be efficiently assigned, and
99copied into containers).&nbsp; The program accomplishes the
100following:
101<ol>
102 <li> Read master image.</li>
103 <li> Assign master image to second image.</li>
104 <li> Zoom second image to the size 640x480.</li>
105 <li> Assign master image to a third image.</li>
106 <li> Zoom third image to the size 800x600.</li>
107 <li> Write the second image to a file.</li>
108 <li> Write the third image to a file.</li>
109</ol>
110<blockquote><tt><font color="#000066">#include &lt;Magick++.h&gt;</font></tt> <br>
111 <tt><font color="#000066">#include &lt;iostream&gt;</font></tt> <br>
112 <tt><font color="#000066">using namespace std;</font></tt> <br>
113 <tt><font color="#000066">using namespace Magick;</font></tt> <br>
114 <tt><font color="#000066">int main(int argc,char **argv)</font></tt> <br>
115 <tt><font color="#000066">{</font></tt> <br>
116 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; Image
117master("horse.jpg");</font></tt> <br>
118 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; Image second = master;</font></tt> <br>
119 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; second.zoom("640x480");</font></tt> <br>
120 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; Image third = master;</font></tt> <br>
121 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; third.zoom("800x600");</font></tt> <br>
122 <tt><font color="#000066">&nbsp;&nbsp;&nbsp;
123second.write("horse640x480.jpg");</font></tt> <br>
124 <tt><font color="#000066">&nbsp;&nbsp;&nbsp;
125third.write("horse800x600.jpg");</font></tt> <br>
126 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; return 0;</font></tt> <br>
127 <tt><font color="#000066">}</font></tt></blockquote>
128During the entire operation, a maximum of three images exist in memory
129and the image data is never copied.
130<p>The following is the source for another simple program which creates
131 a 100 by 100 pixel white image with a red pixel in the center and
132writes it to a file: </p>
133<blockquote><tt><font color="#000066">#include &lt;Magick++.h&gt;</font></tt> <br>
134 <tt><font color="#000066">using namespace std;</font></tt> <br>
135 <tt><font color="#000066">using namespace Magick;</font></tt> <br>
136 <tt><font color="#000066">int main(int argc,char **argv)</font></tt> <br>
137 <tt><font color="#000066">{</font></tt> <br>
138 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; Image image( "100x100",
139"white" );</font></tt> <br>
140 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.pixelColor( 49,
14149, "red" );</font></tt> <br>
142 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.write(
143"red_pixel.png" );</font></tt> <br>
144 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; return 0;</font></tt> <br>
145 <tt><font color="#000066">}</font></tt></blockquote>
146If you wanted to change the color image to grayscale, you could add the
147lines:
148<p><tt><font color="#000066">&nbsp;&nbsp;&nbsp;
149image.quantizeColorSpace( GRAYColorspace );</font></tt> <br>
150<tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.quantizeColors( 256
151);</font></tt> <br>
152<tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.quantize( );</font></tt> </p>
153<p>or, more simply: </p>
154<p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.type(
155GrayscaleType );</font></tt> </p>
156<p>prior to writing the image. </p>
157<center>
158<h3> <a name="BLOBs"></a> BLOBs</h3>
159</center>
160While encoded images (e.g. JPEG) are most often written-to and
161read-from a disk file, encoded images may also reside in memory. Encoded
162images in memory are known as BLOBs (Binary Large OBjects) and may be
163represented using the <a href="Blob.html">Blob</a> class. The encoded
164image may be initially placed in memory by reading it directly from a
165file, reading the image from a database, memory-mapped from a disk
166file, or could be written to memory by Magick++. Once the encoded image
167has been placed within a Blob, it may be read into a Magick++ Image via
168a <a href="#constructor_blob">constructor</a> or <a href="#read">read()</a>
169. Likewise, a Magick++ image may be written to a Blob via <a
170 href="#write"> write()</a> .
171<p>An example of using Image to write to a Blob follows: <br>
172&nbsp; </p>
173<blockquote><tt><font color="#000066">#include &lt;Magick++.h&gt;</font></tt> <br>
174 <tt><font color="#000066">using namespace std;</font></tt> <br>
175 <tt><font color="#000066">using namespace Magick;</font></tt> <br>
176 <tt><font color="#000066">int main(int argc,char **argv)</font></tt> <br>
177 <tt><font color="#000066">{</font></tt> <br>
178 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; // Read GIF file from
179disk</font></tt> <br>
180 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; Image image(
181"giraffe.gif" );</font></tt>
182 <p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; // Write to BLOB in
183JPEG format</font></tt> <br>
184 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; Blob blob;</font></tt> <br>
185 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.magick( "JPEG" )
186// Set JPEG output format</font></tt> <br>
187 <tt><font color="#000066">&nbsp;&nbsp;&nbsp; image.write( &amp;blob );</font></tt> </p>
188 <p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; [ Use BLOB data (in
189JPEG format) here ]</font></tt> </p>
190 <p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; return 0;</font></tt> <br>
191 <tt><font color="#000066">}</font></tt></p>
192</blockquote>
193<p><br>
194likewise, to read an image from a Blob, you could use one of the
195following examples: </p>
196<p>[ <font color="#000000">Entry condition for the following examples
197is that <i>data</i> is pointer to encoded image data and <i>length</i>
198represents the size of the data</font> ] </p>
199<blockquote><tt><font color="#000066">Blob blob( data, length );</font></tt> <br>
200 <tt><font color="#000066">Image image( blob );</font></tt></blockquote>
201or
202<blockquote><tt><font color="#000066">Blob blob( data, length );</font></tt> <br>
203 <tt><font color="#000066">Image image;</font></tt> <br>
204 <tt><font color="#000066">image.read( blob);</font></tt></blockquote>
205some images do not contain their size or format so the size and format
206must be specified in advance:
207<blockquote><tt><font color="#000066">Blob blob( data, length );</font></tt> <br>
208 <tt><font color="#000066">Image image;</font></tt> <br>
209 <tt><font color="#000066">image.size( "640x480")</font></tt> <br>
210 <tt><font color="#000066">image.magick( "RGBA" );</font></tt> <br>
211 <tt><font color="#000066">image.read( blob);</font></tt></blockquote>
212<center>
213<h3> <a name="Constructors"></a> Constructors</h3>
214</center>
215Image may be constructed in a number of ways. It may be constructed
216from a file, a URL, or an encoded image (e.g. JPEG) contained in an
217in-memory <a href="Blob.html"> BLOB</a> . The available Image
218constructors are shown in the following table: <br>
219&nbsp; <br>
220&nbsp;
221<table border="1" width="100%" bgcolor="#ffffff">
222 <caption><b>Image Constructors</b></caption> <tbody>
223 <tr>
224 <td>
225 <center><b>Signature</b></center>
226 </td>
227 <td>
228 <center><b>Description</b></center>
229 </td>
230 </tr>
231 <tr>
232 <td><font size="-1">const std::string &amp;imageSpec_</font></td>
233 <td><font size="-1">Construct Image by reading from file or URL
234specified by <i>imageSpec_</i>. Use array notation (e.g. filename[9])
235to select a specific scene from a multi-frame image.</font></td>
236 </tr>
237 <tr>
238 <td><font size="-1">const Geometry &amp;size_, const <a
239 href="Color.html"> Color</a> &amp;color_</font></td>
240 <td><font size="-1">Construct a blank image canvas of specified
241size and color</font></td>
242 </tr>
243 <tr>
244 <td><a name="constructor_blob"></a> <font size="-1">const <a
245 href="Blob.html">Blob</a> &amp;blob_</font></td>
246 <td rowspan="5"><font size="-1">Construct Image by reading from
247encoded image data contained in an in-memory <a href="Blob.html">BLOB</a>
248. Depending on the constructor arguments, the Blob <a href="#size">size</a>
249, <a href="#depth">depth</a> , <a href="#magick">magick</a> (format) may
250also be specified. Some image formats require that size be specified.
251The default ImageMagick uses for depth depends on the compiled-in
252Quantum size (8 or 16).&nbsp; If ImageMagick's Quantum size does not
253match that of the image, the depth may need to be specified.
254ImageMagick can usually automatically detect the image's format.
255When a format can't be automatically detected, the format (<a
256 href="#magick">magick</a> ) must be specified.</font></td>
257 </tr>
258 <tr>
259 <td><font size="-1">const <a href="Blob.html">Blob</a>
260&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_</font></td>
261 </tr>
262 <tr>
263 <td><font size="-1">const <a href="Blob.html">Blob</a>
264&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size,
265unsigned int depth</font></td>
266 </tr>
267 <tr>
268 <td><font size="-1">const <a href="Blob.html">Blob</a>
269&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size,
270unsigned int depth_, const string &amp;magick_</font></td>
271 </tr>
272 <tr>
273 <td><font size="-1">const <a href="Blob.html">Blob</a>
274&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size, const
275string &amp;magick_</font></td>
276 </tr>
277 <tr>
278 <td><font size="-1">const unsigned int width_,&nbsp;</font> <br>
279 <font size="-1">const unsigned int height_,</font> <br>
280 <font size="-1">std::string map_,</font> <br>
281 <font size="-1">const <a href="Enumerations.html#StorageType">
282StorageType</a> type_,</font> <br>
283 <font size="-1">const unsigned char* pixels_</font></td>
284 <td><font size="-1">Construct a new Image based on an array of
285image pixels. The pixel data must be in scanline order top-to-bottom.
286The data can be character, short int, integer, float, or double. Float
287and double require the pixels to be normalized [0..1]. The other types
288are [0..QuantumRange].&nbsp; For example, to create a 640x480 image from
289unsigned red-green-blue character data, use</font>
290 <p><font size="-1">&nbsp;&nbsp; Image image( 640, 480, "RGB",
2910, pixels );</font> </p>
292 <p><font size="-1">The parameters are as follows:</font> <br>
293&nbsp;
294 <table border="0" width="100%">
295 <tbody>
296 <tr>
297 <td><font size="-1">width_</font></td>
298 <td><font size="-1">Width in pixels of the image.</font></td>
299 </tr>
300 <tr>
301 <td><font size="-1">height_</font></td>
302 <td><font size="-1">Height in pixels of the image.</font></td>
303 </tr>
304 <tr>
305 <td><font size="-1">map_</font></td>
306 <td><font size="-1">This character string can be any
307combination or order of R = red, G = green, B = blue, A = alpha, C =
308cyan, Y = yellow M = magenta, and K = black. The ordering reflects the
309order of the pixels in the supplied pixel array.</font></td>
310 </tr>
311 <tr>
312 <td><font size="-1">type_</font></td>
313 <td><font size="-1"><a href="Enumerations.html#StorageType">Pixel
314storage type</a> (CharPixel, ShortPixel, IntegerPixel, FloatPixel, or
315DoublePixel)</font></td>
316 </tr>
317 <tr>
318 <td><font size="-1">pixels_</font></td>
319 <td><font size="-1">This array of values contain the pixel
320components as defined by the map_ and type_ parameters. The length of
321the arrays must equal the area specified by the width_ and height_
322values and type_ parameters.</font></td>
323 </tr>
324 </tbody>
325 </table>
326 </p>
327 </td>
328 </tr>
329 </tbody>
330</table>
331<center>
332<h3> <a name="Image Manipulation Methods"></a> Image Manipulation Methods</h3>
333</center>
334<i>Image</i> supports access to all the single-image (versus image-list)
335 manipulation operations provided by the ImageMagick library. If you
336must process a multi-image file (such as an animation), the <a
337 href="STL.html"> STL interface</a> , which provides a multi-image
338abstraction on top of <i>Image</i>, must be used.
339<p>Image manipulation methods are very easy to use.&nbsp; For example: </p>
340<blockquote><font color="#663366">Image image;</font> <br>
341 <font color="#663366">image.read("myImage.tiff");</font> <br>
342 <font color="#663366">image.addNoise(GaussianNoise);</font> <br>
343 <font color="#663366">image.write("myImage.tiff");</font></blockquote>
344adds gaussian noise to the image file "myImage.tiff".
345<p>The operations supported by Image are shown in the following table: <br>
346&nbsp;
347<table border="1" nosave="">
348 <caption><b>Image Manipulation Methods</b></caption> <tbody>
349 <tr align="center">
350 <td><b>Method</b></td>
351 <td><b>Signature(s)</b></td>
352 <td><b>Description</b></td>
353 </tr>
354 <tr>
355 <td valign="middle">
356 <div align="center"><a name="adaptiveThreshold"></a> <font
357 size="-1">adaptiveThreshold<br>
358 </font></div>
359 </td>
360 <td valign="middle"><font size="-1">unsigned int width, unsigned
361int height, unsigned offset = 0<br>
362 </font></td>
363 <td valign="top"><font size="-1">Apply adaptive thresholding to
364the image. Adaptive thresholding is useful if the ideal threshold level
365is not known in advance, or if the illumination gradient is not constant
366across the image. Adaptive thresholding works by evaulating the mean
367(average) of a pixel region (size specified by <i>width</i> and <i>height</i>)
368and using the mean as the thresholding value. In order to remove
369residual noise from the background, the threshold may be adjusted by
370subtracting a constant <i>offset</i> (default zero) from the mean to
371compute the threshold.</font><br>
372 </td>
373 </tr>
374 <tr>
375 <td>
376 <center><a name="addNoise"></a> <font size="-1">addNoise</font></center>
377 </td>
378 <td><font size="-1"><a href="Enumerations.html#NoiseType">NoiseType</a>
379noiseType_</font></td>
380 <td><font size="-1">Add noise to image with specified noise type.</font></td>
381 </tr>
382 <tr>
383 <td style="vertical-align: middle;"><small><a
384 name="affineTransform"></a>affineTransform<br>
385 </small></td>
386 <td style="vertical-align: middle;"><small>const DrawableAffine
387&amp;affine<br>
388 </small></td>
389 <td style="vertical-align: middle;"><small>Transform image by
390specified affine (or free transform) matrix.<br>
391 </small></td>
392 </tr>
393 <tr>
394 <td rowspan="4">
395 <center><a name="annotate"></a> <font size="-1">annotate</font></center>
396 </td>
397 <td><font size="-1">const std::string &amp;text_, const <a
398 href="Geometry.html"> Geometry</a> &amp;location_</font></td>
399 <td><font size="-1">Annotate using specified text, and placement
400location</font></td>
401 </tr>
402 <tr>
403 <td><font size="-1">string text_, const <a href="Geometry.html">Geometry</a>
404&amp;boundingArea_, <a href="Enumerations.html#GravityType">GravityType</a>
405gravity_</font></td>
406 <td><font size="-1">Annotate using specified text, bounding area,
407and placement gravity. If <i>boundingArea_</i> is invalid, then
408bounding area is entire image.</font></td>
409 </tr>
410 <tr>
411 <td><font size="-1">const std::string &amp;text_, const <a
412 href="Geometry.html"> Geometry</a> &amp;boundingArea_, <a
413 href="Enumerations.html#GravityType">GravityType</a> gravity_, double
414degrees_,&nbsp;</font></td>
415 <td><font size="-1">Annotate with text using specified text,
416bounding area, placement gravity, and rotation. If <i>boundingArea_</i>
417is invalid, then bounding area is entire image.</font></td>
418 </tr>
419 <tr>
420 <td><font size="-1">const std::string &amp;text_, <a
421 href="Enumerations.html#GravityType"> GravityType</a> gravity_</font></td>
422 <td><font size="-1">Annotate with text (bounding area is entire
423image) and placement gravity.</font></td>
424 </tr>
425 <tr>
426 <td>
427 <center><a name="blur"></a> <font size="-1">blur</font></center>
428 </td>
429 <td><font size="-1">const double radius_ = 1, const double sigma_
430= 0.5</font></td>
431 <td><font size="-1">Blur image. The <i>radius_ </i>parameter
432specifies the radius of the Gaussian, in pixels, not counting the center
433pixel.&nbsp; The <i>sigma_</i> parameter specifies the standard
434deviation of the Laplacian, in pixels.</font></td>
435 </tr>
436 <tr>
437 <td>
438 <center><a name="border"></a> <font size="-1">border</font></center>
439 </td>
440 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
441&amp;geometry_ = "6x6+0+0"</font></td>
442 <td><font size="-1">Border image (add border to image).&nbsp; The
443color of the border is specified by the <i>borderColor</i> attribute.</font></td>
444 </tr>
445 <tr>
446 <td>
447 <center><a name="channel"></a> <font size="-1">channel</font></center>
448 </td>
449 <td><font size="-1"><a href="Enumerations.html#ChannelType">ChannelType</a>
450layer_</font></td>
451 <td><font size="-1">Extract channel from image. Use this option
452to extract a particular channel from&nbsp; the image.&nbsp; <i>MatteChannel</i>
453&nbsp; for&nbsp; example, is useful for extracting the opacity values
454from an image.</font></td>
455 </tr>
456 <tr>
457 <td>
458 <center><a name="charcoal"></a> <font size="-1">charcoal</font></center>
459 </td>
460 <td><font size="-1">const double radius_ = 1, const double sigma_
461= 0.5</font></td>
462 <td><font size="-1">Charcoal effect image (looks like charcoal
463sketch). The <i>radius_</i> parameter specifies the radius of the
464Gaussian, in pixels, not counting the center pixel.&nbsp; The <i>sigma_</i>
465parameter specifies the standard deviation of the Laplacian, in pixels.</font></td>
466 </tr>
467 <tr>
468 <td>
469 <center><a name="chop"></a> <font size="-1">chop</font></center>
470 </td>
471 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
472&amp;geometry_</font></td>
473 <td><font size="-1">Chop image (remove vertical or horizontal
474subregion of image)</font></td>
475 </tr>
476 <tr>
477 <td rowspan="2">
478 <center><a name="colorize"></a> <font size="-1">colorize</font></center>
479 </td>
480 <td><font size="-1">const unsigned int opacityRed_, const
481unsigned int opacityGreen_, const unsigned int opacityBlue_, const
482Color &amp;penColor_</font></td>
483 <td><font size="-1">Colorize image with pen color, using
484specified percent opacity for red, green, and blue quantums.</font></td>
485 </tr>
486 <tr>
487 <td><font size="-1">const unsigned int opacity_, const Color
488&amp;penColor_</font></td>
489 <td><font size="-1">Colorize image with pen color, using
490specified percent opacity.</font></td>
491 </tr>
492 <tr>
493 <td>
494 <center><a name="comment"></a> <font size="-1">comment</font></center>
495 </td>
496 <td><font size="-1">const string &amp;comment_</font></td>
497 <td><font size="-1">Comment image (add comment string to
498image).&nbsp; By default, each image is commented with its file name.
499Use&nbsp; this&nbsp; method to&nbsp; assign a specific comment to the
500image.&nbsp; Optionally you can include the image filename, type,
501width, height, or other&nbsp; image&nbsp; attributes by embedding <a
502 href="FormatCharacters.html">special format characters.</a> </font></td>
503 </tr>
504 <tr>
505 <td valign="middle" align="center"><font size="-1"><a
506 name="compare"></a> compare<br>
507 </font></td>
508 <td valign="middle"><font size="-1">const Image &amp;reference_<br>
509 </font></td>
510 <td valign="top"><font size="-1">Compare current image with
511another image. Sets <a href="#meanErrorPerPixel">meanErrorPerPixel</a> , <a
512 href="#normalizedMaxError">normalizedMaxError</a> , and <a
513 href="#normalizedMeanError">normalizedMeanError</a> in the current
514image. False is returned if the images are identical. An ErrorOption
515exception is thrown if the reference image columns, rows, colorspace, or
516matte differ from the current image.</font><br>
517 </td>
518 </tr>
519 <tr>
520 <td rowspan="3">
521 <center><a name="composite"></a> <font size="-1">composite</font></center>
522 </td>
523 <td><font size="-1">const <a href="Image.html">Image</a>
524&amp;compositeImage_, int xOffset_, int yOffset_, <a
525 href="Enumerations.html#CompositeOperator"> CompositeOperator</a>
526compose_ = <i>InCompositeOp</i></font></td>
527 <td><font size="-1">Compose an image onto the current image at
528offset specified by <i>xOffset_</i>, <i>yOffset_ </i>using the
529composition algorithm specified by <i>compose_</i>.&nbsp;</font></td>
530 </tr>
531 <tr>
532 <td><font size="-1">const <a href="Image.html">Image</a>
533&amp;compositeImage_, const <a href="Geometry.html">Geometry</a>
534&amp;offset_, <a href="Enumerations.html#CompositeOperator">CompositeOperator</a>
535compose_ = <i>InCompositeOp</i></font></td>
536 <td><font size="-1">Compose an image onto the current image at
537offset specified by <i>offset_</i> using the composition algorithm
538specified by <i>compose_</i> .&nbsp;</font></td>
539 </tr>
540 <tr>
541 <td><font size="-1">const <a href="Image.html">Image</a>
542&amp;compositeImage_, <a href="Enumerations.html#GravityType">GravityType</a>
543gravity_, <a href="Enumerations.html#CompositeOperator">CompositeOperator</a>
544compose_ = <i>InCompositeOp</i></font></td>
545 <td><font size="-1">Compose an image onto the current image with
546placement specified by <i>gravity_ </i>using the composition algorithm
547specified by <i>compose_</i>.&nbsp;</font></td>
548 </tr>
549 <tr>
550 <td>
551 <center><a name="contrast"></a> <font size="-1">contrast</font></center>
552 </td>
553 <td><font size="-1">unsigned int sharpen_</font></td>
554 <td><font size="-1">Contrast image (enhance intensity differences
555in image)</font></td>
556 </tr>
557 <tr>
558 <td>
559 <center><a name="convolve"></a> <font size="-1">convolve</font></center>
560 </td>
561 <td><font size="-1">unsigned int order_, const double *kernel_</font></td>
562 <td><font size="-1">Convolve image.&nbsp; Applies a user-specfied
563convolution to the image. The <i>order_</i> parameter represents the
564number of columns and rows in the filter kernel, and <i>kernel_</i>
565is a two-dimensional array of doubles representing the convolution
566kernel to apply.</font></td>
567 </tr>
568 <tr>
569 <td>
570 <center><a name="crop"></a> <font size="-1">crop</font></center>
571 </td>
572 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
573&amp;geometry_</font></td>
574 <td><font size="-1">Crop image (subregion of original image)</font></td>
575 </tr>
576 <tr>
577 <td>
578 <center><a name="cycleColormap"></a> <font size="-1">cycleColormap</font></center>
579 </td>
580 <td><font size="-1">int amount_</font></td>
581 <td><font size="-1">Cycle image colormap</font></td>
582 </tr>
583 <tr>
584 <td>
585 <center><a name="despeckle"></a> <font size="-1">despeckle</font></center>
586 </td>
587 <td><font size="-1">void</font></td>
588 <td><font size="-1">Despeckle image (reduce speckle noise)</font></td>
589 </tr>
590 <tr>
591 <td>
592 <center><a name="display"></a> <font size="-1">display</font></center>
593 </td>
594 <td><font size="-1">void</font></td>
595 <td><font size="-1">Display image on screen.</font> <br>
596 <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
597an image format is not compatible with the display visual (e.g.
598JPEG on a colormapped display) then the original image will be
599altered. Use a copy of the original if this is a problem.</font></td>
600 </tr>
601 <tr>
602 <td rowspan="2">
603 <center><a name="draw"></a> <font size="-1">draw</font></center>
604 </td>
605 <td><font size="-1">const <a href="Drawable.html">Drawable</a>
606&amp;drawable_</font></td>
607 <td><font size="-1">Draw shape or text on image.</font></td>
608 </tr>
609 <tr>
610 <td><font size="-1">const std::list&lt;<a href="Drawable.html">Drawable</a>
611&gt; &amp;drawable_</font></td>
612 <td><font size="-1">Draw shapes or text on image using a set of
613Drawable objects contained in an STL list. Use of this method improves
614drawing performance and allows batching draw objects together in a
615list for repeated use.</font></td>
616 </tr>
617 <tr>
618 <td>
619 <center><a name="edge"></a> <font size="-1">edge</font></center>
620 </td>
621 <td><font size="-1">unsigned int radius_ = 0.0</font></td>
622 <td><font size="-1">Edge image (hilight edges in image).&nbsp;
623The radius is the radius of the pixel neighborhood.. Specify a radius
624of zero for automatic radius selection.</font></td>
625 </tr>
626 <tr>
627 <td>
628 <center><a name="emboss"></a> <font size="-1">emboss</font></center>
629 </td>
630 <td><font size="-1">const double radius_ = 1, const double sigma_
631= 0.5</font></td>
632 <td><font size="-1">Emboss image (hilight edges with 3D effect).
633The <i> radius_</i> parameter specifies the radius of the Gaussian, in
634pixels, not counting the center pixel.&nbsp; The <i>sigma_</i>
635parameter specifies the standard deviation of the Laplacian, in pixels.</font></td>
636 </tr>
637 <tr>
638 <td>
639 <center><a name="enhance"></a> <font size="-1">enhance</font></center>
640 </td>
641 <td><font size="-1">void</font></td>
642 <td><font size="-1">Enhance image (minimize noise)</font></td>
643 </tr>
644 <tr>
645 <td>
646 <center><a name="equalize"></a> <font size="-1">equalize</font></center>
647 </td>
648 <td><font size="-1">void</font></td>
649 <td><font size="-1">Equalize image (histogram equalization)</font></td>
650 </tr>
651 <tr>
652 <td>
653 <center><a name="erase"></a> <font size="-1">erase</font></center>
654 </td>
655 <td><font size="-1">void</font></td>
656 <td><font size="-1">Set all image pixels to the current
657background color.</font></td>
658 </tr>
659 <tr>
660 <td>
661 <center><a name="flip"></a> <font size="-1">flip</font></center>
662 </td>
663 <td><font size="-1">void</font></td>
664 <td><font size="-1">Flip image (reflect each scanline in the
665vertical direction)</font></td>
666 </tr>
667 <tr>
668 <td rowspan="4">
669 <center><a name="floodFillColor"></a> <font size="-1">floodFill-</font> <br>
670 <font size="-1">Color</font></center>
671 </td>
672 <td><font size="-1">unsigned int x_, unsigned int y_, const <a
673 href="Color.html"> Color</a> &amp;fillColor_</font></td>
674 <td rowspan="2"><font size="-1">Flood-fill color across pixels
675that match the color of the target pixel and are neighbors of the
676target pixel. Uses current fuzz setting when determining color match.</font></td>
677 </tr>
678 <tr>
679 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
680&amp;point_, const <a href="Color.html">Color</a> &amp;fillColor_</font></td>
681 </tr>
682 <tr>
683 <td><font size="-1">unsigned int x_, unsigned int y_, const <a
684 href="Color.html"> Color</a> &amp;fillColor_, const <a href="Color.html">Color</a>
685&amp;borderColor_</font></td>
686 <td rowspan="2"><font size="-1">Flood-fill color across pixels
687starting at target-pixel and stopping at pixels matching specified
688border color. Uses current fuzz setting when determining color match.</font></td>
689 </tr>
690 <tr>
691 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
692&amp;point_, const <a href="Color.html">Color</a> &amp;fillColor_, const <a
693 href="Color.html">Color</a> &amp;borderColor_</font></td>
694 </tr>
695 <tr>
696 <td><a name="floodFillOpacity"></a> <font size="-1">floodFillOpacity</font></td>
697 <td><font size="-1">const long x_, const long y_, const unsigned
698int opacity_, const PaintMethod method_</font></td>
699 <td><font size="-1">Floodfill pixels matching color (within fuzz
700factor) of target pixel(x,y) with replacement opacity value using method.</font></td>
701 </tr>
702 <tr>
703 <td rowspan="4">
704 <center><a name="floodFillTexture"></a> <font size="-1">floodFill-</font> <br>
705 <font size="-1">Texture</font></center>
706 </td>
707 <td><font size="-1">unsigned int x_, unsigned int y_,&nbsp; const
708Image &amp;texture_</font></td>
709 <td rowspan="2"><font size="-1">Flood-fill texture across pixels
710that match the color of the target pixel and are neighbors of the
711target pixel. Uses current fuzz setting when determining color match.</font></td>
712 </tr>
713 <tr>
714 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
715&amp;point_, const Image &amp;texture_</font></td>
716 </tr>
717 <tr>
718 <td><font size="-1">unsigned int x_, unsigned int y_, const Image
719&amp;texture_, const <a href="Color.html">Color</a> &amp;borderColor_</font></td>
720 <td rowspan="2"><font size="-1">Flood-fill texture across pixels
721starting at target-pixel and stopping at pixels matching specified
722border color. Uses current fuzz setting when determining color match.</font></td>
723 </tr>
724 <tr>
725 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
726&amp;point_, const Image &amp;texture_, const <a href="Color.html"> Color</a>
727&amp;borderColor_</font></td>
728 </tr>
729 <tr>
730 <td>
731 <center><a name="flop"></a> <font size="-1">flop</font></center>
732 </td>
733 <td><font size="-1">void&nbsp;</font></td>
734 <td><font size="-1">Flop image (reflect each scanline in the
735horizontal direction)</font></td>
736 </tr>
737 <tr>
738 <td rowspan="2">
739 <center><a name="frame"></a> <font size="-1">frame</font></center>
740 </td>
741 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
742&amp;geometry_ = "25x25+6+6"</font></td>
743 <td rowspan="2"><font size="-1">Add decorative frame around image</font></td>
744 </tr>
745 <tr>
746 <td><font size="-1">unsigned int width_, unsigned int height_,
747int x_, int y_, int innerBevel_ = 0, int outerBevel_ = 0</font></td>
748 </tr>
749 <tr>
750 <td rowspan="2">
751 <center><a name="gamma"></a> <font size="-1">gamma</font></center>
752 </td>
753 <td><font size="-1">double gamma_</font></td>
754 <td><font size="-1">Gamma correct image (uniform red, green, and
755blue correction).</font></td>
756 </tr>
757 <tr>
758 <td><font size="-1">double gammaRed_, double gammaGreen_, double
759gammaBlue_</font></td>
760 <td><font size="-1">Gamma correct red, green, and blue channels
761of image.</font></td>
762 </tr>
763 <tr>
764 <td>
765 <center><a name="gaussianBlur"></a> <font size="-1">gaussianBlur</font></center>
766 </td>
767 <td><font size="-1">const double width_, const double sigma_</font></td>
768 <td><font size="-1">Gaussian blur image. The number of neighbor
769pixels to be included in the convolution mask is specified by
770'width_'.&nbsp; For example, a width of one gives a (standard) 3x3
771convolution mask. The standard deviation of the gaussian bell curve is
772specified by 'sigma_'.</font></td>
773 </tr>
774 <tr>
775 <td>
776 <center><a name="implode"></a> <font size="-1">implode</font></center>
777 </td>
778 <td><font size="-1">const double factor_</font></td>
779 <td><font size="-1">Implode image (special effect)</font></td>
780 </tr>
781 <tr>
782 <td>
783 <center><a name="label"></a> <font size="-1">label</font></center>
784 </td>
785 <td><font size="-1">const string &amp;label_</font></td>
786 <td><font size="-1">Assign a label to an image. Use this option
787to&nbsp; assign&nbsp; a&nbsp; specific label to the image. Optionally
788you can include the image filename, type, width, height, or scene
789number in the label by embedding&nbsp; <a href="FormatCharacters.html">
790special format characters.</a> If the first character of string is @, the
791image label is read from a file titled by the remaining characters in
792the string. When converting to Postscript, use this&nbsp; option to
793specify a header string to print above the image.</font></td>
794 </tr>
795 <tr>
796 <td style="vertical-align: top; text-align: center;"><small><a
797 name="level"></a>level<br>
798 </small></td>
799 <td style="vertical-align: top;"><small>const double black_point,
800const double white_point, const double mid_point=1.0<br>
801 </small></td>
802 <td style="vertical-align: top;"><small>Level image. Adjust the
803levels of the image by scaling the colors falling between specified
804white and black points to the full available quantum range. The
805parameters provided represent the black, mid (gamma), and white
806points.&nbsp; The black point specifies the darkest color in the image.
807Colors darker than the black point are set to zero. Mid point (gamma)
808specifies a gamma correction to apply to the image. White point
809specifies the lightest color in the image.&nbsp; Colors brighter than
810the white point are set to the maximum quantum value. The black and
811white point have the valid range 0 to QuantumRange while mid (gamma) has a
812useful range of 0 to ten.<br>
813 </small></td>
814 </tr>
815 <tr>
816 <td style="vertical-align: top; text-align: center;"><small><a
817 name="levelChannel"></a>levelChannel<br>
818 </small></td>
819 <td style="vertical-align: top;"><small>const ChannelType
820channel, const double black_point, const double white_point, const
821double mid_point=1.0<br>
822 </small></td>
823 <td style="vertical-align: top;"><small>Level image channel.
824Adjust the levels of the image channel by scaling the values falling
825between specified white and black points to the full available quantum
826range. The parameters provided represent the black, mid (gamma), and
827white points. The black point specifies the darkest color in the image.
828Colors darker than the black point are set to zero. Mid point (gamma)
829specifies a gamma correction to apply to the image. White point
830specifies the lightest color in the image. Colors brighter than the
831white point are set to the maximum quantum value. The black and white
832point have the valid range 0 to QuantumRange while mid (gamma) has a useful
833range of 0 to ten.<br>
834 </small></td>
835 </tr>
836 <tr>
837 <td>
838 <center><a name="magnify"></a> <font size="-1">magnify</font></center>
839 </td>
840 <td><font size="-1">void</font></td>
841 <td><font size="-1">Magnify image by integral size</font></td>
842 </tr>
843 <tr>
844 <td>
845 <center><a name="map"></a> <font size="-1">map</font></center>
846 </td>
847 <td><font size="-1">const Image &amp;mapImage_ , bool dither_ =
848false</font></td>
849 <td><font size="-1">Remap image colors with closest color from
850reference image. Set dither_ to <i>true</i> in to apply Floyd/Steinberg
851error diffusion to the image. By default, color reduction chooses an
852optimal&nbsp; set&nbsp; of colors that best represent the original
853image. Alternatively, you can&nbsp; choose&nbsp; a&nbsp;
854particular&nbsp; set&nbsp; of colors&nbsp; from&nbsp; an image file
855with this option.</font></td>
856 </tr>
857 <tr>
858 <td>
859 <center><a name="matteFloodfill"></a> <font size="-1">matteFloodfill</font></center>
860 </td>
861 <td><font size="-1">const <a href="Color.html">Color</a>
862&amp;target_, const unsigned int&nbsp; opacity_, const int x_, const int
863y_, <a href="Enumerations.html#PaintMethod">PaintMethod</a> method_</font></td>
864 <td><font size="-1">Floodfill designated area with a replacement
865opacity value.</font></td>
866 </tr>
867 <tr>
868 <td><a name="medianFilter"></a> <font size="-1">medianFilter</font></td>
869 <td><font size="-1">const double radius_ = 0.0</font></td>
870 <td><font size="-1">Filter image by replacing each pixel
871component with the median color in a circular neighborhood</font></td>
872 </tr>
873 <tr>
874 <td>
875 <center><a name="minify"></a> <font size="-1">minify</font></center>
876 </td>
877 <td><font size="-1">void</font></td>
878 <td><font size="-1">Reduce image by integral size</font></td>
879 </tr>
880 <tr>
881 <td><a name="modifyImage"></a> <font size="-1">modifyImage</font></td>
882 <td><font size="-1">void</font></td>
883 <td><font size="-1">Prepare to update image. Ensures that there
884is only one reference to the underlying image so that the underlying
885image may be safely modified without effecting previous generations of
886the image. Copies the underlying image to a new image if necessary.</font></td>
887 </tr>
888 <tr>
889 <td>
890 <center><a name="modulate"></a> <font size="-1">modulate</font></center>
891 </td>
892 <td><font size="-1">double brightness_, double saturation_,
893double hue_</font></td>
894 <td><font size="-1">Modulate percent hue, saturation, and
895brightness of an image. Modulation of saturation and brightness is as a
896ratio of the current value (1.0 for no change). Modulation of hue is an
897absolute rotation of -180 degrees to +180 degrees from the current
898position corresponding to an argument range of 0 to 2.0 (1.0 for no
899change).</font></td>
900 </tr>
901 <tr>
902 <td>
903 <center><a name="negate"></a> <font size="-1">negate</font></center>
904 </td>
905 <td><font size="-1">bool grayscale_ = false</font></td>
906 <td><font size="-1">Negate colors in image.&nbsp; Replace every
907pixel with its complementary color (white becomes black, yellow becomes
908blue, etc.).&nbsp; Set grayscale to only negate grayscale values in
909image.</font></td>
910 </tr>
911 <tr>
912 <td>
913 <center><a name="normalize"></a> <font size="-1">normalize</font></center>
914 </td>
915 <td><font size="-1">void</font></td>
916 <td><font size="-1">Normalize image (increase contrast by
917normalizing the pixel values to span the full range of color values).</font></td>
918 </tr>
919 <tr>
920 <td>
921 <center><a name="oilPaint"></a> <font size="-1">oilPaint</font></center>
922 </td>
923 <td><font size="-1">unsigned int radius_ = 3</font></td>
924 <td><font size="-1">Oilpaint image (image looks like oil painting)</font></td>
925 </tr>
926 <tr>
927 <td>
928 <center><a name="opacity"></a> <font size="-1">opacity</font></center>
929 </td>
930 <td><font size="-1">unsigned int opacity_</font></td>
931 <td><font size="-1">Set or attenuate the opacity channel in the
932image. If the image pixels are opaque then they are set to the specified
933opacity value, otherwise they are blended with the supplied opacity
934value.&nbsp; The value of opacity_ ranges from 0 (completely opaque) to <i>QuantumRange</i>
935. The defines <i>OpaqueOpacity</i> and <i>TransparentOpacity</i> are
936available to specify completely opaque or completely transparent,
937respectively.</font></td>
938 </tr>
939 <tr>
940 <td>
941 <center><a name="opaque"></a> <font size="-1">opaque</font></center>
942 </td>
943 <td><font size="-1">const <a href="Color.html">Color</a>
944&amp;opaqueColor_, const <a href="Color.html">Color</a> &amp;penColor_</font></td>
945 <td><font size="-1">Change color of pixels matching opaqueColor_
946to specified penColor_.</font></td>
947 </tr>
948 <tr nosave="">
949 <td rowspan="2" nosave="">
950 <center><a name="ping"></a> <font size="-1">ping</font></center>
951 </td>
952 <td><font size="-1">const std::string &amp;imageSpec_</font></td>
953 <td rowspan="2" nosave=""><font size="-1">Ping is similar to read
954except only enough of the image is read to determine the image columns,
955rows, and filesize.&nbsp; The <a href="#columns">columns</a> </font>, <font
956 size="-1"><a href="#rows">rows</a> , and <a href="#fileSize">fileSize</a>
957attributes are valid after invoking ping.&nbsp; The image data is not
958valid after calling ping.</font></td>
959 </tr>
960 <tr>
961 <td><font size="-1">const Blob &amp;blob_</font></td>
962 </tr>
963 <tr>
964 <td style="text-align: center; vertical-align: middle;"><small><a
965 name="process"></a>process<br>
966 </small></td>
967 <td style="vertical-align: middle;"><small>std::string name_,
968const int argc_, char **argv_<br>
969 </small></td>
970 <td style="vertical-align: middle;"><small>Execute the named
971process module, passing any arguments via an argument vector, with argc_
972specifying the number of arguments in the vector, and argv_ passing the
973address of an array of null-terminated C strings which constitute the
974argument vector. An exception is thrown if the requested process module
975does not exist, fails to load, or fails during execution.</small><br>
976 </td>
977 </tr>
978 <tr>
979 <td>
980 <center><a name="quantize"></a> <font size="-1">quantize</font></center>
981 </td>
982 <td><font size="-1">bool measureError_ = false</font></td>
983 <td><font size="-1">Quantize image (reduce number of colors). Set
984measureError_ to true in order to calculate error attributes.</font></td>
985 </tr>
986 <tr>
987 <td>
988 <center><a name="raise"></a> <font size="-1">raise</font></center>
989 </td>
990 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
991&amp;geometry_ = "6x6+0+0",&nbsp; bool raisedFlag_ =&nbsp; false</font></td>
992 <td><font size="-1">Raise image (lighten or darken the edges of
993an image to give a 3-D raised or lowered effect)</font></td>
994 </tr>
995 <tr>
996 <td rowspan="8">
997 <center><a name="read"></a> <font size="-1">read</font></center>
998 </td>
999 <td><font size="-1">const string &amp;imageSpec_</font></td>
1000 <td><font size="-1">Read image into current object</font></td>
1001 </tr>
1002 <tr>
1003 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1004&amp;size_, const std::string &amp;imageSpec_</font></td>
1005 <td><font size="-1">Read image of specified size into current
1006object. This form is useful for images that do not specifiy their size
1007or to specify a size hint for decoding an image. For example, when
1008reading a Photo CD, JBIG, or JPEG image, a size request causes the
1009library to return an image which is the next resolution greater or
1010equal to the specified size. This may result in memory and time savings.</font></td>
1011 </tr>
1012 <tr>
1013 <td><font size="-1">const <a href="Blob.html">Blob</a> &amp;blob_</font></td>
1014 <td rowspan="5"><font size="-1">Read encoded image of specified
1015size from an in-memory <a href="Blob.html">BLOB</a> into current
1016object. Depending on the method arguments, the Blob size, depth, and
1017format may also be specified. Some image formats require that size be
1018specified. The default ImageMagick uses for depth depends on its
1019Quantum size (8 or 16).&nbsp; If ImageMagick's Quantum size does not
1020match that of the image, the depth may need to be specified.
1021ImageMagick can usually automatically detect the image's format. When
1022a format can't be automatically detected, the format must be specified.</font></td>
1023 </tr>
1024 <tr>
1025 <td><font size="-1">const <a href="Blob.html">Blob</a>
1026&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_</font></td>
1027 </tr>
1028 <tr>
1029 <td><font size="-1">const <a href="Blob.html">Blob</a>
1030&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_,
1031unsigned int depth_</font></td>
1032 </tr>
1033 <tr>
1034 <td><font size="-1">const <a href="Blob.html">Blob</a>
1035&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_,
1036unsigned short depth_, const string &amp;magick_&nbsp;</font></td>
1037 </tr>
1038 <tr>
1039 <td><font size="-1">const <a href="Blob.html">Blob</a>
1040&amp;blob_, const <a href="Geometry.html">Geometry</a> &amp;size_, const
1041string &amp;magick_</font></td>
1042 </tr>
1043 <tr>
1044 <td><font size="-1">const unsigned int width_, const unsigned int
1045height_, std::string map_, const StorageType type_, const unsigned char* pixels_</font></td>
1046 <td><font size="-1">Read image based on an array of image pixels.
1047The pixel data must be in scanline order top-to-bottom. The data can be
1048character, short int, integer, float, or double. Float and double
1049require the pixels to be normalized [0..1]. The other types are
1050[0..QuantumRange].&nbsp; For example, to create a 640x480 image from
1051unsigned red-green-blue character data, use</font>
1052 <p><font size="-1">&nbsp; image.read( 640, 480, "RGB", 0,
1053pixels );</font> </p>
1054 <p><font size="-1">The parameters are as follows:</font> <br>
1055&nbsp;
1056 <table border="0" width="100%">
1057 <tbody>
1058 <tr>
1059 <td><font size="-1">width_</font></td>
1060 <td><font size="-1">Width in pixels of the image.</font></td>
1061 </tr>
1062 <tr>
1063 <td><font size="-1">height_</font></td>
1064 <td><font size="-1">Height in pixels of the image.</font></td>
1065 </tr>
1066 <tr>
1067 <td><font size="-1">map_</font></td>
1068 <td><font size="-1">This character string can be any
1069combination or order of R = red, G = green, B = blue, A = alpha, C =
1070cyan, Y = yellow M = magenta, and K = black. The ordering reflects the
1071order of the pixels in the supplied pixel array.</font></td>
1072 </tr>
1073 <tr>
1074 <td><font size="-1">type_</font></td>
1075 <td><font size="-1">Pixel storage type (CharPixel,
1076ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)</font></td>
1077 </tr>
1078 <tr>
1079 <td><font size="-1">pixels_</font></td>
1080 <td><font size="-1">This array of values contain the pixel
1081components as defined by the map_ and type_ parameters. The length of
1082the arrays must equal the area specified by the width_ and height_
1083values and type_ parameters.</font></td>
1084 </tr>
1085 </tbody>
1086 </table>
1087 </p>
1088 </td>
1089 </tr>
1090 <tr>
1091 <td rowspan="2">
1092 <center><a name="reduceNoise"></a> <font size="-1">reduceNoise</font></center>
1093 </td>
1094 <td><font size="-1">void</font></td>
1095 <td rowspan="2"><font size="-1">Reduce noise in image using a
1096noise peak elimination filter.</font></td>
1097 </tr>
1098 <tr>
1099 <td><font size="-1">unsigned int order_</font></td>
1100 </tr>
1101 <tr>
1102 <td>
1103 <center><a name="roll"></a> <font size="-1">roll</font></center>
1104 </td>
1105 <td><font size="-1">int columns_, int rows_</font></td>
1106 <td><font size="-1">Roll image (rolls image vertically and
1107horizontally) by specified number of columnms and rows)</font></td>
1108 </tr>
1109 <tr>
1110 <td>
1111 <center><a name="rotate"></a> <font size="-1">rotate</font></center>
1112 </td>
1113 <td><font size="-1">double degrees_</font></td>
1114 <td><font size="-1">Rotate image counter-clockwise by specified
1115number of degrees.</font></td>
1116 </tr>
1117 <tr>
1118 <td>
1119 <center><a name="sample"></a> <font size="-1">sample</font></center>
1120 </td>
1121 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1122&amp;geometry_&nbsp;</font></td>
1123 <td><font size="-1">Resize image by using pixel sampling algorithm</font></td>
1124 </tr>
1125 <tr>
1126 <td>
1127 <center><a name="scale"></a> <font size="-1">scale</font></center>
1128 </td>
1129 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1130&amp;geometry_</font></td>
1131 <td><font size="-1">Resize image by using simple ratio algorithm</font></td>
1132 </tr>
1133 <tr>
1134 <td>
1135 <center><a name="segment"></a> <font size="-1">segment</font></center>
1136 </td>
1137 <td><font size="-1">double clusterThreshold_ = 1.0,</font> <br>
1138 <font size="-1">double smoothingThreshold_ = 1.5</font></td>
1139 <td><font size="-1">Segment (coalesce similar image components)
1140by analyzing the histograms of the color components and identifying
1141units that are homogeneous with the fuzzy c-means technique. Also uses <i>quantizeColorSpace</i>
1142and <i>verbose</i> image attributes. Specify <i> clusterThreshold_</i> ,
1143as the number&nbsp; of&nbsp; pixels&nbsp; each cluster&nbsp; must exceed
1144the cluster threshold to be considered valid. <i>SmoothingThreshold_</i>
1145eliminates noise in the&nbsp; second derivative of the histogram. As the
1146value is&nbsp; increased, you can&nbsp; expect&nbsp; a&nbsp; smoother
1147second derivative.&nbsp; The default is 1.5.</font></td>
1148 </tr>
1149 <tr>
1150 <td>
1151 <center><a name="shade"></a> <font size="-1">shade</font></center>
1152 </td>
1153 <td><font size="-1">double azimuth_ = 30, double elevation_ = 30,</font> <br>
1154 <font size="-1">bool colorShading_ = false</font></td>
1155 <td><font size="-1">Shade image using distant light source.
1156Specify <i> azimuth_</i> and <i>elevation_</i> as the&nbsp;
1157position&nbsp; of&nbsp; the light source. By default, the shading
1158results as a grayscale image.. Set c<i>olorShading_</i> to <i>true</i> to
1159shade the red, green, and blue components of the image.</font></td>
1160 </tr>
1161 <tr>
1162 <td>
1163 <center><a name="sharpen"></a> <font size="-1">sharpen</font></center>
1164 </td>
1165 <td><font size="-1">const double radius_ = 1, const double sigma_
1166= 0.5</font></td>
1167 <td><font size="-1">Sharpen pixels in image.&nbsp; The <i>radius_</i>
1168parameter specifies the radius of the Gaussian, in pixels, not counting
1169the center pixel.&nbsp; The <i>sigma_</i> parameter specifies the
1170standard deviation of the Laplacian, in pixels.</font></td>
1171 </tr>
1172 <tr>
1173 <td>
1174 <center><a name="shave"></a> <font size="-1">shave</font></center>
1175 </td>
1176 <td><font size="-1">const Geometry &amp;geometry_</font></td>
1177 <td><font size="-1">Shave pixels from image edges.</font></td>
1178 </tr>
1179 <tr>
1180 <td>
1181 <center><a name="shear"></a> <font size="-1">shear</font></center>
1182 </td>
1183 <td><font size="-1">double xShearAngle_, double yShearAngle_</font></td>
1184 <td><font size="-1">Shear image (create parallelogram by sliding
1185image by X or Y axis).&nbsp; Shearing slides one edge of an image along
1186the X&nbsp; or&nbsp; Y axis,&nbsp; creating&nbsp; a
1187parallelogram.&nbsp; An X direction shear slides an edge along the X
1188axis, while&nbsp; a&nbsp; Y&nbsp; direction shear&nbsp; slides&nbsp;
1189an edge along the Y axis.&nbsp; The amount of the shear is controlled
1190by a shear angle.&nbsp; For X direction&nbsp; shears,&nbsp; x&nbsp;
1191degrees is measured relative to the Y axis, and similarly, for Y
1192direction shears&nbsp; y&nbsp; degrees is measured relative to the X
1193axis. Empty triangles left over from shearing the&nbsp; image&nbsp; are
1194filled&nbsp; with&nbsp; the&nbsp; color&nbsp; defined as <i>borderColor</i>.&nbsp;</font></td>
1195 </tr>
1196 <tr>
1197 <td>
1198 <center><a name="solarize"></a> <font size="-1">solarize</font></center>
1199 </td>
1200 <td><font size="-1">double factor_ = 50.0</font></td>
1201 <td><font size="-1">Solarize image (similar to effect seen when
1202exposing a photographic film to light during the development process)</font></td>
1203 </tr>
1204 <tr>
1205 <td>
1206 <center><a name="spread"></a> <font size="-1">spread</font></center>
1207 </td>
1208 <td><font size="-1">unsigned int amount_ = 3</font></td>
1209 <td><font size="-1">Spread pixels randomly within image by
1210specified amount</font></td>
1211 </tr>
1212 <tr>
1213 <td>
1214 <center><a name="stegano"></a> <font size="-1">stegano</font></center>
1215 </td>
1216 <td><font size="-1">const Image &amp;watermark_</font></td>
1217 <td><font size="-1">Add a digital watermark to the image (based
1218on second image)</font></td>
1219 </tr>
1220 <tr>
1221 <td>
1222 <center><a name="stereo"></a> <font size="-1">stereo</font></center>
1223 </td>
1224 <td><font size="-1">const Image &amp;rightImage_</font></td>
1225 <td><font size="-1">Create an image which appears in stereo when
1226viewed with red-blue glasses (Red image on left, blue on right)</font></td>
1227 </tr>
1228 <tr>
1229 <td>
1230 <center><a name="swirl"></a> <font size="-1">swirl</font></center>
1231 </td>
1232 <td><font size="-1">double degrees_</font></td>
1233 <td><font size="-1">Swirl image (image pixels are rotated by
1234degrees)</font></td>
1235 </tr>
1236 <tr>
1237 <td>
1238 <center><a name="texture"></a> <font size="-1">texture</font></center>
1239 </td>
1240 <td><font size="-1">const Image &amp;texture_</font></td>
1241 <td><font size="-1">Layer a texture on pixels matching image
1242background color.</font></td>
1243 </tr>
1244 <tr>
1245 <td>
1246 <center><a name="threshold"></a> <font size="-1">threshold</font></center>
1247 </td>
1248 <td><font size="-1">double threshold_</font></td>
1249 <td><font size="-1">Threshold image</font></td>
1250 </tr>
1251 <tr>
1252 <td rowspan="2">
1253 <center><a name="transform"></a> <font size="-1">transform</font></center>
1254 </td>
1255 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1256&amp;imageGeometry_</font></td>
1257 <td rowspan="2"><font size="-1">Transform image based on image
1258and crop geometries. Crop geometry is optional.</font></td>
1259 </tr>
1260 <tr>
1261 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1262&amp;imageGeometry_, const <a href="Geometry.html">Geometry</a>
1263&amp;cropGeometry_&nbsp;</font></td>
1264 </tr>
1265 <tr>
1266 <td>
1267 <center><a name="transparent"></a> <font size="-1">transparent</font></center>
1268 </td>
1269 <td><font size="-1">const <a href="Color.html">Color</a>
1270&amp;color_</font></td>
1271 <td><font size="-1">Add matte image to image, setting pixels
1272matching color to transparent.</font></td>
1273 </tr>
1274 <tr>
1275 <td>
1276 <center><a name="trim"></a> <font size="-1">trim</font></center>
1277 </td>
1278 <td><font size="-1">void</font></td>
1279 <td><font size="-1">Trim edges that are the background color from
1280the image.</font></td>
1281 </tr>
1282 <tr>
1283 <td>
1284 <center><a name="unsharpmask"></a> <font size="-1">unsharpmask</font></center>
1285 </td>
1286 <td><font size="-1">double radius_, double sigma_, double
1287amount_, double threshold_</font></td>
1288 <td><font size="-1">Replace image with a sharpened version of the
1289original image using the unsharp mask algorithm. The <i>radius</i>_
1290parameter specifies the radius of the Gaussian, in pixels, not
1291counting the center pixel. The <i>sigma</i>_ parameter specifies the
1292standard deviation of the Gaussian, in pixels. The <i>amount</i>_
1293parameter specifies the percentage of the difference between the
1294original and the blur image that is added back into the original. The <i>threshold</i>_
1295parameter specifies the threshold in pixels needed to apply the
1296diffence amount.</font></td>
1297 </tr>
1298 <tr>
1299 <td>
1300 <center><a name="wave"></a> <font size="-1">wave</font></center>
1301 </td>
1302 <td><font size="-1">double amplitude_ = 25.0, double wavelength_
1303= 150.0</font></td>
1304 <td><font size="-1">Alter an image along a sine wave.</font></td>
1305 </tr>
1306 <tr>
1307 <td rowspan="5">
1308 <center><a name="write"></a> <font size="-1">write</font></center>
1309 </td>
1310 <td><font size="-1">const string &amp;imageSpec_</font></td>
1311 <td><font size="-1">Write image to a file using filename i<i>mageSpec_</i>
1312.</font> <br>
1313 <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
1314an image format is selected which is capable of supporting fewer
1315colors than the original image or quantization has been requested, the
1316original image will be quantized to fewer colors. Use a copy of the
1317original if this is a problem.</font></td>
1318 </tr>
1319 <tr>
1320 <td><font size="-1"><a href="Blob.html">Blob</a> *blob_</font></td>
1321 <td rowspan="3"><font size="-1">Write image to a in-memory <a
1322 href="Blob.html"> BLOB</a> stored in <i>blob_</i>. The <i>magick</i>_
1323parameter specifies the image format to write (defaults to <a
1324 href="#magick">magick</a> ). The depth_ parameter species the image
1325depth (defaults to <a href="#depth"> depth</a> ).</font> <br>
1326 <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
1327an image format is selected which is capable of supporting fewer
1328colors than the original image or quantization has been requested, the
1329original image will be quantized to fewer colors. Use a copy of the
1330original if this is a problem.</font></td>
1331 </tr>
1332 <tr>
1333 <td><font size="-1"><a href="Blob.html">Blob</a> *blob_,
1334std::string &amp;magick_</font></td>
1335 </tr>
1336 <tr>
1337 <td><font size="-1"><a href="Blob.html">Blob</a> *blob_,
1338std::string &amp;magick_, unsigned int depth_</font></td>
1339 </tr>
1340 <tr>
1341 <td><font size="-1">const int x_, const int y_, const unsigned
1342int columns_, const unsigned int rows_, const std::string &amp;map_,
1343const StorageType type_, unsigned char* pixels_</font></td>
1344 <td><font size="-1">Write pixel data into a buffer you supply.
1345The data is saved either as char, short int, integer, float or double
1346format in the order specified by the type_ parameter. For example, we
1347want to extract scanline 1 of a 640x480 image as character data in
1348red-green-blue order:</font>
1349 <p><font size="-1">&nbsp; image.write(0,0,640,1,"RGB",0,pixels);</font> </p>
1350 <p><font size="-1">The parameters are as follows:</font> <br>
1351&nbsp;
1352 <table border="0" width="100%">
1353 <tbody>
1354 <tr>
1355 <td><font size="-1">x_</font></td>
1356 <td><font size="-1">Horizontal ordinate of left-most
1357coordinate of region to extract.</font></td>
1358 </tr>
1359 <tr>
1360 <td><font size="-1">y_</font></td>
1361 <td><font size="-1">Vertical ordinate of top-most
1362coordinate of region to extract.</font></td>
1363 </tr>
1364 <tr>
1365 <td><font size="-1">columns_</font></td>
1366 <td><font size="-1">Width in pixels of the region to
1367extract.</font></td>
1368 </tr>
1369 <tr>
1370 <td><font size="-1">rows_</font></td>
1371 <td><font size="-1">Height in pixels of the region to
1372extract.</font></td>
1373 </tr>
1374 <tr>
1375 <td><font size="-1">map_</font></td>
1376 <td><font size="-1">This character string can be any
1377combination or order of R = red, G = green, B = blue, A = alpha, C =
1378cyan, Y = yellow, M = magenta, and K = black. The ordering reflects
1379the order of the pixels in the supplied pixel array.</font></td>
1380 </tr>
1381 <tr>
1382 <td><font size="-1">type_</font></td>
1383 <td><font size="-1">Pixel storage type (CharPixel,
1384ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)</font></td>
1385 </tr>
1386 <tr>
1387 <td><font size="-1">pixels_</font></td>
1388 <td><font size="-1">This array of values contain the pixel
1389components as defined by the map_ and type_ parameters. The length of
1390the arrays must equal the area specified by the width_ and height_
1391values and type_ parameters.</font></td>
1392 </tr>
1393 </tbody>
1394 </table>
1395 </p>
1396 </td>
1397 </tr>
1398 <tr>
1399 <td>
1400 <center><a name="zoom"></a> <font size="-1">zoom</font></center>
1401 </td>
1402 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1403&amp;geometry_</font></td>
1404 <td><font size="-1">Zoom image to specified size.</font></td>
1405 </tr>
1406 </tbody>
1407</table>
1408</p>
1409<center>
1410<h3> <a name="Image Attributes"></a> Image Attributes</h3>
1411</center>
1412Image attributes are set and obtained via methods in Image. Except for
1413methods which accept pointer arguments (e.g. c<tt>hromaBluePrimary)</tt>
1414all methods return attributes by value.
1415<p>Image attributes are easily used. For example, to set the resolution
1416of the TIFF file "file.tiff" to 150 dots-per-inch (DPI) in both the
1417horizontal and vertical directions, you can use the following example
1418code: </p>
1419<blockquote><font color="#663366">string filename("file.tiff");</font> <br>
1420 <font color="#663366">Image image;</font> <br>
1421 <font color="#663366">image.read(filename);</font> <br>
1422 <font color="#663366">image.resolutionUnits(PixelsPerInchResolution);</font> <br>
1423 <font color="#663366">image.density(Geometry(150,150));&nbsp;&nbsp;
1424// could also use image.density("150x150")</font> <br>
1425 <font color="#663366">image.write(filename)</font></blockquote>
1426The supported image attributes and the method arguments required to
1427obtain them are shown in the following table: <br>
1428&nbsp;
1429<table border="1">
1430 <caption>Image Attributes</caption> <tbody>
1431 <tr>
1432 <td>
1433 <center><b>Function</b></center>
1434 </td>
1435 <td>
1436 <center><b>Type</b></center>
1437 </td>
1438 <td>
1439 <center><b>Get Signature</b></center>
1440 </td>
1441 <td>
1442 <center><b>Set Signature</b></center>
1443 </td>
1444 <td>
1445 <center><b>Description</b></center>
1446 </td>
1447 </tr>
1448 <tr>
1449 <td>
1450 <center><a name="adjoin"></a> <font size="-1">adjoin</font></center>
1451 </td>
1452 <td><font size="-1">bool</font></td>
1453 <td><font size="-1">void</font></td>
1454 <td><font size="-1">bool flag_</font></td>
1455 <td><font size="-1">Join images into a single multi-image file.</font></td>
1456 </tr>
1457 <tr>
1458 <td>
1459 <center><a name="antiAlias"></a> <font size="-1">antiAlias</font></center>
1460 </td>
1461 <td><font size="-1">bool</font></td>
1462 <td><font size="-1">void</font></td>
1463 <td><font size="-1">bool flag_</font></td>
1464 <td><font size="-1">Control antialiasing of rendered Postscript
1465and Postscript or TrueType fonts. Enabled by default.</font></td>
1466 </tr>
1467 <tr>
1468 <td>
1469 <center><a name="animationDelay"></a> <font size="-1">animation-</font> <br>
1470 <font size="-1">Delay</font></center>
1471 </td>
1472 <td><font size="-1">unsigned int (0 to 65535)</font></td>
1473 <td><font size="-1">void</font></td>
1474 <td><font size="-1">unsigned int delay_</font></td>
1475 <td><font size="-1">Time in 1/100ths of a second (0 to 65535)
1476which must expire before displaying the next image in an animated
1477sequence. This option is useful for regulating the animation of a
1478sequence&nbsp; of GIF images within Netscape.</font></td>
1479 </tr>
1480 <tr>
1481 <td>
1482 <center><a name="animationIterations"></a> <font size="-1">animation-</font> <br>
1483 <font size="-1">Iterations</font></center>
1484 </td>
1485 <td><font size="-1">unsigned int</font></td>
1486 <td><font size="-1">void</font></td>
1487 <td><font size="-1">unsigned int iterations_</font></td>
1488 <td><font size="-1">Number of iterations to loop an animation
1489(e.g. Netscape loop extension) for.</font></td>
1490 </tr>
1491 <tr>
1492 <td style="vertical-align: middle; text-align: center;"><small><a
1493 name="attribute"></a>attribute<br>
1494 </small></td>
1495 <td style="vertical-align: middle;"><small>string<br>
1496 </small></td>
1497 <td style="vertical-align: top;" valign="top"><small>const
1498std::string name_<br>
1499 </small></td>
1500 <td style="vertical-align: top;" valign="top"><small>const
1501std::string name_, const std::string value_</small></td>
1502 <td style="vertical-align: middle;"><small>An arbitrary named
1503image attribute. Any number of named attributes may be attached to the
1504image. For example, the image comment is a named image attribute with
1505the name "comment". EXIF tags are attached to the image as named
1506attributes. Use the syntax "[EXIF:&lt;tag&gt;]" to request an EXIF tag
1507similar to "[EXIF:DateTime]".</small><br>
1508 </td>
1509 </tr>
1510 <tr>
1511 <td>
1512 <center><a name="backgroundColor"></a> <font size="-1">background-</font> <br>
1513 <font size="-1">Color</font></center>
1514 </td>
1515 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1516 <td><font size="-1">void</font></td>
1517 <td><font size="-1">const <a href="Color.html">Color</a>
1518&amp;color_</font></td>
1519 <td><font size="-1">Image background color</font></td>
1520 </tr>
1521 <tr>
1522 <td>
1523 <center><a name="backgroundTexture"></a> <font size="-1">background-</font> <br>
1524 <font size="-1">Texture</font></center>
1525 </td>
1526 <td><font size="-1">string</font></td>
1527 <td><font size="-1">void</font></td>
1528 <td><font size="-1">const string &amp;texture_</font></td>
1529 <td><font size="-1">Image file name to use as the background
1530texture. Does not modify image pixels.</font></td>
1531 </tr>
1532 <tr>
1533 <td>
1534 <center><a name="baseColumns"></a> <font size="-1">baseColumns</font></center>
1535 </td>
1536 <td><font size="-1">unsigned int</font></td>
1537 <td><font size="-1">void</font></td>
1538 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1539 <td><font size="-1">Base image width (before transformations)</font></td>
1540 </tr>
1541 <tr>
1542 <td>
1543 <center><a name="baseFilename"></a> <font size="-1">baseFilename</font></center>
1544 </td>
1545 <td><font size="-1">string</font></td>
1546 <td><font size="-1">void</font></td>
1547 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1548 <td><font size="-1">Base image filename (before transformations)</font></td>
1549 </tr>
1550 <tr>
1551 <td>
1552 <center><a name="baseRows"></a> <font size="-1">baseRows</font></center>
1553 </td>
1554 <td><font size="-1">unsigned int</font></td>
1555 <td><font size="-1">void</font></td>
1556 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1557 <td><font size="-1">Base image height (before transformations)</font></td>
1558 </tr>
1559 <tr>
1560 <td>
1561 <center><a name="borderColor"></a> <font size="-1">borderColor</font></center>
1562 </td>
1563 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1564 <td><font size="-1">void</font></td>
1565 <td><font size="-1">&nbsp;const <a href="Color.html">Color</a>
1566&amp;color_</font></td>
1567 <td><font size="-1">Image border color</font></td>
1568 </tr>
1569 <tr>
1570 <td><a name="boundingBox"></a> <font size="-1">boundingBox</font></td>
1571 <td><font size="-1">Geometry</font></td>
1572 <td><font size="-1">void</font></td>
1573 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1574 <td><font size="-1">Return smallest bounding box enclosing
1575non-border pixels. The current fuzz value is used when discriminating
1576between pixels. This is the crop bounding box used by
1577crop(Geometry(0,0)).</font></td>
1578 </tr>
1579 <tr>
1580 <td>
1581 <center><a name="boxColor"></a> <font size="-1">boxColor</font></center>
1582 </td>
1583 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1584 <td><font size="-1">void</font></td>
1585 <td><font size="-1">const <a href="Color.html">Color</a>
1586&amp;boxColor_</font></td>
1587 <td><font size="-1">Base color that annotation text is rendered
1588on.</font></td>
1589 </tr>
1590 <tr>
1591 <td><a name="cacheThreshold"></a> <font size="-1">cacheThreshold</font></td>
1592 <td><font size="-1">unsigned int</font></td>
1593 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1594 <td><font size="-1">const int</font></td>
1595 <td><font size="-1">Pixel cache threshold in megabytes. Once this
1596threshold is exceeded, all subsequent pixels cache operations are
1597to/from disk. This is a static method and the attribute it sets is
1598shared by all Image objects.</font></td>
1599 </tr>
1600 <tr>
1601 <td style="vertical-align: middle;" valign="middle"><small><a
1602 name="channelDepth"></a>channelDepth<br>
1603 </small></td>
1604 <td style="vertical-align: middle;" valign="middle"><small>unsigned
1605int<br>
1606 </small></td>
1607 <td style="vertical-align: middle;" valign="middle"><small>const
1608ChannelType channel_<br>
1609 </small></td>
1610 <td style="vertical-align: middle;"><small>const ChannelType
1611channel_, const unsigned int depth_<br>
1612 </small></td>
1613 <td style="vertical-align: middle;"><small>Channel modulus depth.
1614The channel modulus depth represents the minimum number of bits required
1615to support the channel without loss. Setting the channel's modulus depth
1616modifies the channel (i.e. discards resolution) if the requested modulus
1617depth is less than the current modulus depth, otherwise the channel is
1618not altered. There is no attribute associated with the modulus depth so
1619the current modulus depth is obtained by inspecting the pixels. As a
1620result, the depth returned may be less than the most recently set
1621channel depth. Subsequent image processing may result in increasing the
1622channel depth.<br>
1623 </small></td>
1624 </tr>
1625 <tr>
1626 <td>
1627 <center><a name="chromaBluePrimary"></a> <font size="-1">chroma-</font> <br>
1628 <font size="-1">BluePrimary</font></center>
1629 </td>
1630 <td><font size="-1">double x &amp; y</font></td>
1631 <td><font size="-1">double *x_, double *y_</font></td>
1632 <td><font size="-1">double x_, double y_</font></td>
1633 <td><font size="-1">Chromaticity blue primary point (e.g. x=0.15,
1634y=0.06)</font></td>
1635 </tr>
1636 <tr>
1637 <td>
1638 <center><a name="chromaGreenPrimary"></a> <font size="-1">chroma-</font> <br>
1639 <font size="-1">GreenPrimary</font></center>
1640 </td>
1641 <td><font size="-1">double x &amp; y</font></td>
1642 <td><font size="-1">double *x_, double *y_</font></td>
1643 <td><font size="-1">double x_, double y_</font></td>
1644 <td><font size="-1">Chromaticity green primary point (e.g. x=0.3,
1645y=0.6)</font></td>
1646 </tr>
1647 <tr>
1648 <td>
1649 <center><a name="chromaRedPrimary"></a> <font size="-1">chroma-</font> <br>
1650 <font size="-1">RedPrimary</font></center>
1651 </td>
1652 <td><font size="-1">double x &amp; y</font></td>
1653 <td><font size="-1">double *x_, double *y_</font></td>
1654 <td><font size="-1">double x_, double y_</font></td>
1655 <td><font size="-1">Chromaticity red primary point (e.g. x=0.64,
1656y=0.33)</font></td>
1657 </tr>
1658 <tr>
1659 <td>
1660 <center><a name="chromaWhitePoint"></a> <font size="-1">chroma-</font> <br>
1661 <font size="-1">WhitePoint</font></center>
1662 </td>
1663 <td><font size="-1">double x &amp; y</font></td>
1664 <td><font size="-1">double*x_, double *y_</font></td>
1665 <td><font size="-1">double x_, double y_</font></td>
1666 <td><font size="-1">Chromaticity white point (e.g. x=0.3127,
1667y=0.329)</font></td>
1668 </tr>
1669 <tr>
1670 <td>
1671 <center><a name="classType"></a> <font size="-1">classType</font></center>
1672 </td>
1673 <td><font size="-1"><a href="Enumerations.html#ClassType">ClassType</a> </font></td>
1674 <td><font size="-1">void</font></td>
1675 <td><font size="-1">&nbsp;<a href="Enumerations.html#ClassType">ClassType</a>
1676class_</font></td>
1677 <td><font size="-1">Image storage class.&nbsp; Note that
1678conversion from a DirectClass image to a PseudoClass image may result
1679in a loss of color due to the limited size of the palette (256 or
168065535 colors).</font></td>
1681 </tr>
1682 <tr>
1683 <td>
1684 <center><a name="clipMask"></a> <font size="-1">clipMask</font></center>
1685 </td>
1686 <td><font size="-1">Image</font></td>
1687 <td><font size="-1">void</font></td>
1688 <td><font size="-1">const Image &amp;clipMask_</font></td>
1689 <td><font size="-1">Associate a clip mask image with the current
1690image. The clip mask image must have the same dimensions as the current
1691image or an exception is thrown. Clipping occurs wherever pixels are
1692transparent in the clip mask image. Clipping Pass an invalid image to
1693unset an existing clip mask.</font></td>
1694 </tr>
1695 <tr>
1696 <td>
1697 <center><a name="colorFuzz"></a> <font size="-1">colorFuzz</font></center>
1698 </td>
1699 <td><font size="-1">double</font></td>
1700 <td><font size="-1">void</font></td>
1701 <td><font size="-1">double fuzz_</font></td>
1702 <td><font size="-1">Colors within this distance are considered
1703equal. A number of algorithms search for a target&nbsp; color. By
1704default the color must be exact. Use this option to match colors that
1705are close to the target color in RGB space.</font></td>
1706 </tr>
1707 <tr>
1708 <td>
1709 <center><a name="colorMap"></a> <font size="-1">colorMap</font></center>
1710 </td>
1711 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1712 <td><font size="-1">unsigned int index_</font></td>
1713 <td><font size="-1">unsigned int index_, const <a
1714 href="Color.html"> Color</a> &amp;color_</font></td>
1715 <td><font size="-1">Color at colormap index.</font></td>
1716 </tr>
1717 <tr>
1718 <td valign="middle">
1719 <div align="center"><a name="colorMapSize"></a> <font size="-1">colorMapSize<br>
1720 </font></div>
1721 </td>
1722 <td valign="middle"><font size="-1">unsigned int<br>
1723 </font></td>
1724 <td valign="middle"><font size="-1">void<br>
1725 </font></td>
1726 <td valign="middle"><font size="-1">unsigned int entries_<br>
1727 </font></td>
1728 <td valign="middle"><font size="-1">Number of entries in the
1729colormap. Setting the colormap size may extend or truncate the colormap.
1730The maximum number of supported entries is specified by the <i>MaxColormapSize</i>constant,
1731and is dependent on the value of QuantumDepth when ImageMagick is
1732compiled. An exception is thrown if more entries are requested than may
1733be supported. Care should be taken when truncating the colormap to
1734ensure that the image colormap indexes reference valid colormap entries.</font><br>
1735 </td>
1736 </tr>
1737 <tr>
1738 <td>
1739 <center><a name="colorSpace"></a> <font size="-1">colorSpace</font></center>
1740 </td>
1741 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a>
1742colorSpace_</font></td>
1743 <td><font size="-1">void</font></td>
1744 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a>
1745colorSpace_</font></td>
1746 <td><font size="-1">The colorspace (e.g. CMYK) used to represent
1747the image pixel colors. Image pixels are always stored as RGB(A) except
1748for the case of CMY(K).</font></td>
1749 </tr>
1750 <tr>
1751 <td>
1752 <center><a name="columns"></a> <font size="-1">columns</font></center>
1753 </td>
1754 <td><font size="-1">unsigned int</font></td>
1755 <td><font size="-1">void</font></td>
1756 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1757 <td><font size="-1">Image width</font></td>
1758 </tr>
1759 <tr>
1760 <td>
1761 <center><a name="comment"></a> <font size="-1">comment</font></center>
1762 </td>
1763 <td><font size="-1">string</font></td>
1764 <td><font size="-1">void</font></td>
1765 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1766 <td><font size="-1">Image comment</font></td>
1767 </tr>
1768 <tr>
1769 <td>
1770 <center><a name="compose"></a> <font size="-1">compose</font></center>
1771 </td>
1772 <td><font size="-1"><a href="Enumerations.html#CompositeOperator">CompositeOperator</a> </font></td>
1773 <td><small><font size="-1"><small>void</small></font></small></td>
1774 <td><small><font size="-1"><small><a
1775 href="Enumerations.html#CompositeOperator">CompositeOperator</a>
1776compose_</small></font></small></td>
1777 <td><font size="-1">Composition operator to be used when
1778composition is implicitly used (such as for image flattening).</font></td>
1779 </tr>
1780 <tr>
1781 <td>
1782 <center><a name="compressType"></a> <font size="-1">compress-</font> <br>
1783 <font size="-1">Type</font></center>
1784 </td>
1785 <td><font size="-1"><a href="Enumerations.html#CompressionType">CompressionType</a> </font></td>
1786 <td><small><font size="-1"><small>void</small></font></small></td>
1787 <td><small><font size="-1"><small><a
1788 href="Enumerations.html#CompressionType">CompressionType</a>
1789compressType_</small></font></small></td>
1790 <td><font size="-1">Image compresion type. The default is the
1791compression type of the specified image file.</font></td>
1792 </tr>
1793 <tr>
1794 <td>
1795 <center><a name="debug"></a> <font size="-1">debug</font></center>
1796 </td>
1797 <td><font size="-1">bool</font></td>
1798 <td><small><font size="-1"><small>void</small></font></small></td>
1799 <td><small><font size="-1"><small>bool flag_</small></font></small></td>
1800 <td><font size="-1">Enable printing of internal debug messages
1801from ImageMagick as it executes.</font></td>
1802 </tr>
1803 <tr>
1804 <td style="text-align: center; vertical-align: middle;"><small><a
1805 name="defineValue"></a>defineValue<br>
1806 </small></td>
1807 <td style="vertical-align: middle; text-align: left;"><small>string<br>
1808 </small></td>
1809 <td style="vertical-align: middle;"><small>const std::string
1810&amp;magick_, const std::string &amp;key_<br>
1811 </small></td>
1812 <td style="vertical-align: middle;"><small>const std::string
1813&amp;magick_, const std::string &amp;key_, &nbsp;const std::string
1814&amp;value_<br>
1815 </small></td>
1816 <td style="vertical-align: top;"><small>Set or obtain a
1817definition string to applied when encoding or decoding the specified
1818format. The meanings of the definitions are format specific. The format
1819is designated by the <span style="font-style: italic;">magick_</span>
1820argument, the format-specific key is designated by <span
1821 style="font-style: italic;">key_</span>, and the associated value is
1822specified by <span style="font-style: italic;">value_</span>. See the
1823defineSet() method if the key must be removed entirely.</small><br>
1824 </td>
1825 </tr>
1826 <tr>
1827 <td style="text-align: center; vertical-align: middle;"><small><a
1828 name="defineSet"></a>defineSet<br>
1829 </small></td>
1830 <td style="vertical-align: middle; text-align: left;"><small>bool<br>
1831 </small></td>
1832 <td style="vertical-align: middle;"><small>const std::string
1833&amp;magick_, const std::string &amp;key_<br>
1834 </small></td>
1835 <td style="vertical-align: middle;"><small>const std::string
1836&amp;magick_, const std::string &amp;key_, bool flag_<br>
1837 </small></td>
1838 <td style="vertical-align: middle;"><small>Set or obtain a
1839definition flag to applied when encoding or decoding the specified
1840format.</small><small>. Similar to the defineValue() method except that
1841passing the <span style="font-style: italic;">flag_</span> value 'true'
1842creates a value-less define with that format and key. Passing the <span
1843 style="font-style: italic;">f</span><span style="font-style: italic;">lag_</span>
1844value 'false' removes any existing matching definition. The method
1845returns 'true' if a matching key exists, and 'false' if no matching key
1846exists.<br>
1847 </small></td>
1848 </tr>
1849 <tr>
1850 <td>
1851 <center><a name="density"></a> <font size="-1">density</font></center>
1852 </td>
1853 <td><font size="-1"><a href="Geometry.html">Geometry</a> &nbsp;
1854(default 72x72)</font></td>
1855 <td><font size="-1">void</font></td>
1856 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1857&amp;density_</font></td>
1858 <td><font size="-1">Vertical and horizontal resolution in pixels
1859of the image. This option specifies an image density when decoding a
1860Postscript or Portable Document page. Often used with <i>psPageSize</i>.</font></td>
1861 </tr>
1862 <tr>
1863 <td>
1864 <center><a name="depth"></a> <font size="-1">depth</font></center>
1865 </td>
1866 <td><font size="-1">&nbsp;unsigned int (8, 16, or 32)</font></td>
1867 <td><font size="-1">void</font></td>
1868 <td><font size="-1">unsigned int depth_</font></td>
1869 <td><font size="-1">Image depth. Used to specify the bit depth
1870when reading or writing&nbsp; raw images or when the output format
1871supports multiple depths. Defaults to the quantum depth that
1872ImageMagick is compiled with.</font></td>
1873 </tr>
1874 <tr>
1875 <td>
1876 <center><a name="endian"></a> <font size="-1">endian</font></center>
1877 </td>
1878 <td><font size="-1"><a href="Enumerations.html#EndianType">EndianType</a> </font></td>
1879 <td><font size="-1">void</font></td>
1880 <td><font size="-1"><a href="Enumerations.html#EndianType">EndianType</a>
1881endian_</font></td>
1882 <td><font size="-1">Specify (or obtain) endian option for formats
1883which support it.</font></td>
1884 </tr>
1885 <tr>
1886 <td>
1887 <center><a name="directory"></a> <font size="-1">directory</font></center>
1888 </td>
1889 <td><font size="-1">string</font></td>
1890 <td><font size="-1">void</font></td>
1891 <td><font size="-1">&nbsp;</font></td>
1892 <td><font size="-1">Tile names from within an image montage</font></td>
1893 </tr>
1894 <tr>
1895 <td>
1896 <center><a name="fileName"></a> <font size="-1">fileName</font></center>
1897 </td>
1898 <td><font size="-1">string</font></td>
1899 <td><font size="-1">void</font></td>
1900 <td><font size="-1">const string &amp;fileName_</font></td>
1901 <td><font size="-1">Image file name.</font></td>
1902 </tr>
1903 <tr>
1904 <td>
1905 <center><a name="fileSize"></a> <font size="-1">fileSize</font></center>
1906 </td>
1907 <td><font size="-1">off_t</font></td>
1908 <td><font size="-1">void</font></td>
1909 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1910 <td><font size="-1">Number of bytes of the image on disk</font></td>
1911 </tr>
1912 <tr>
1913 <td>
1914 <center><a name="fillColor"></a> <font size="-1">fillColor</font></center>
1915 </td>
1916 <td><font size="-1">Color</font></td>
1917 <td><font size="-1">void</font></td>
1918 <td><font size="-1">const Color &amp;fillColor_</font></td>
1919 <td><font size="-1">Color to use when filling drawn objects</font></td>
1920 </tr>
1921 <tr>
1922 <td>
1923 <center><a name="fillPattern"></a> <font size="-1">fillPattern</font></center>
1924 </td>
1925 <td><font size="-1">Image</font></td>
1926 <td><font size="-1">void</font></td>
1927 <td><font size="-1">const Image &amp;fillPattern_</font></td>
1928 <td><font size="-1">Pattern image to use when filling drawn
1929objects.</font></td>
1930 </tr>
1931 <tr>
1932 <td>
1933 <center><a name="fillRule"></a> <font size="-1">fillRule</font></center>
1934 </td>
1935 <td><font size="-1"><a href="Enumerations.html#FillRule">FillRule</a> </font></td>
1936 <td><font size="-1">void</font></td>
1937 <td><font size="-1">const Magick::FillRule &amp;fillRule_</font></td>
1938 <td><font size="-1">Rule to use when filling drawn objects.</font></td>
1939 </tr>
1940 <tr>
1941 <td>
1942 <center><a name="filterType"></a> <font size="-1">filterType</font></center>
1943 </td>
1944 <td><font size="-1"><a href="Enumerations.html#FilterTypes">FilterTypes</a> </font></td>
1945 <td><font size="-1">void</font></td>
1946 <td><font size="-1"><a href="Enumerations.html#FilterTypes">FilterTypes</a>
1947filterType_</font></td>
1948 <td><font size="-1">Filter to use when resizing image. The
1949reduction filter employed has a sigificant effect on the time required
1950to resize an image and the resulting quality. The default filter is <i>Lanczos</i>
1951which has been shown to produce high quality results when reducing most
1952images.</font></td>
1953 </tr>
1954 <tr>
1955 <td>
1956 <center><a name="font"></a> <font size="-1">font</font></center>
1957 </td>
1958 <td><font size="-1">string</font></td>
1959 <td><font size="-1">void</font></td>
1960 <td><font size="-1">const string &amp;font_</font></td>
1961 <td><font size="-1">Text rendering font. If the font is a fully
1962qualified X server font name, the font is obtained from an X&nbsp;
1963server. To use a TrueType font, precede the TrueType filename with an
1964@. Otherwise, specify&nbsp; a&nbsp; Postscript font name (e.g.
1965"helvetica").</font></td>
1966 </tr>
1967 <tr>
1968 <td>
1969 <center><a name="fontPointsize"></a> <font size="-1">fontPointsize</font></center>
1970 </td>
1971 <td><font size="-1">unsigned int</font></td>
1972 <td><font size="-1">void</font></td>
1973 <td><font size="-1">unsigned int pointSize_</font></td>
1974 <td><font size="-1">Text rendering font point size</font></td>
1975 </tr>
1976 <tr>
1977 <td>
1978 <center><a name="fontTypeMetrics"></a> <font size="-1">fontTypeMetrics</font></center>
1979 </td>
1980 <td><font size="-1"><a href="TypeMetric.html">TypeMetric</a> </font></td>
1981 <td><font size="-1">const std::string &amp;text_, <a
1982 href="TypeMetric.html"> TypeMetric</a> *metrics</font></td>
1983 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1984 <td><font size="-1">Update metrics with font type metrics using
1985specified <i>text</i>, and current <a href="#font">font</a> and <a
1986 href="#fontPointsize">fontPointSize</a> settings.</font></td>
1987 </tr>
1988 <tr>
1989 <td>
1990 <center><a name="format"></a> <font size="-1">format</font></center>
1991 </td>
1992 <td><font size="-1">string</font></td>
1993 <td><font size="-1">void</font></td>
1994 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
1995 <td><font size="-1">Long form image format description.</font></td>
1996 </tr>
1997 <tr>
1998 <td>
1999 <center><a name="gamma"></a> <font size="-1">gamma</font></center>
2000 </td>
2001 <td><font size="-1">double (typical range 0.8 to 2.3)</font></td>
2002 <td><font size="-1">void</font></td>
2003 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2004 <td><font size="-1">Gamma level of the image. The same color
2005image displayed on two different&nbsp; workstations&nbsp; may&nbsp;
2006look&nbsp; different due to differences in the display monitor.&nbsp;
2007Use gamma correction&nbsp; to&nbsp; adjust&nbsp; for this&nbsp;
2008color&nbsp; difference.</font></td>
2009 </tr>
2010 <tr>
2011 <td>
2012 <center><a name="geometry"></a> <font size="-1">geometry</font></center>
2013 </td>
2014 <td><font size="-1"><a href="Geometry.html">Geometry</a> </font></td>
2015 <td><font size="-1">void</font></td>
2016 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2017 <td><font size="-1">Preferred size of the image when encoding.</font></td>
2018 </tr>
2019 <tr>
2020 <td>
2021 <center><a name="gifDisposeMethod"></a> <font size="-1">gifDispose-</font> <br>
2022 <font size="-1">Method</font></center>
2023 </td>
2024 <td><font size="-1">unsigned int</font> <br>
2025 <font size="-1">{ 0 = Disposal not specified,</font> <br>
2026 <font size="-1">1 = Do not dispose of graphic,</font> <br>
2027 <font size="-1">3 = Overwrite graphic with background color,</font> <br>
2028 <font size="-1">4 = Overwrite graphic with previous graphic. }</font></td>
2029 <td><font size="-1">void</font></td>
2030 <td><font size="-1">unsigned int disposeMethod_</font></td>
2031 <td><font size="-1">GIF disposal method. This option is used to
2032control how successive frames are rendered (how the preceding frame is
2033disposed of) when creating a GIF animation.</font></td>
2034 </tr>
2035 <tr>
2036 <td>
2037 <center><a name="iccColorProfile"></a> <font size="-1">iccColorProfile</font></center>
2038 </td>
2039 <td><font size="-1"><a href="Blob.html">Blob</a> </font></td>
2040 <td><font size="-1">void</font></td>
2041 <td><font size="-1">const <a href="Blob.html">Blob</a>
2042&amp;colorProfile_</font></td>
2043 <td><font size="-1">ICC color profile. Supplied via a <a
2044 href="Blob.html"> Blob</a> since Magick++/ and ImageMagick do not
2045currently support formating this data structure directly.&nbsp;
2046Specifications are available from the <a href="http://www.color.org/">
2047International Color Consortium</a> for the format of ICC color profiles.</font></td>
2048 </tr>
2049 <tr>
2050 <td>
2051 <center><a name="interlaceType"></a> <font size="-1">interlace-</font> <br>
2052 <font size="-1">Type</font></center>
2053 </td>
2054 <td><font size="-1"><a href="Enumerations.html#InterlaceType">InterlaceType</a> </font></td>
2055 <td><font size="-1">void</font></td>
2056 <td><font size="-1"><a href="Enumerations.html#InterlaceType">InterlaceType</a>
2057interlace_</font></td>
2058 <td><font size="-1">The type of interlacing scheme (default <i>NoInterlace</i>
2059). This option is used to specify the type of&nbsp; interlacing
2060scheme&nbsp; for&nbsp; raw&nbsp; image formats such as RGB or YUV. <i>NoInterlace</i>
2061means do not&nbsp; interlace, <i>LineInterlace</i> uses scanline
2062interlacing, and <i>PlaneInterlace</i> uses plane interlacing. <i>
2063PartitionInterlace</i> is like <i>PlaneInterlace</i> except the&nbsp;
2064different planes&nbsp; are saved&nbsp; to individual files (e.g.&nbsp;
2065image.R, image.G, and image.B). Use <i>LineInterlace</i> or <i>
2066PlaneInterlace</i> to create an interlaced GIF or progressive JPEG image.</font></td>
2067 </tr>
2068 <tr>
2069 <td>
2070 <center><a name="iptcProfile"></a> <font size="-1">iptcProfile</font></center>
2071 </td>
2072 <td><font size="-1"><a href="Blob.html">Blob</a> </font></td>
2073 <td><font size="-1">void</font></td>
2074 <td><font size="-1">const <a href="Blob.html">Blob</a> &amp;
2075iptcProfile_</font></td>
2076 <td><font size="-1">IPTC profile. Supplied via a <a
2077 href="Blob.html"> Blob</a> since Magick++ and ImageMagick do not
2078currently&nbsp; support formating this data structure directly.
2079Specifications are available from the <a href="http://www.iptc.org/">
2080International Press Telecommunications Council</a> for IPTC profiles.</font></td>
2081 </tr>
2082 <tr>
2083 <td>
2084 <center><a name="label"></a> <font size="-1">label</font></center>
2085 </td>
2086 <td><font size="-1">string</font></td>
2087 <td><font size="-1">void</font></td>
2088 <td><font size="-1">const string &amp;label_</font></td>
2089 <td><font size="-1">Image label</font></td>
2090 </tr>
2091 <tr>
2092 <td>
2093 <center><a name="magick"></a> <font size="-1">magick</font></center>
2094 </td>
2095 <td><font size="-1">string</font></td>
2096 <td><font size="-1">void</font></td>
2097 <td><font size="-1">&nbsp;const string &amp;magick_</font></td>
2098 <td><font size="-1">Get image format (e.g. "GIF")</font></td>
2099 </tr>
2100 <tr>
2101 <td>
2102 <center><a name="matte"></a> <font size="-1">matte</font></center>
2103 </td>
2104 <td><font size="-1">bool</font></td>
2105 <td><font size="-1">void</font></td>
2106 <td><font size="-1">bool matteFlag_</font></td>
2107 <td><font size="-1">True if the image has transparency. If set
2108True, store matte channel if&nbsp; the image has one otherwise create
2109an opaque one.</font></td>
2110 </tr>
2111 <tr>
2112 <td>
2113 <center><a name="matteColor"></a> <font size="-1">matteColor</font></center>
2114 </td>
2115 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
2116 <td><font size="-1">void</font></td>
2117 <td><font size="-1">const <a href="Color.html">Color</a>
2118&amp;matteColor_</font></td>
2119 <td><font size="-1">Image matte (frame) color</font></td>
2120 </tr>
2121 <tr>
2122 <td>
2123 <center><a name="meanErrorPerPixel"></a> <font size="-1">meanError-</font> <br>
2124 <font size="-1">PerPixel</font></center>
2125 </td>
2126 <td><font size="-1">double</font></td>
2127 <td><font size="-1">void</font></td>
2128 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2129 <td><font size="-1">The mean error per pixel computed when an
2130image is color reduced. This parameter is only valid if verbose is set
2131to true and the image has just been quantized.</font></td>
2132 </tr>
2133 <tr>
2134 <td style="text-align: center; vertical-align: middle;"><font
2135 size="-1"><a name="modulusDepth"></a>modulusDepth<br>
2136 </font></td>
2137 <td style="text-align: left; vertical-align: middle;"><small>unsigned
2138int<br>
2139 </small></td>
2140 <td style="text-align: left; vertical-align: middle;"><small><font
2141 size="-1"><small>void<br>
2142 </small></font></small></td>
2143 <td style="text-align: left; vertical-align: middle;"><small>unsigned
2144int depth_<br>
2145 </small></td>
2146 <td style="text-align: left; vertical-align: middle;"><small>Image
2147modulus depth (minimum number of bits required to support
2148red/green/blue components without loss of accuracy). The pixel modulus
2149depth may be decreased by supplying a value which is less than the
2150current value, updating the pixels (reducing accuracy) to the new depth.
2151The pixel modulus depth can not be increased over the current value
2152using this method.<br>
2153 </small></td>
2154 </tr>
2155 <tr>
2156 <td>
2157 <center><a name="monochrome"></a> <font size="-1">monochrome</font></center>
2158 </td>
2159 <td><font size="-1">bool</font></td>
2160 <td><font size="-1">void</font></td>
2161 <td><font size="-1">bool flag_</font></td>
2162 <td><font size="-1">Transform the image to black and white</font></td>
2163 </tr>
2164 <tr>
2165 <td>
2166 <center><a name="montageGeometry"></a> <font size="-1">montage-</font> <br>
2167 <font size="-1">Geometry</font></center>
2168 </td>
2169 <td><font size="-1"><a href="Geometry.html">Geometry</a> </font></td>
2170 <td><font size="-1">void</font></td>
2171 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2172 <td><font size="-1">Tile size and offset within an image montage.
2173Only valid for montage images.</font></td>
2174 </tr>
2175 <tr>
2176 <td>
2177 <center><a name="normalizedMaxError"></a> <font size="-1">normalized-</font> <br>
2178 <font size="-1">MaxError</font></center>
2179 </td>
2180 <td><font size="-1">double</font></td>
2181 <td><font size="-1">void</font></td>
2182 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2183 <td><font size="-1">The normalized max error per pixel computed
2184when an image is color reduced. This parameter is only valid if verbose
2185is set to true and the image has just been quantized.</font></td>
2186 </tr>
2187 <tr>
2188 <td>
2189 <center><a name="normalizedMeanError"></a> <font size="-1">normalized-</font> <br>
2190 <font size="-1">MeanError</font></center>
2191 </td>
2192 <td><font size="-1">double</font></td>
2193 <td><font size="-1">void</font></td>
2194 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2195 <td><font size="-1">The normalized mean error per pixel computed
2196when an image is color reduced. This parameter is only valid if verbose
2197is set to true and the image has just been quantized.</font></td>
2198 </tr>
2199 <tr>
2200 <td style="text-align: center; vertical-align: middle;"><small><a
2201 name="orientation"></a>orientation<br>
2202 </small></td>
2203 <td style="vertical-align: middle;"><small><a
2204 href="Enumerations.html#OrientationType">OrientationType</a></small></td>
2205 <td style="vertical-align: top;"><small>void</small><br>
2206 </td>
2207 <td style="vertical-align: middle;"><small><a
2208 href="www/Magick++/Enumerations.html#OrientationType">OrientationType</a>
2209orientation_</small></td>
2210 <td style="vertical-align: top;"><small>Image orientation.
2211&nbsp;Supported by some file formats such as DPX and TIFF. Useful for
2212turning the right way up.<br>
2213 </small></td>
2214 </tr>
2215 <tr>
2216 <td>
2217 <center><a name="packets"></a> <font size="-1">packets</font></center>
2218 </td>
2219 <td><font size="-1">unsigned int</font></td>
2220 <td><font size="-1">void</font></td>
2221 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2222 <td><font size="-1">The number of runlength-encoded packets in</font> <br>
2223 <font size="-1">the image</font></td>
2224 </tr>
2225 <tr>
2226 <td>
2227 <center><a name="packetSize"></a> <font size="-1">packetSize</font></center>
2228 </td>
2229 <td><font size="-1">unsigned int</font></td>
2230 <td><font size="-1">void</font></td>
2231 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2232 <td><font size="-1">The number of bytes in each pixel packet</font></td>
2233 </tr>
2234 <tr>
2235 <td>
2236 <center><a name="page"></a> <font size="-1">page</font></center>
2237 </td>
2238 <td><font size="-1"><a href="Geometry.html#PostscriptPageSize">Geometry</a> </font></td>
2239 <td><font size="-1">void</font></td>
2240 <td><font size="-1">const <a
2241 href="Geometry.html#PostscriptPageSize"> Geometry</a> &amp;pageSize_</font></td>
2242 <td><font size="-1">Preferred size and location of an image
2243canvas.</font>
2244 <p><font size="-1">Use this option to specify the dimensions
2245and position of the Postscript page in dots per inch or a TEXT page in
2246pixels. This option is typically used in concert with <i><a
2247 href="#density"> density</a> </i>.</font> </p>
2248 <p><font size="-1">Page may also be used to position a GIF
2249image (such as for a scene in an animation)</font></p>
2250 </td>
2251 </tr>
2252 <tr>
2253 <td>
2254 <center><a name="pixelColor"></a> <font size="-1">pixelColor</font></center>
2255 </td>
2256 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
2257 <td><font size="-1">unsigned int x_, unsigned int y_</font></td>
2258 <td><font size="-1">unsigned int x_, unsigned int y_, const <a
2259 href="Color.html"> Color</a> &amp;color_</font></td>
2260 <td><font size="-1">Get/set pixel color at location x &amp; y.</font></td>
2261 </tr>
2262 <tr>
2263 <td valign="top">
2264 <div align="center"><a name="profile"></a> <small>profile</small><br>
2265 </div>
2266 </td>
2267 <td valign="top"><a href="Blob.html"><small> Blob</small><small><br>
2268 </small></a> </td>
2269 <td valign="top"><small>const std::string name_</small><small><br>
2270 </small></td>
2271 <td valign="top"><small>const std::string name_, const Blob
2272&amp;colorProfile_</small><small><br>
2273 </small></td>
2274 <td valign="top"><small>Get/set/remove </small><small> a named
2275profile</small><small>. Valid names include </small><small>"*",
2276"8bim", "icm", "iptc", or a user/format-defined profile name. </small><br>
2277 </td>
2278 </tr>
2279 <tr>
2280 <td>
2281 <center><a name="quality"></a> <font size="-1">quality</font></center>
2282 </td>
2283 <td><font size="-1">unsigned int (0 to 100)</font></td>
2284 <td><font size="-1">void</font></td>
2285 <td><font size="-1">unsigned int quality_</font></td>
2286 <td><font size="-1">JPEG/MIFF/PNG compression level (default 75).</font></td>
2287 </tr>
2288 <tr>
2289 <td>
2290 <center><a name="quantizeColors"></a> <font size="-1">quantize-</font> <br>
2291 <font size="-1">Colors</font></center>
2292 </td>
2293 <td><font size="-1">unsigned int</font></td>
2294 <td><font size="-1">void</font></td>
2295 <td><font size="-1">unsigned int colors_</font></td>
2296 <td><font size="-1">Preferred number of colors in the image. The
2297actual number of colors in the image may be less than your request, but
2298never more. Images with less unique colors than specified with this
2299option will have any duplicate or unused colors removed.</font></td>
2300 </tr>
2301 <tr>
2302 <td>
2303 <center><a name="quantizeColorSpace"></a> <font size="-1">quantize-</font> <br>
2304 <font size="-1">ColorSpace</font></center>
2305 </td>
2306 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a> </font></td>
2307 <td><font size="-1">void</font></td>
2308 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a>
2309colorSpace_</font></td>
2310 <td><font size="-1">Colorspace to quantize colors in (default
2311RGB). Empirical evidence suggests that distances in color spaces such
2312as YUV or YIQ correspond to perceptual color differences more closely
2313than do distances in RGB space. These color spaces may give better
2314results when color reducing an image.</font></td>
2315 </tr>
2316 <tr>
2317 <td>
2318 <center><a name="quantizeDither"></a> <font size="-1">quantize-</font> <br>
2319 <font size="-1">Dither</font></center>
2320 </td>
2321 <td><font size="-1">bool</font></td>
2322 <td><font size="-1">void</font></td>
2323 <td><font size="-1">bool flag_</font></td>
2324 <td><font size="-1">Apply Floyd/Steinberg error diffusion to the
2325image. The basic strategy of dithering is to&nbsp; trade&nbsp; intensity
2326resolution&nbsp; for&nbsp; spatial&nbsp; resolution&nbsp; by&nbsp;
2327averaging the intensities&nbsp; of&nbsp; several&nbsp;
2328neighboring&nbsp; pixels. Images which&nbsp; suffer&nbsp; from&nbsp;
2329severe&nbsp; contouring&nbsp; when&nbsp; reducing colors can be
2330improved with this option. The quantizeColors or monochrome option must
2331be set for this option to take effect.</font></td>
2332 </tr>
2333 <tr>
2334 <td>
2335 <center><a name="quantizeTreeDepth"></a> <font size="-1">quantize-</font> <br>
2336 <font size="-1">TreeDepth</font></center>
2337 </td>
2338 <td><font size="-1">unsigned int&nbsp;</font></td>
2339 <td><font size="-1">void</font></td>
2340 <td><font size="-1">unsigned int treeDepth_</font></td>
2341 <td><font size="-1">Depth of the quantization color
2342classification tree. Values of 0 or 1 allow selection of the optimal
2343tree depth for the color reduction algorithm. Values between 2 and 8
2344may be used to manually adjust the tree depth.</font></td>
2345 </tr>
2346 <tr>
2347 <td>
2348 <center><a name="renderingIntent"></a> <font size="-1">rendering-</font> <br>
2349 <font size="-1">Intent</font></center>
2350 </td>
2351 <td><font size="-1"><a href="Enumerations.html#RenderingIntent">RenderingIntent</a> </font></td>
2352 <td><font size="-1">void</font></td>
2353 <td><font size="-1"><a href="Enumerations.html#RenderingIntent">RenderingIntent</a>
2354render_</font></td>
2355 <td><font size="-1">The type of rendering intent</font></td>
2356 </tr>
2357 <tr>
2358 <td>
2359 <center><a name="resolutionUnits"></a> <font size="-1">resolution-</font> <br>
2360 <font size="-1">Units</font></center>
2361 </td>
2362 <td><font size="-1"><a href="Enumerations.html#ResolutionType">ResolutionType</a> </font></td>
2363 <td><font size="-1">void</font></td>
2364 <td><font size="-1"><a href="Enumerations.html#ResolutionType">ResolutionType</a>
2365units_</font></td>
2366 <td><font size="-1">Units of image resolution</font></td>
2367 </tr>
2368 <tr>
2369 <td>
2370 <center><a name="rows"></a> <font size="-1">rows</font></center>
2371 </td>
2372 <td><font size="-1">unsigned int</font></td>
2373 <td><font size="-1">void</font></td>
2374 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2375 <td><font size="-1">The number of pixel rows in the image</font></td>
2376 </tr>
2377 <tr>
2378 <td>
2379 <center><a name="samplingFactor"></a> <font size="-1">samplingFactor</font></center>
2380 </td>
2381 <td><font size="-1">string (e.g. "2x1,1x1,1x1")</font></td>
2382 <td><font size="-1">void</font></td>
2383 <td><font size="-1">const string &amp;samplingFactor_</font></td>
2384 <td><font size="-1">JPEG sampling factors</font></td>
2385 </tr>
2386 <tr>
2387 <td>
2388 <center><a name="scene"></a> <font size="-1">scene</font></center>
2389 </td>
2390 <td><font size="-1">unsigned int</font></td>
2391 <td><font size="-1">void</font></td>
2392 <td><font size="-1">unsigned int scene_</font></td>
2393 <td><font size="-1">Image scene number</font></td>
2394 </tr>
2395 <tr>
2396 <td>
2397 <center><a name="signature"></a> <font size="-1">signature</font></center>
2398 </td>
2399 <td><font size="-1">string</font></td>
2400 <td><font size="-1">bool force_ = false</font></td>
2401 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2402 <td><font size="-1">Image MD5 signature. Set force_ to 'true' to
2403force re-computation of signature.</font></td>
2404 </tr>
2405 <tr>
2406 <td>
2407 <center><a name="size"></a> <font size="-1">size</font></center>
2408 </td>
2409 <td><font size="-1"><a href="Geometry.html">Geometry</a> </font></td>
2410 <td><font size="-1">void</font></td>
2411 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
2412&amp;geometry_</font></td>
2413 <td><font size="-1">Width and height of a raw image (an image
2414which does not support width and height information).&nbsp; Size may
2415also be used to affect the image size read from a multi-resolution
2416format (e.g. Photo CD, JBIG, or JPEG.</font></td>
2417 </tr>
2418 <tr>
2419 <td>
2420 <center><a name="strokeAntiAlias"></a> <font size="-1">strokeAntiAlias</font></center>
2421 </td>
2422 <td><font size="-1">bool</font></td>
2423 <td><font size="-1">void</font></td>
2424 <td><font size="-1">bool flag_</font></td>
2425 <td><font size="-1">Enable or disable anti-aliasing when drawing
2426object outlines.</font></td>
2427 </tr>
2428 <tr>
2429 <td>
2430 <center><a name="strokeColor"></a> <font size="-1">strokeColor</font></center>
2431 </td>
2432 <td><font size="-1">Color</font></td>
2433 <td><font size="-1">void</font></td>
2434 <td><font size="-1">const Color &amp;strokeColor_</font></td>
2435 <td><font size="-1">Color to use when drawing object outlines</font></td>
2436 </tr>
2437 <tr>
2438 <td>
2439 <center><a name="strokeDashOffset"></a> <font size="-1">strokeDashOffset</font></center>
2440 </td>
2441 <td><font size="-1">unsigned int</font></td>
2442 <td><font size="-1">void</font></td>
2443 <td><font size="-1">double strokeDashOffset_</font></td>
2444 <td><font size="-1">While drawing using a dash pattern, specify
2445distance into the dash pattern to start the dash (default 0).</font></td>
2446 </tr>
2447 <tr>
2448 <td>
2449 <center><a name="strokeDashArray"></a> <font size="-1">strokeDashArray</font></center>
2450 </td>
2451 <td><font size="-1">const double*</font></td>
2452 <td><font size="-1">void</font></td>
2453 <td><font size="-1">const double* strokeDashArray_</font></td>
2454 <td><font size="-1">Specify the pattern of dashes and gaps used
2455to stroke paths. The strokeDashArray represents a zero-terminated
2456array of numbers that specify the lengths (in pixels) of alternating
2457dashes and gaps in user units. If an odd number of values is provided,
2458then the list of values is repeated to yield an even number of
2459values.&nbsp; A typical strokeDashArray_ array might contain the
2460members 5 3 2 0, where the zero value indicates the end of the pattern
2461array.</font></td>
2462 </tr>
2463 <tr>
2464 <td>
2465 <center><a name="strokeLineCap"></a> <font size="-1">strokeLineCap</font></center>
2466 </td>
2467 <td><font size="-1">LineCap</font></td>
2468 <td><font size="-1">void</font></td>
2469 <td><font size="-1">LineCap lineCap_</font></td>
2470 <td><font size="-1">Specify the shape to be used at the corners
2471of paths (or other vector shapes) when they are stroked. Values of
2472LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.</font></td>
2473 </tr>
2474 <tr>
2475 <td>
2476 <center><a name="strokeLineJoin"></a> <font size="-1">strokeLineJoin</font></center>
2477 </td>
2478 <td><font size="-1">LineJoin</font></td>
2479 <td><font size="-1">void</font></td>
2480 <td><font size="-1">LineJoin lineJoin_</font></td>
2481 <td><font size="-1">Specify the shape to be used at the corners
2482of paths (or other vector shapes) when they are stroked. Values of
2483LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.</font></td>
2484 </tr>
2485 <tr>
2486 <td>
2487 <center><a name="strokeMiterLimit"></a> <font size="-1">strokeMiterLimit</font></center>
2488 </td>
2489 <td><font size="-1">unsigned int</font></td>
2490 <td><font size="-1">void</font></td>
2491 <td><font size="-1">unsigned int miterLimit_</font></td>
2492 <td><font size="-1">Specify miter limit. When two line segments
2493meet at a sharp angle and miter joins have been specified for
2494'lineJoin', it is possible for the miter to extend far beyond the
2495thickness of the line stroking the path. The miterLimit' imposes a
2496limit on the ratio of the miter length to the 'lineWidth'. The default
2497value of this parameter is 4.</font></td>
2498 </tr>
2499 <tr>
2500 <td>
2501 <center><a name="strokeWidth"></a> <font size="-1">strokeWidth</font></center>
2502 </td>
2503 <td><font size="-1">double</font></td>
2504 <td><font size="-1">void</font></td>
2505 <td><font size="-1">double strokeWidth_</font></td>
2506 <td><font size="-1">Stroke width for use when drawing vector
2507objects (default one)</font></td>
2508 </tr>
2509 <tr>
2510 <td>
2511 <center><a name="strokePattern"></a> <font size="-1">strokePattern</font></center>
2512 </td>
2513 <td><font size="-1">Image</font></td>
2514 <td><font size="-1">void</font></td>
2515 <td><font size="-1">const Image &amp;strokePattern_</font></td>
2516 <td><font size="-1">Pattern image to use while drawing object
2517stroke (outlines).</font></td>
2518 </tr>
2519 <tr>
2520 <td>
2521 <center><a name="subImage"></a> <font size="-1">subImage</font></center>
2522 </td>
2523 <td><font size="-1">unsigned int</font></td>
2524 <td><font size="-1">void</font></td>
2525 <td><font size="-1">unsigned int subImage_</font></td>
2526 <td><font size="-1">Subimage of an image sequence</font></td>
2527 </tr>
2528 <tr>
2529 <td>
2530 <center><a name="subRange"></a> <font size="-1">subRange</font></center>
2531 </td>
2532 <td><font size="-1">unsigned int</font></td>
2533 <td><font size="-1">void</font></td>
2534 <td><font size="-1">unsigned int subRange_</font></td>
2535 <td><font size="-1">Number of images relative to the base image</font></td>
2536 </tr>
2537 <tr>
2538 <td valign="middle">
2539 <div align="center"><a name="textEncoding"></a> <small>textEncoding</small><br>
2540 </div>
2541 </td>
2542 <td valign="middle"><small>string</small><small><br>
2543 </small></td>
2544 <td valign="middle"><small>void</small><small><br>
2545 </small></td>
2546 <td valign="middle"><small>const std::string &amp;encoding_</small><small><br>
2547 </small></td>
2548 <td valign="top"><small>Specify the code set to use for text
2549annotations. The only character encoding which may be specified at
2550this time is "UTF-8" for representing </small><small><a
2551 href="http://www.unicode.org/"> Unicode </a> </small><small>as a
2552sequence of bytes. Specify an empty string to use the default ASCII
2553encoding. Successful text annotation using Unicode may require fonts
2554designed to support Unicode.</small><br>
2555 </td>
2556 </tr>
2557 <tr>
2558 <td>
2559 <center><a name="tileName"></a> <font size="-1">tileName</font></center>
2560 </td>
2561 <td><font size="-1">string</font></td>
2562 <td><font size="-1">void</font></td>
2563 <td><font size="-1">const string &amp;tileName_</font></td>
2564 <td><font size="-1">Tile name</font></td>
2565 </tr>
2566 <tr>
2567 <td>
2568 <center><a name="totalColors"></a> <font size="-1">totalColors</font></center>
2569 </td>
2570 <td><font size="-1">unsigned long</font></td>
2571 <td><font size="-1">void</font></td>
2572 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2573 <td><font size="-1">Number of colors in the image</font></td>
2574 </tr>
2575 <tr>
2576 <td>
2577 <center><a name="type"></a> <font size="-1">type</font></center>
2578 </td>
2579 <td><font size="-1"><a href="Enumerations.html#ImageType">ImageType</a> </font></td>
2580 <td><font size="-1">void</font></td>
2581 <td bgcolor="#ffffff"><font size="-1"><a
2582 href="Enumerations.html#ImageType"> ImageType</a> </font></td>
2583 <td><font size="-1">Image type.</font></td>
2584 </tr>
2585 <tr>
2586 <td>
2587 <center><a name="verbose"></a> <font size="-1">verbose</font></center>
2588 </td>
2589 <td><font size="-1">bool</font></td>
2590 <td><font size="-1">void</font></td>
2591 <td><font size="-1">bool verboseFlag_</font></td>
2592 <td><font size="-1">Print detailed information about the image</font></td>
2593 </tr>
2594 <tr>
2595 <td>
2596 <center><a name="view"></a> <font size="-1">view</font></center>
2597 </td>
2598 <td><font size="-1">string</font></td>
2599 <td><font size="-1">void</font></td>
2600 <td><font size="-1">const string &amp;view_</font></td>
2601 <td><font size="-1">FlashPix viewing parameters.</font></td>
2602 </tr>
2603 <tr>
2604 <td>
2605 <center><a name="x11Display"></a> <font size="-1">x11Display</font></center>
2606 </td>
2607 <td><font size="-1">string (e.g. "hostname:0.0")</font></td>
2608 <td><font size="-1">void</font></td>
2609 <td><font size="-1">const string &amp;display_</font></td>
2610 <td><font size="-1">X11 display to display to, obtain fonts from,
2611or to capture image from</font></td>
2612 </tr>
2613 <tr>
2614 <td>
2615 <center><a name="xResolution"></a> <font size="-1">xResolution</font></center>
2616 </td>
2617 <td><font size="-1">double</font></td>
2618 <td><font size="-1">void</font></td>
2619 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2620 <td><font size="-1">x resolution of the image</font></td>
2621 </tr>
2622 <tr>
2623 <td>
2624 <center><a name="yResolution"></a> <font size="-1">yResolution</font></center>
2625 </td>
2626 <td><font size="-1">double</font></td>
2627 <td><font size="-1">void</font></td>
2628 <td bgcolor="#666666"><font size="-1">&nbsp;</font></td>
2629 <td><font size="-1">y resolution of the image</font></td>
2630 </tr>
2631 </tbody>
2632</table>
2633<center>
2634<h3> <a name="Raw Image Pixel Access"></a> Low-Level Image Pixel Access</h3>
2635</center>
2636Image pixels (of type <i><a href="PixelPacket.html">PixelPacket</a> </i>)
2637may be accessed directly via the <i>Image Pixel Cache</i> .&nbsp; The
2638image pixel cache is a rectangular window into the actual image pixels
2639(which may be in memory, memory-mapped from a disk file, or entirely on
2640disk). Two interfaces exist to access the <i>Image Pixel Cache.</i> The
2641interface described here (part of the <i>Image</i> class) supports only
2642one view at a time. See the <i><a href="Pixels.html">Pixels</a> </i>
2643class for a more abstract interface which supports simultaneous pixel
2644views (up to the number of rows). As an analogy, the interface described
2645here relates to the <i><a href="Pixels.html">Pixels</a> </i> class as
2646stdio's gets() relates to fgets(). The <i><a href="Pixels.html"> Pixels</a> </i>
2647class provides the more general form of the interface.
2648<p>Obtain existing image pixels via <i>getPixels()</i>. Create a new
2649pixel region using <i>setPixels().</i></p>
2650<p>In order to ensure that only the current generation of the image is
2651modified, the Image's <a href="#modifyImage">modifyImage()</a> method
2652should be invoked to reduce the reference count on the underlying image
2653to one. If this is not done, then it is possible for a previous
2654generation of the image to be modified due to the use of reference
2655counting when copying or constructing an Image.<br>
2656</p>
2657<p>Depending on the capabilities of the operating system, and the
2658relationship of the window to the image, the pixel cache may be a copy
2659of the pixels in the selected window, or it may be the actual image
2660pixels. In any case calling <i>syncPixels()</i> insures that the base
2661image is updated with the contents of the modified pixel cache. The
2662method <i> readPixels()</i> supports copying foreign pixel data formats
2663into the pixel cache according to the <i>QuantumTypes</i>. The method <i>writePixels()</i>
2664supports copying the pixels in the cache to a foreign pixel
2665representation according to the format specified by <i>QuantumTypes</i>.</p>
2666<p>The pixel region is effectively a small image in which the pixels
2667may be accessed, addressed, and updated, as shown in the following
2668example:
2669<table border="0" width="100%">
2670 <tbody>
2671 <tr>
2672 <td><font face="Courier New,Courier"><font color="#000099"><font
2673 size="-1"> Image image("cow.png");</font></font></font> <br>
2674 <font face="Courier New,Courier"><font color="#ff0000"><font
2675 size="-1"> // Ensure that there are no other references to this image.</font></font></font><br>
2676 <font size="-1"><span
2677 style="color: rgb(0, 0, 153); font-family: courier new,courier,monospace;">image.modifyImage();<br>
2678 </span></font><font face="Courier New,Courier"><font
2679 color="#ff0000"><font size="-1"> // Set the image type to TrueColor
2680DirectClass representation.</font></font></font><br>
2681 <font size="-1"><span
2682 style="color: rgb(0, 0, 153); font-family: courier new,courier,monospace;">image.type(TrueColorType</span></font><font
2683 size="-1"><span
2684 style="color: rgb(0, 0, 153); font-family: courier new,courier,monospace;">);</span></font><br>
2685 <font face="Courier New,Courier"><font color="#ff0000"><font
2686 size="-1"> // Request pixel region with size 60x40, and top origin at
268720x30</font></font></font> <br>
2688 <font face="Courier New,Courier"><font color="#000099"><font
2689 size="-1"> int columns = 60;</font></font></font> <br>
2690 <font face="Courier New,Courier"><font color="#000099"><font
2691 size="-1"> PixelPacket *pixel_cache = image.getPixels(20,30,columns,40);</font></font></font> <br>
2692 <font face="Courier New,Courier"><font color="#ff0000"><font
2693 size="-1"> // Set pixel at column 5, and row 10 in the pixel cache to
2694red.</font></font></font> <br>
2695 <font face="Courier New,Courier"><font color="#000099"><font
2696 size="-1"> int column = 5;</font></font></font> <br>
2697 <font face="Courier New,Courier"><font color="#000099"><font
2698 size="-1"> int row = 10;</font></font></font> <br>
2699 <font face="Courier New,Courier"><font color="#000099"><font
2700 size="-1"> PixelPacket *pixel = pixel_cache+row*columns+column;</font></font></font> <br>
2701 <font face="Courier New,Courier"><font color="#000099"><font
2702 size="-1"> *pixel = Color("red");</font></font></font> <br>
2703 <font face="Courier New,Courier"><font color="#ff0000"><font
2704 size="-1"> // Save changes to underlying image</font></font></font> .<br>
2705 <font face="Courier New,Courier"><font color="#000099"><font
2706 size="-1"> image.syncPixels();<br>
2707 </font></font></font>&nbsp;<font face="Courier New,Courier"><font
2708 color="#ff0000"><font size="-1"> // Save updated image to file.</font></font></font><br>
2709 <font face="Courier New,Courier"><font color="#000099"><font
2710 size="-1"> image.write("horse.png");</font></font></font></td>
2711 <td><img src="Cache.png" height="218" width="254"> </td>
2712 </tr>
2713 </tbody>
2714</table>
2715</p>
2716<p>The image cache supports the following methods: <br>
2717&nbsp;
2718<table border="1" width="100%">
2719 <caption>Image Cache Methods</caption> <tbody>
2720 <tr>
2721 <td>
2722 <center><b>Method</b></center>
2723 </td>
2724 <td>
2725 <center><b>Returns</b></center>
2726 </td>
2727 <td>
2728 <center><b>Signature</b></center>
2729 </td>
2730 <td>
2731 <center><b>Description</b></center>
2732 </td>
2733 </tr>
2734 <tr>
2735 <td>
2736 <center><a name="getConstPixels"></a> <font size="-1">getConstPixels</font></center>
2737 </td>
2738 <td><font size="-1">const <a href="PixelPacket.html">PixelPacket</a>
2739*</font></td>
2740 <td><font size="-1">const int x_, const int y_, const unsigned
2741int columns_, const unsigned int rows_</font></td>
2742 <td><font size="-1">Transfers pixels from the image to the pixel
2743cache as defined by the specified rectangular region.&nbsp;</font><font
2744 size="-1">The returned pointer remains valid until the next getPixel,
2745getConstPixels, or setPixels call and should never be deallocated by the
2746user.</font></td>
2747 </tr>
2748 <tr>
2749 <td>
2750 <center><a name="getConstIndexes"></a> <font size="-1">getConstIndexes</font></center>
2751 </td>
2752 <td><font size="-1">const IndexPacket*</font></td>
2753 <td><font size="-1">void</font></td>
2754 <td><font size="-1">Returns a pointer to the Image pixel indexes
2755corresponding to a previous </font><font size="-1">getPixel,
2756getConstPixels, or setPixels call. &nbsp;</font><font size="-1">The
2757returned pointer remains valid until the next getPixel, getConstPixels,
2758or setPixels call and should never be deallocated by the user.</font><font
2759 size="-1"> Only valid for PseudoClass images or CMYKA images. The
2760pixel indexes represent an array of type IndexPacket, with each entry
2761corresponding to an x,y pixel position. For PseudoClass images, the
2762entry's value is the offset into the colormap (see <a href="#colorMap">colorMap</a>
2763) for that pixel. For CMYKA images, the indexes are used to contain the
2764alpha channel.</font></td>
2765 </tr>
2766 <tr>
2767 <td>
2768 <center><a name="getIndexes"></a> <font size="-1">getIndexes</font></center>
2769 </td>
2770 <td><font size="-1">IndexPacket*</font></td>
2771 <td><font size="-1">void</font></td>
2772 <td><font size="-1">Returns a pointer to the Image pixel indexes
2773corresponding to the pixel region requested by the last <a
2774 href="#getConstPixels">getConstPixels</a> , <a href="#getPixels">getPixels</a>
2775, or <a href="#setPixels">setPixels</a> call.&nbsp;</font><font size="-1">The
2776returned pointer remains valid until the next getPixel, getConstPixels,
2777or setPixels call and should never be deallocated by the user.</font><font
2778 size="-1"> </font><font size="-1">Only valid for PseudoClass images or
2779CMYKA images. The pixel indexes represent an array of type
2780IndexPacket, with each entry corresponding to a pixel x,y position. For
2781PseudoClass images, the entry's value is the offset into the colormap
2782(see <a href="#colorMap">colorMap</a> )&nbsp; for that pixel. For CMYKA
2783images, the indexes are used to contain the alpha channel.</font></td>
2784 </tr>
2785 <tr>
2786 <td>
2787 <center><a name="getPixels"></a> <font size="-1">getPixels</font></center>
2788 </td>
2789 <td><font size="-1"><a href="PixelPacket.html">PixelPacket</a> *</font></td>
2790 <td><font size="-1">const int x_, const int y_, const unsigned
2791int columns_, const unsigned int rows_</font></td>
2792 <td><font size="-1">Transfers pixels from the image to the pixel
2793cache as defined by the specified rectangular region. Modified pixels
2794may be subsequently transferred back to the image via syncPixels. </font><font
2795 size="-1">The returned pointer remains valid until the next getPixel,
2796getConstPixels, or setPixels call and should never be deallocated by the
2797user.</font><font size="-1"></font></td>
2798 </tr>
2799 <tr>
2800 <td>
2801 <center><a name="setPixels"></a> <font size="-1">setPixels</font></center>
2802 </td>
2803 <td><font size="-1"><a href="PixelPacket.html">PixelPacket</a> *</font></td>
2804 <td><font size="-1">const int x_, const int y_, const unsigned
2805int columns_, const unsigned int rows_</font></td>
2806 <td><font size="-1">Allocates a pixel cache region to store image
2807pixels as defined by the region rectangle.&nbsp; This area is
2808subsequently transferred from the pixel cache to the image via
2809syncPixels.&nbsp;</font><font size="-1">The returned pointer remains
2810valid until the next getPixel, getConstPixels, or setPixels call and
2811should never be deallocated by the user.</font></td>
2812 </tr>
2813 <tr>
2814 <td>
2815 <center><a name="syncPixels"></a> <font size="-1">syncPixels</font></center>
2816 </td>
2817 <td><font size="-1">void</font></td>
2818 <td><font size="-1">void</font></td>
2819 <td><font size="-1">Transfers the image cache pixels to the image.</font></td>
2820 </tr>
2821 <tr>
2822 <td>
2823 <center><a name="readPixels"></a> <font size="-1">readPixels</font></center>
2824 </td>
2825 <td><font size="-1">void</font></td>
2826 <td><font size="-1"><a href="Enumerations.html#QuantumTypes">QuantumTypes</a>
2827quantum_, unsigned char *source_,</font></td>
2828 <td><font size="-1">Transfers one or more pixel components from a
2829buffer or file into the image pixel cache of an image. ReadPixels is
2830typically used to support image decoders. The region transferred
2831corresponds to the region set by a preceding setPixels call.</font></td>
2832 </tr>
2833 <tr>
2834 <td>
2835 <center><a name="writePixels"></a> <font size="-1">writePixels</font></center>
2836 </td>
2837 <td><font size="-1">void</font></td>
2838 <td><font size="-1"><a href="Enumerations.html#QuantumTypes">QuantumTypes</a>
2839quantum_, unsigned char *destination_</font></td>
2840 <td><font size="-1">Transfers one or more pixel components from
2841the image pixel cache to a buffer or file. WritePixels is typically
2842used to support image encoders. The region transferred corresponds to
2843the region set by a preceding getPixels or getConstPixels call.</font></td>
2844 </tr>
2845 </tbody>
2846</table>
2847<br>
2848&nbsp; </p>
2849</body>
2850</html>