blob: de0aab87fc9c323ab1078f2a99d6a1956a587b0e [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"
10 content="Documentation on Magick++'s STL support templates.">
11 <meta name="Keywords" content="STL,Magick++,ImageMagick">
12 <title>Magick++ STL Support</title>
13</head>
14<body text="#000000" bgcolor="#ffffff" link="#0000ff" vlink="#ff0000"
15 alink="#000088">
16<center>
17<h1> Magick++ STL Support</h1>
18</center>
19Magick++ provides a set of <a href="http://www.sgi.com/tech/stl/">Standard
20Template Libary</a> (<a href="http://www.sgi.com/tech/stl/">STL</a> )
21algorithms for operating across ranges of image frames in a container.
22It also provides a set of STL unary function objects to apply an
23operation on image frames in a container via an algorithm which uses
24unary function objects. A good example of a standard algorithm which is
25useful for processing containers of image frames is the STL <i><a
26 href="http://www.sgi.com/tech/stl/for_each.html"> for_each</a> </i>
27algorithm which invokes a unary function object on a range of container
28elements.
29<p>Magick++ uses a limited set of template argument types. The current
30template argument types are: </p>
31<blockquote><a href="http://www.sgi.com/tech/stl/Container.html">Container</a>
32 <blockquote>A container having the properties of a <a
33 href="http://www.sgi.com/tech/stl/BackInsertionSequence.html"> Back
34Insertion Sequence</a> . Sequences support forward iterators and Back
35Insertion Sequences support the additional abilty to append an element
36via push_back(). Common compatable container types are the STL &lt;<a
37 href="http://www.sgi.com/tech/stl/Vector.html"> vector</a> &gt; and &lt;<a
38 href="http://www.sgi.com/tech/stl/List.html">list</a> &gt; template
39containers. This template argument is usually used to represent an
40output container in which one or more image frames may be appended.
41Containers like STL &lt;<a href="http://www.sgi.com/tech/stl/Vector.html">vector</a>
42&gt; which have a given default <i>capacity</i> may need to have their <i>
43capacity</i> adjusted via r<i>eserve() </i>to a larger <i>capacity</i>
44in order to support the expected final <i>size</i> . Since Magick++
45images are very small, it is likely that the default capacity of STL &lt;<a
46 href="http://www.sgi.com/tech/stl/Vector.html"> vector</a> &gt; is
47sufficient for most situations.</blockquote>
48 <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
49 <blockquote>An input iterator used to express a position in a
50container. These template arguments are typically used to represent a
51range of elements with f<i>irst_</i> representing the first element to
52be processed and <i> last_</i> representing the element to stop at. When
53processing the entire contents of a container, it is handy to know that
54STL containers usually provide the begin() and end() methods to return
55input interators which correspond with the first and last elements,
56respectively.</blockquote>
57</blockquote>
58The following is an example of how frames from a GIF animation <font
59 color="#000000"> "test_image_anim.gif" may be appended horizontally
60with the resulting image written to the file "appended_image.miff":</font>
61<p><tt><font color="#000066">#include &lt;list&gt;</font></tt> <br>
62<tt><font color="#000066">#include &lt;Magick++.h&gt;</font></tt> <br>
63<tt><font color="#000066">using namespace std;</font></tt> <br>
64<tt><font color="#000066">using namespace Magick;</font></tt> </p>
65<p><tt><font color="#000066">int main(int /*argc*/,char **/*argv*/)</font></tt> <br>
66<tt><font color="#000066">{</font></tt> <br>
67<tt><font color="#000066">&nbsp;&nbsp; list&lt;Image&gt; imageList;</font></tt> <br>
68<tt><font color="#000066">&nbsp;&nbsp; readImages( &amp;imageList,
69"test_image_anim.gif" );</font></tt> </p>
70<p><tt><font color="#000066">&nbsp;&nbsp; Image appended;</font></tt> <br>
71<tt><font color="#000066">&nbsp;&nbsp; appendImages( &amp;appended,
72imageList.begin(), imageList.end() );</font></tt> <br>
73<tt><font color="#000066">&nbsp;&nbsp; appended.write(
74"appended_image.miff" );</font></tt> <br>
75<tt><font color="#000066">&nbsp;&nbsp; return 0;</font></tt> <br>
76<tt><font color="#000066">}</font></tt> </p>
77<p>The available Magick++ specific STL algorithms for operating on
78sequences of image frames are shown in the following table: <br>
79&nbsp;
80<table border="1" width="100%">
81 <caption><b>Magick++ STL Algorithms For Image Sequences</b></caption> <tbody>
82 <tr>
83 <td>
84 <center><b>Algorithm</b></center>
85 </td>
86 <td>
87 <center><b>Signature</b></center>
88 </td>
89 <td>
90 <center><b>Description</b></center>
91 </td>
92 </tr>
93 <tr>
94 <td>
95 <center><a name="animateImages"></a> <font size="-1">animateImages</font></center>
96 </td>
97 <td><font size="-1"><a
98 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
99first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
100last_</font></td>
101 <td><font size="-1">Animate a sequence of image frames. Image
102frames are displayed in succession, creating an animated effect. The
103animation options are taken from the first image frame. This feature is
104only supported under X11 at the moment.</font></td>
105 </tr>
106 <tr>
107 <td>
108 <center><a name="appendImages"></a> <font size="-1">appendImages</font></center>
109 </td>
110 <td><font size="-1"><a href="Image.html">Image</a>
111*appendedImage_, <a
112 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
113first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
114last_, bool stack_ = false</font></td>
115 <td><font size="-1">Append a sequence of image frames, writing
116the result to <i>appendedImage_.</i> All the input image frames must
117have the same width or height. Image frames of the same width are
118stacked top-to-bottom. Image frames of the same height are stacked
119left-to-right. If the <i>stack_</i> parameter is false, rectangular
120image frames are stacked left-to-right otherwise top-to-bottom.</font></td>
121 </tr>
122 <tr>
123 <td>
124 <center><a name="averageImages"></a> <font size="-1">averageImages</font></center>
125 </td>
126 <td><font size="-1"><a href="Image.html">Image</a>
127*averagedImage_, <a
128 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
129first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
130last_</font></td>
131 <td><font size="-1">Average a sequence of image frames, writing
132the result to <i>averagedImage_</i>. All the input image frames must
133be the same size in pixels.</font></td>
134 </tr>
135 <tr>
136 <td>
137 <center><a name="coalesceImages"></a> <font size="-1">coalesceImages</font></center>
138 </td>
139 <td><font size="-1"><a
140 href="http://www.sgi.com/tech/stl/Container.html"> Container</a>
141*coalescedImages_, <a
142 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
143first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
144last_</font><br>
145 </td>
146 <td><font size="-1">Create a coalesced image sequence obtained by
147"playing" the image sequence (observing page offsets and disposal
148methods) to create a new image sequence in which all frames are full
149size and completely rendered. Note that if the original image sequence
150relied on page offsets and disposal methods that the resulting sequence
151will be larger (perhaps much larger) then the original. This is useful
152for GIF animation sequences that have page offsets and disposal methods.
153The resuting image sequence is returned via <i>coalescedImages_.</i></font></td>
154 </tr>
155 <tr>
156 <td>
157 <center><a name="deconstructImages"></a> <font size="-1">deconstructImages</font></center>
158 </td>
159 <td><font size="-1"><a
160 href="http://www.sgi.com/tech/stl/Container.html"> Container</a>
161*deconstructedImages_, <a
162 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
163first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
164last_</font></td>
165 <td><font size="-1">Break down an image sequence into constituent
166parts.&nbsp; This is useful for creating GIF or MNG animation sequences.
167The input sequence is specified by <i>first_</i> and <i>last_</i>, and
168the deconstruted images are returned via <i>deconstructedImages_</i>.</font></td>
169 </tr>
170 <tr>
171 <td>
172 <center><a name="displayImages"></a> <font size="-1">displayImages</font></center>
173 </td>
174 <td><font size="-1"><a
175 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
176first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
177last_</font></td>
178 <td><font size="-1">Display a sequence of image frames. Through
179use of a pop-up menu, image frames may be selected in succession. This
180feature is fully supported under X11 but may have only limited support
181in other environments.</font> <br>
182 <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
183an image format is not compatable with the display visual (e.g. JPEG
184on a colormapped display) then the original image will be altered. Use a
185copy of the original if this is a problem.</font></td>
186 </tr>
187 <tr>
188 <td>
189 <center><a name="flattenImages"></a> <font size="-1">flattenImages</font></center>
190 </td>
191 <td><font size="-1"><a href="Image.html">Image</a>
192*flattendImage_, <a
193 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
194first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
195last_</font></td>
196 <td><font size="-1">Merge a sequence of image frames which
197represent image layers into a single composited representation. The <i>flattendImage_</i>
198parameter points to an existing Image to update with the flattened
199image. This function is useful for combining Photoshop layers into a
200single image.</font></td>
201 </tr>
202 <tr>
203 <td>
204 <center><a name="mapImages"></a> <font size="-1">mapImages</font></center>
205 </td>
206 <td><font size="-1"><a
207 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
208first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
209last_, const <a href="Image.html">Image</a> &amp; mapImage_, bool
210dither_,&nbsp; bool measureError_ = false</font></td>
211 <td><font size="-1">Replace the colors of a sequence of images
212with the closest color from a reference image. Set <i>dither_</i> to <i>true</i>
213to enable dithering.&nbsp; Set <i>measureError_</i> to <i>true</i> in
214order to evaluate quantization error.</font></td>
215 </tr>
216 <tr>
217 <td>
218 <center><a name="montageImages"></a> <font size="-1">montageImages</font></center>
219 </td>
220 <td><font size="-1"><a
221 href="http://www.sgi.com/tech/stl/Container.html"> Container</a>
222*montageImages_, <a
223 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
224first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
225last_, const <a href="Montage.html">Montage</a> &amp;montageOpts_</font></td>
226 <td><font size="-1">Create a composite image by combining several
227separate image frames. Multiple frames may be generated in the output
228container <i> montageImages_ </i>depending on the tile setting and the
229number of image frames montaged. Montage options are provided via the
230parameter <i>montageOpts_</i> . Options set in the first image frame (<a
231 href="Image.html#backgroundColor"> backgroundColor,</a> <a
232 href="Image.html#borderColor">borderColor</a> , <a
233 href="Image.html#matteColor">matteColor</a> , <a
234 href="Image.html#penColor">penColor,</a> <a href="Image.html#font">font,</a>
235and <a href="Image.html#fontPointsize">fontPointsize</a> ) are also used
236as options by <i>montageImages().</i></font></td>
237 </tr>
238 <tr>
239 <td>
240 <center><a name="morphImages"></a> <font size="-1">morphImages</font></center>
241 </td>
242 <td><font size="-1"><a
243 href="http://www.sgi.com/tech/stl/Container.html"> Container</a>
244*morphedImages_, <a
245 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
246first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
247last_, unsigned int frames_</font></td>
248 <td><font size="-1">Morph a seqence of image frames. This
249algorithm&nbsp; expands the number of image frames (output to the
250container <i>morphedImages_)</i> by adding the number of intervening
251frames specified by <i>frames_</i> such that the original frames morph
252(blend) into each other when played as an animation.</font></td>
253 </tr>
254 <tr>
255 <td>
256 <center><a name="mosaicImages"></a> <font size="-1">mosaicImages</font></center>
257 </td>
258 <td><font size="-1"><a href="Image.html">Image</a> *mosaicImage_, <a
259 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
260first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
261last_</font></td>
262 <td><font size="-1">Inlay a number of images to form a single
263coherent picture. The <i>mosicImage_</i> argument is updated with a
264mosaic constructed from the image sequence represented by <i>first_</i>
265through <i>last_</i> .</font></td>
266 </tr>
267 <tr>
268 <td rowspan="2">
269 <center><a name="readImages"></a> <font size="-1">readImages</font></center>
270 </td>
271 <td><font size="-1"><a
272 href="http://www.sgi.com/tech/stl/Container.html"> Container</a>
273*sequence_, const std::string &amp;imageSpec_</font></td>
274 <td><font size="-1">Read a sequence of image frames into existing
275container (appending to container <i>sequence_</i>) with image names
276specified in the string <i>imageSpec_</i>.</font></td>
277 </tr>
278 <tr>
279 <td><font size="-1"><a
280 href="http://www.sgi.com/tech/stl/Container.html"> Container</a>
281*sequence_, const <a href="Blob.html">Blob</a> &amp;blob_</font></td>
282 <td><font size="-1">Read a sequence of image frames into existing
283container (appending to container sequence_) from <a href="Blob.html">Blob</a>
284blob_.</font></td>
285 </tr>
286 <tr>
287 <td rowspan="2">
288 <center><a name="writeImages"></a> <font size="-1">writeImages</font></center>
289 </td>
290 <td><font size="-1"><a
291 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
292first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
293last_, const std::string &amp;imageSpec_, bool adjoin_ = true</font></td>
294 <td><font size="-1">Write images in container to file specified
295by string <i>imageSpec_</i>. Set <i>adjoin_ </i>to false to write a
296set of image frames via a wildcard <i>imageSpec_ </i>(e.g.
297image%02d.miff).</font> <br>
298The wildcard must be one of <tt>%0Nd, %0No, or %0Nx</tt>. <br>
299 <font size="-1"><b><font color="#ff0000">Caution: </font></b> if
300an image format is selected which is capable of supporting fewer colors
301than the original image or quantization has been requested, the original
302image will be quantized to fewer colors. Use a copy of the original if
303this is a problem.</font></td>
304 </tr>
305 <tr>
306 <td><font size="-1"><a
307 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
308first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
309last_, <a href="Blob.html">Blob</a> *blob_, bool adjoin_ = true</font></td>
310 <td><font size="-1">Write images in container to in-memory BLOB
311specified by <a href="Blob.html">Blob</a> blob_. Set adjoin_ to false to
312write a set of image frames via a wildcard imageSpec_ (e.g.
313image%02d.miff).</font> <br>
314 <font size="-1"><b><font color="#ff0000">Caution:</font></b> if an
315image format is selected which is capable of supporting fewer colors
316than the original image or quantization has been requested, the original
317image will be quantized to fewer colors. Use a copy of the original if
318this is a problem.</font></td>
319 </tr>
320 <tr>
321 <td><a name="quantizeImages"></a> <font size="-1">quantizeImages</font></td>
322 <td><font size="-1"><a
323 href="http://www.sgi.com/tech/stl/InputIterator.html"> InputIterator</a>
324first_, <a href="http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>
325last_, bool measureError_ = false</font></td>
326 <td><font size="-1">Quantize colors in images using current
327quantization settings. Set <i>measureError_</i> to <i>true</i> in order
328to measure quantization error.</font></td>
329 </tr>
330 </tbody>
331</table>
332<br>
333&nbsp; </p>
334<center>
335<h3> Magick++ Unary Function Objects</h3>
336</center>
337Magick++ unary function objects inherit from the STL unary_function
338template class . The STL unary_function template class is of the form
339<blockquote><tt><font color="#000099">unary_function&lt;Arg, Result&gt;</font></tt></blockquote>
340and expects that derived classes implement a method of the form:
341<blockquote><tt><font color="#000099">Result operator()( Arg argument_
342);</font></tt></blockquote>
343which is invoked by algorithms using the function object. In the case
344of unary function objects defined by Magick++, the invoked function
345looks like:
346<blockquote><tt><font color="#000099">void operator()( Image
347&amp;image_);</font></tt></blockquote>
348with a typical implementation looking similar to:
349<blockquote><tt><font color="#000099">void operator()( Image
350&amp;image_ )</font></tt> <br>
351 <tt><font color="#000099">&nbsp; {</font></tt> <br>
352 <tt><font color="#000099">&nbsp;&nbsp;&nbsp; image_.contrast(
353_sharpen );</font></tt> <br>
354 <tt><font color="#000099">&nbsp; }</font></tt></blockquote>
355where <i>contrast</i> is an Image method and <i>_sharpen </i>is an
356argument stored within the function object by its contructor. Since
357constructors may be polymorphic, a given function object may have
358several constructors and selects the appropriate Image method based on
359the arguments supplied.
360<p>In essence, unary function objects (as provided by Magick++) simply
361provide the means to construct an object which caches arguments for
362later use by an algorithm designed for use with unary function objects.
363There is a unary function object corresponding each algorithm provided
364by the <a href="Image.html"> Image</a> class and there is a contructor
365available compatable with each synonymous method in the Image class. </p>
366<p>The unary function objects that Magick++ provides to support
367manipulating images are shown in the following table: <br>
368&nbsp;
369<table border="1">
370 <caption><b>Magick++ Unary Function Objects For Image Manipulation</b></caption> <tbody>
371 <tr align="center">
372 <td><b>Function Object</b></td>
373 <td><b>Constructor Signatures(s)</b></td>
374 <td><b>Description</b></td>
375 </tr>
376 <tr>
377 <td valign="middle">
378 <div align="center"><a name="adaptiveThresholdImage"></a> <font
379 size="-1">adaptiveThresholdImage</font><br>
380 </div>
381 </td>
382 <td valign="middle"><font size="-1">unsigned int width, unsigned
383int height, unsigned offset = 0</font><br>
384 </td>
385 <td valign="top"><font size="-1">Apply adaptive thresholding to
386the image. Adaptive thresholding is useful if the ideal threshold level
387is not known in advance, or if the illumination gradient is not constant
388across the image. Adaptive thresholding works by evaulating the mean
389(average) of a pixel region (size specified by <i>width</i> and <i>height</i>)
390and using the mean as the thresholding value. In order to remove
391residual noise from the background, the threshold may be adjusted by
392subtracting a constant <i>offset</i> (default zero) from the mean to
393compute the threshold.</font><br>
394 </td>
395 </tr>
396 <tr>
397 <td>
398 <center><a name="addNoiseImage"></a> <font size="-1">addNoiseImage</font></center>
399 </td>
400 <td><font size="-1"><a href="Enumerations.html#NoiseType">NoiseType</a>
401noiseType_</font></td>
402 <td><font size="-1">Add noise to image with specified noise type.</font></td>
403 </tr>
404 <tr>
405 <td style="vertical-align: middle;"><small><a
406 name="affineTransformImage"></a>affineTransformImage<br>
407 </small></td>
408 <td style="vertical-align: middle;"><small>const DrawableAffine
409&amp;affine_<br>
410 </small></td>
411 <td style="vertical-align: middle;"><small>Transform image by
412specified affine (or free transform) matrix.<br>
413 </small></td>
414 </tr>
415 <tr>
416 <td rowspan="4">
417 <center><a name="annotateImage"></a> <font size="-1">annotateImage</font></center>
418 </td>
419 <td><font size="-1">const std::string &amp;text_, const <a
420 href="Geometry.html"> Geometry</a> &amp;location_</font></td>
421 <td><font size="-1">Annotate with text using specified text,
422bounding area, placement gravity, and rotation. If <i>boundingArea_</i>
423is invalid, then bounding area is entire image.</font></td>
424 </tr>
425 <tr>
426 <td><font size="-1">std::string text_, const <a
427 href="Geometry.html">Geometry</a> &amp;boundingArea_, <a
428 href="Enumerations.html#GravityType">GravityType</a> gravity_</font></td>
429 <td><font size="-1">Annotate using specified text, bounding area,
430and placement gravity. If <i>boundingArea_</i> is invalid, then
431bounding area is entire image.</font></td>
432 </tr>
433 <tr>
434 <td><font size="-1">const std::string &amp;text_, const <a
435 href="Geometry.html"> Geometry</a> &amp;boundingArea_, <a
436 href="Enumerations.html#GravityType">GravityType</a> gravity_, double
437degrees_,&nbsp;</font></td>
438 <td><font size="-1">Annotate with text using specified text,
439bounding area, placement gravity, and rotation. If <i>boundingArea_</i>
440is invalid, then bounding area is entire image.</font></td>
441 </tr>
442 <tr>
443 <td><font size="-1">const std::string &amp;text_, <a
444 href="Enumerations.html#GravityType"> GravityType</a> gravity_</font></td>
445 <td><font size="-1">Annotate with text (bounding area is entire
446image) and placement gravity.</font></td>
447 </tr>
448 <tr>
449 <td>
450 <center><a name="blurImage"></a> <font size="-1">blurImage</font></center>
451 </td>
452 <td><font size="-1">const double radius_ = 1, const double sigma_
453= 0.5</font></td>
454 <td><font size="-1">Blur image. The radius_ parameter specifies
455the radius of the Gaussian, in pixels, not counting the center
456pixel.&nbsp; The sigma_ parameter specifies the standard deviation of
457the Laplacian, in pixels.</font></td>
458 </tr>
459 <tr>
460 <td>
461 <center><a name="borderImage"></a> <font size="-1">borderImage</font></center>
462 </td>
463 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
464&amp;geometry_ = "6x6+0+0"</font></td>
465 <td><font size="-1">Border image (add border to image).&nbsp; The
466color of the border is specified by the <i>borderColor</i> attribute.</font></td>
467 </tr>
468 <tr>
469 <td>
470 <center><a name="charcoalImage"></a> <font size="-1">charcoalImage</font></center>
471 </td>
472 <td><font size="-1">const double radius_ = 1, const double sigma_
473= 0.5</font></td>
474 <td><font size="-1">Charcoal effect image (looks like charcoal
475sketch). The radius_ parameter specifies the radius of the Gaussian, in
476pixels, not counting the center pixel.&nbsp; The sigma_ parameter
477specifies the standard deviation of the Laplacian, in pixels.</font></td>
478 </tr>
479 <tr>
480 <td>
481 <center><a name="chopImage"></a> <font size="-1">chopImage</font></center>
482 </td>
483 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
484&amp;geometry_</font></td>
485 <td><font size="-1">Chop image (remove vertical or horizontal
486subregion of image)</font></td>
487 </tr>
488 <tr>
489 <td rowspan="2">
490 <center><a name="colorizeImage"></a> <font size="-1">colorizeImage</font></center>
491 </td>
492 <td><font size="-1">const unsigned int opacityRed_, const
493unsigned int opacityGreen_, const unsigned int opacityBlue_, const Color
494&amp;penColor_</font></td>
495 <td><font size="-1">Colorize image with pen color, using
496specified percent opacity for red, green, and blue quantums.</font></td>
497 </tr>
498 <tr>
499 <td><font size="-1">const unsigned int opacity_, const <a
500 href="Color.html"> Color</a> &amp;penColor_</font></td>
501 <td><font size="-1">Colorize image with pen color, using
502specified percent opacity.</font></td>
503 </tr>
504 <tr>
505 <td>
506 <center><a name="commentImage"></a> <font size="-1">commentImage</font></center>
507 </td>
508 <td><font size="-1">const std::string &amp;comment_</font></td>
509 <td><font size="-1">Comment image (add comment string to
510image).&nbsp; By default, each image is commented with its file name.
511Use&nbsp; this&nbsp; method to&nbsp; assign a specific comment to the
512image.&nbsp; Optionally you can include the image filename, type, width,
513height, or other&nbsp; image&nbsp; attributes by embedding <a
514 href="FormatCharacters.html">special format characters.</a> </font></td>
515 </tr>
516 <tr>
517 <td rowspan="2">
518 <center><a name="compositeImage"></a> <font size="-1">compositeImage</font></center>
519 </td>
520 <td><font size="-1">const <a href="Image.html">Image</a>
521&amp;compositeImage_, int xOffset_, int yOffset_, <a
522 href="Enumerations.html#CompositeOperator"> CompositeOperator</a>
523compose_ = <i>InCompositeOp</i></font></td>
524 <td rowspan="2"><font size="-1">Compose an image onto another at
525specified offset and using specified algorithm</font></td>
526 </tr>
527 <tr>
528 <td><font size="-1">const <a href="Image.html">Image</a>
529&amp;compositeImage_, const Geometry &amp;offset_, <a
530 href="Enumerations.html#CompositeOperator"> CompositeOperator</a>
531compose_ = <i>InCompositeOp</i></font></td>
532 </tr>
533 <tr>
534 <td>
535 <center><a name="condenseImage"></a> <font size="-1">condenseImage</font></center>
536 </td>
537 <td><font size="-1">void</font></td>
538 <td><font size="-1">Condense image (Re-run-length encode image in
539memory).</font></td>
540 </tr>
541 <tr>
542 <td>
543 <center><a name="contrastImage"></a> <font size="-1">contrastImage</font></center>
544 </td>
545 <td><font size="-1">unsigned int sharpen_</font></td>
546 <td><font size="-1">Contrast image (enhance intensity differences
547in image)</font></td>
548 </tr>
549 <tr>
550 <td>
551 <center><a name="cropImage"></a> <font size="-1">cropImage</font></center>
552 </td>
553 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
554&amp;geometry_</font></td>
555 <td><font size="-1">Crop image (subregion of original image)</font></td>
556 </tr>
557 <tr>
558 <td>
559 <center><a name="cycleColormapImage"></a> <font size="-1">cycleColormap-</font> <br>
560 <font size="-1">Image</font></center>
561 </td>
562 <td><font size="-1">int amount_</font></td>
563 <td><font size="-1">Cycle image colormap</font></td>
564 </tr>
565 <tr>
566 <td>
567 <center><a name="despeckleImage"></a> <font size="-1">despeckleImage</font></center>
568 </td>
569 <td><font size="-1">void</font></td>
570 <td><font size="-1">Despeckle image (reduce speckle noise)</font></td>
571 </tr>
572 <tr>
573 <td rowspan="2">
574 <center><a name="drawImage"></a> <font size="-1">drawImage</font></center>
575 </td>
576 <td><font size="-1">const <a href="Drawable.html">Drawable</a>
577&amp;drawable_</font></td>
578 <td><font size="-1">Draw shape or text on image.</font></td>
579 </tr>
580 <tr>
581 <td><font size="-1">const std::list&lt;<a href="Drawable.html">Drawable</a>
582&gt; &amp;drawable_</font></td>
583 <td><font size="-1">Draw shapes or text on image using a set of
584Drawable objects contained in an STL list. Use of this method improves
585drawing performance and allows batching draw objects together in a list
586for repeated use.</font></td>
587 </tr>
588 <tr>
589 <td>
590 <center><a name="edgeImage"></a> <font size="-1">edgeImage</font></center>
591 </td>
592 <td><font size="-1">unsigned int radius_ = 0.0</font></td>
593 <td><font size="-1">Edge image (hilight edges in image).&nbsp;
594The radius is the radius of the pixel neighborhood.. Specify a radius
595of zero for automatic radius selection.</font></td>
596 </tr>
597 <tr>
598 <td>
599 <center><a name="embossImage"></a> <font size="-1">embossImage</font></center>
600 </td>
601 <td><font size="-1">const double radius_ = 1, const double sigma_
602= 0.5</font></td>
603 <td><font size="-1">Emboss image (hilight edges with 3D effect).
604The radius_ parameter specifies the radius of the Gaussian, in pixels,
605not counting the center pixel.&nbsp; The sigma_ parameter specifies the
606standard deviation of the Laplacian, in pixels.</font></td>
607 </tr>
608 <tr>
609 <td>
610 <center><a name="enhanceImage"></a> <font size="-1">enhanceImage</font></center>
611 </td>
612 <td><font size="-1">void</font></td>
613 <td><font size="-1">Enhance image (minimize noise)</font></td>
614 </tr>
615 <tr>
616 <td>
617 <center><a name="equalizeImage"></a> <font size="-1">equalizeImage</font></center>
618 </td>
619 <td><font size="-1">void</font></td>
620 <td><font size="-1">Equalize image (histogram equalization)</font></td>
621 </tr>
622 <tr>
623 <td>
624 <center><a name="flipImage"></a> <font size="-1">flipImage</font></center>
625 </td>
626 <td><font size="-1">void</font></td>
627 <td><font size="-1">Flip image (reflect each scanline in the
628vertical direction)</font></td>
629 </tr>
630 <tr>
631 <td rowspan="4">
632 <center><a name="floodFillColorImage"></a> <font size="-1">floodFill-</font> <br>
633 <font size="-1">ColorImage</font></center>
634 </td>
635 <td><font size="-1">unsigned int x_, unsigned int y_, const <a
636 href="Color.html"> Color</a> &amp;fillColor_</font></td>
637 <td rowspan="2"><font size="-1">Flood-fill color across pixels
638that match the color of the target pixel and are neighbors of the
639target pixel. Uses current fuzz setting when determining color match.</font></td>
640 </tr>
641 <tr>
642 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
643&amp;point_, const <a href="Color.html">Color</a> &amp;fillColor_</font></td>
644 </tr>
645 <tr>
646 <td><font size="-1">unsigned int x_, unsigned int y_, const <a
647 href="Color.html"> Color</a> &amp;fillColor_, const <a href="Color.html">Color</a>
648&amp;borderColor_</font></td>
649 <td rowspan="2"><font size="-1">Flood-fill color across pixels
650starting at target-pixel and stopping at pixels matching specified
651border color. Uses current fuzz setting when determining color match.</font></td>
652 </tr>
653 <tr>
654 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
655&amp;point_, const <a href="Color.html">Color</a> &amp;fillColor_, const <a
656 href="Color.html">Color</a> &amp;borderColor_</font></td>
657 </tr>
658 <tr>
659 <td rowspan="4">
660 <center><a name="floodFillTextureImage"></a> <font size="-1">floodFill-</font> <br>
661 <font size="-1">TextureImage</font></center>
662 </td>
663 <td><font size="-1">unsigned int x_, unsigned int y_,&nbsp; const <a
664 href="Image.html"> Image</a> &amp;texture_</font></td>
665 <td rowspan="2"><font size="-1">Flood-fill texture across pixels
666that match the color of the target pixel and are neighbors of the
667target pixel. Uses current fuzz setting when determining color match.</font></td>
668 </tr>
669 <tr>
670 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
671&amp;point_, const Image &amp;texture_</font></td>
672 </tr>
673 <tr>
674 <td><font size="-1">unsigned int x_, unsigned int y_, const Image
675&amp;texture_, const <a href="Color.html">Color</a> &amp;borderColor_</font></td>
676 <td rowspan="2"><font size="-1">Flood-fill texture across pixels
677starting at target-pixel and stopping at pixels matching specified
678border color. Uses current fuzz setting when determining color match.</font></td>
679 </tr>
680 <tr>
681 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
682&amp;point_, const Image &amp;texture_, const <a href="Color.html">Color</a>
683&amp;borderColor_</font></td>
684 </tr>
685 <tr>
686 <td>
687 <center><a name="flopImage"></a> <font size="-1">flopImage</font></center>
688 </td>
689 <td><font size="-1">void&nbsp;</font></td>
690 <td><font size="-1">Flop image (reflect each scanline in the
691horizontal direction)</font></td>
692 </tr>
693 <tr>
694 <td rowspan="2">
695 <center><a name="frameImage"></a> <font size="-1">frameImage</font></center>
696 </td>
697 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
698&amp;geometry_ = "25x25+6+6"</font></td>
699 <td rowspan="2"><font size="-1">Add decorative frame around image</font></td>
700 </tr>
701 <tr>
702 <td><font size="-1">unsigned int width_, unsigned int height_,
703int x_, int y_, int innerBevel_ = 0, int outerBevel_ = 0</font></td>
704 </tr>
705 <tr>
706 <td rowspan="2">
707 <center><a name="gammaImage"></a> <font size="-1">gammaImage</font></center>
708 </td>
709 <td><font size="-1">double gamma_</font></td>
710 <td><font size="-1">Gamma correct image (uniform red, green, and
711blue correction).</font></td>
712 </tr>
713 <tr>
714 <td><font size="-1">double gammaRed_, double gammaGreen_, double
715gammaBlue_</font></td>
716 <td><font size="-1">Gamma correct red, green, and blue channels
717of image.</font></td>
718 </tr>
719 <tr>
720 <td>
721 <center><a name="gaussianBlur"></a> <font size="-1">gaussianBlurImage</font></center>
722 </td>
723 <td><font size="-1">double width_, double sigma_</font></td>
724 <td><font size="-1">Gaussian blur image. The number of neighbor
725pixels to be included in the convolution mask is specified by
726'width_'.&nbsp; For example, a width of one gives a (standard) 3x3
727convolution mask. The standard deviation of the gaussian bell curve is
728specified by 'sigma_'.</font></td>
729 </tr>
730 <tr>
731 <td>
732 <center><a name="implodeImage"></a> <font size="-1">implodeImage</font></center>
733 </td>
734 <td><font size="-1">double factor_</font></td>
735 <td><font size="-1">Implode image (special effect)</font></td>
736 </tr>
737 <tr>
738 <td>
739 <center><a name="labelImage"></a> <font size="-1">labelImage</font></center>
740 </td>
741 <td><font size="-1">const string &amp;label_</font></td>
742 <td><font size="-1">Assign a label to an image. Use this option
743to&nbsp; assign&nbsp; a&nbsp; specific label to the image. Optionally
744you can include the image filename, type, width, height, or scene
745number in the label by embedding&nbsp; <a href="FormatCharacters.html">special
746format characters.</a> If the first character of string is @, the image
747label is read from a file titled by the remaining characters in the
748string. When converting to Postscript, use this&nbsp; option to specify
749a header string to print above the image.</font></td>
750 </tr>
751 <tr>
752 <td style="text-align: center; vertical-align: middle;"><small><a
753 name="levelImage"></a>levelImage<br>
754 </small></td>
755 <td style="vertical-align: top;"><small>const double black_point,
756const double white_point, const double mid_point=1.0<br>
757 </small></td>
758 <td style="vertical-align: top;"><small>Level image. Adjust the
759levels of the image by scaling the colors falling between specified
760white and black points to the full available quantum range. The
761parameters provided represent the black, mid (gamma), and white
762points.&nbsp; The black point specifies the darkest color in the image.
763Colors darker than the black point are set to zero. Mid point (gamma)
764specifies a gamma correction to apply to the image. White point
765specifies the lightest color in the image.&nbsp; Colors brighter than
766the white point are set to the maximum quantum value. The black and
767white point have the valid range 0 to QuantumRange while mid (gamma) has a
768useful range of 0 to ten.</small></td>
769 </tr>
770 <tr>
771 <td style="text-align: center; vertical-align: middle;"><small><a
772 name="levelChannelImage"></a>levelChannelImage<br>
773 </small></td>
774 <td style="vertical-align: top;"><small>const Magick::ChannelType
775channel, const double black_point, const double white_point, const
776double mid_point=1.0<br>
777 </small></td>
778 <td style="vertical-align: top;"><small>Level image channel.
779Adjust the levels of the image channel by scaling the values falling
780between specified white and black points to the full available quantum
781range. The parameters provided represent the black, mid (gamma), and
782white points. The black point specifies the darkest color in the image.
783Colors darker than the black point are set to zero. Mid point (gamma)
784specifies a gamma correction to apply to the image. White point
785specifies the lightest color in the image. Colors brighter than the
786white point are set to the maximum quantum value. The black and white
787point have the valid range 0 to QuantumRange while mid (gamma) has a useful
788range of 0 to ten.</small></td>
789 </tr>
790 <tr>
791 <td>
792 <center><a name="layerImage"></a> <font size="-1">layerImage</font></center>
793 </td>
794 <td><font size="-1"><a href="Enumerations.html#ChannelType">ChannelType</a>
795layer_</font></td>
796 <td><font size="-1">Extract layer from image. Use this option to
797extract a particular layer from&nbsp; the image.&nbsp; <i>MatteLayer</i>,&nbsp;
798for&nbsp; example, is useful for extracting the opacity values from an
799image.</font></td>
800 </tr>
801 <tr>
802 <td>
803 <center><a name="magnifyImage"></a> <font size="-1">magnifyImage</font></center>
804 </td>
805 <td><font size="-1">void</font></td>
806 <td><font size="-1">Magnify image by integral size</font></td>
807 </tr>
808 <tr>
809 <td>
810 <center><a name="mapImage"></a> <font size="-1">mapImage</font></center>
811 </td>
812 <td><font size="-1">const <a href="Image.html">Image</a>
813&amp;mapImage_ , bool dither_ = false</font></td>
814 <td><font size="-1">Remap image colors with closest color from
815reference image. Set dither_ to <i>true</i> in to apply Floyd/Steinberg
816error diffusion to the image. By default, color reduction chooses an
817optimal&nbsp; set&nbsp; of colors that best represent the original
818image. Alternatively, you can&nbsp; choose&nbsp; a&nbsp;
819particular&nbsp; set&nbsp; of colors&nbsp; from&nbsp; an image file
820with this option.</font></td>
821 </tr>
822 <tr>
823 <td>
824 <center><a name="matteFloodfillImage"></a> <font size="-1">matteFloodfill-</font> <br>
825 <font size="-1">Image</font></center>
826 </td>
827 <td><font size="-1">const <a href="Color.html">Color</a>
828&amp;target_, unsigned int matte_, int x_, int y_, <a
829 href="Enumerations.html#PaintMethod"> PaintMethod</a> method_</font></td>
830 <td><font size="-1">Floodfill designated area with a matte value</font></td>
831 </tr>
832 <tr>
833 <td><a name="medianFilterImage"></a> <font size="-1">medianFilterImage</font></td>
834 <td><font size="-1">const double radius_ = 0.0</font></td>
835 <td><font size="-1">Filter image by replacing each pixel
836component with the median color in a circular neighborhood</font></td>
837 </tr>
838 <tr>
839 <td>
840 <center><a name="minifyImage"></a> <font size="-1">minifyImage</font></center>
841 </td>
842 <td><font size="-1">void</font></td>
843 <td><font size="-1">Reduce image by integral size</font></td>
844 </tr>
845 <tr>
846 <td>
847 <center><a name="modulateImage"></a> <font size="-1">modulateImage</font></center>
848 </td>
849 <td><font size="-1">double brightness_, double saturation_,
850double hue_</font></td>
851 <td><font size="-1">Modulate percent hue, saturation, and
852brightness of an image.&nbsp;</font><font size="-1">Modulation of
853saturation and brightness is as a ratio of the current value (1.0 for no
854change). Modulation of hue is an absolute rotation of -180 degrees to
855+180 degrees from the current position corresponding to an argument
856range of 0 to 2.0 (1.0 for no change).</font></td>
857 </tr>
858 <tr>
859 <td>
860 <center><a name="negateImage"></a> <font size="-1">negateImage</font></center>
861 </td>
862 <td><font size="-1">bool grayscale_ = false</font></td>
863 <td><font size="-1">Negate colors in image.&nbsp; Replace every
864pixel with its complementary color (white becomes black, yellow becomes
865blue, etc.).&nbsp; Set grayscale to only negate grayscale values in
866image.</font></td>
867 </tr>
868 <tr>
869 <td>
870 <center><a name="normalizeImage"></a> <font size="-1">normalizeImage</font></center>
871 </td>
872 <td><font size="-1">void</font></td>
873 <td><font size="-1">Normalize image (increase contrast by
874normalizing the pixel values to span the full range of color values).</font></td>
875 </tr>
876 <tr>
877 <td>
878 <center><a name="oilPaintImage"></a> <font size="-1">oilPaintImage</font></center>
879 </td>
880 <td><font size="-1">unsigned int radius_ = 3</font></td>
881 <td><font size="-1">Oilpaint image (image looks like oil painting)</font></td>
882 </tr>
883 <tr>
884 <td>
885 <center><a name="opacityImage"></a> <font size="-1">opacityImage</font></center>
886 </td>
887 <td><font size="-1">unsigned int opacity_</font></td>
888 <td><font size="-1">Set or attenuate the opacity channel in the
889image. If the image pixels are opaque then they are set to the specified
890opacity value, otherwise they are blended with the supplied opacity
891value.&nbsp; The value of opacity_ ranges from 0 (completely opaque) to <i>QuantumRange</i>.
892The defines <i>OpaqueOpacity</i> and <i>TransparentOpacity</i> are
893available to specify completely opaque or completely transparent,
894respectively.</font></td>
895 </tr>
896 <tr>
897 <td>
898 <center><a name="opaqueImage"></a> <font size="-1">opaqueImage</font></center>
899 </td>
900 <td><font size="-1">const <a href="Color.html">Color</a>
901&amp;opaqueColor_, const <a href="Color.html">Color</a> &amp;penColor_</font></td>
902 <td><font size="-1">Change color of pixels matching opaqueColor_
903to specified penColor_.</font></td>
904 </tr>
905 <tr>
906 <td>
907 <center><a name="quantizeImage"></a> <font size="-1">quantizeImage</font></center>
908 </td>
909 <td><font size="-1">bool measureError_ = false</font></td>
910 <td><font size="-1">Quantize image (reduce number of colors). Set
911measureError_ to true in order to calculate error attributes.</font></td>
912 </tr>
913 <tr>
914 <td>
915 <center><a name="raiseImage"></a> <font size="-1">raiseImage</font></center>
916 </td>
917 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
918&amp;geometry_ = "6x6+0+0",&nbsp; bool raisedFlag_ =&nbsp; false</font></td>
919 <td><font size="-1">Raise image (lighten or darken the edges of
920an image to give a 3-D raised or lowered effect)</font></td>
921 </tr>
922 <tr>
923 <td rowspan="2">
924 <center><a name="reduceNoiseImage"></a> <font size="-1">reduceNoise-</font> <br>
925 <font size="-1">Image</font></center>
926 </td>
927 <td><font size="-1">void</font></td>
928 <td rowspan="2"><font size="-1">Reduce noise in image using a
929noise peak elimination filter.</font></td>
930 </tr>
931 <tr>
932 <td><font size="-1">unsigned int order_</font></td>
933 </tr>
934 <tr>
935 <td>
936 <center><a name="rollImage"></a> <font size="-1">rollImage</font></center>
937 </td>
938 <td><font size="-1">int columns_, int rows_</font></td>
939 <td><font size="-1">Roll image (rolls image vertically and
940horizontally) by specified number of columnms and rows)</font></td>
941 </tr>
942 <tr>
943 <td>
944 <center><a name="rotateImage"></a> <font size="-1">rotateImage</font></center>
945 </td>
946 <td><font size="-1">double degrees_</font></td>
947 <td><font size="-1">Rotate image counter-clockwise by specified
948number of degrees</font></td>
949 </tr>
950 <tr>
951 <td>
952 <center><a name="sampleImage"></a> <font size="-1">sampleImage</font></center>
953 </td>
954 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
955&amp;geometry_&nbsp;</font></td>
956 <td><font size="-1">Resize image by using pixel sampling algorithm</font></td>
957 </tr>
958 <tr>
959 <td>
960 <center><a name="scaleImage"></a> <font size="-1">scaleImage</font></center>
961 </td>
962 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
963&amp;geometry_</font></td>
964 <td><font size="-1">Resize image by using simple ratio algorithm</font></td>
965 </tr>
966 <tr>
967 <td>
968 <center><a name="segmentImage"></a> <font size="-1">segmentImage</font></center>
969 </td>
970 <td><font size="-1">double clusterThreshold_ = 1.0,</font> <br>
971 <font size="-1">double smoothingThreshold_ = 1.5</font></td>
972 <td><font size="-1">Segment (coalesce similar image components)
973by analyzing the histograms of the color components and identifying
974units that are homogeneous with the fuzzy c-means technique. Also uses <i>quantizeColorSpace</i>
975and <i>verbose</i> image attributes. Specify <i>clusterThreshold_</i> ,
976as the number&nbsp; of&nbsp; pixels&nbsp; each cluster&nbsp; must exceed
977the cluster threshold to be considered valid. <i>SmoothingThreshold_</i>
978eliminates noise in the&nbsp; second derivative of the histogram. As the
979value is&nbsp; increased, you can&nbsp; expect&nbsp; a&nbsp; smoother
980second derivative.&nbsp; The default is 1.5.</font></td>
981 </tr>
982 <tr>
983 <td>
984 <center><a name="shadeImage"></a> <font size="-1">shadeImage</font></center>
985 </td>
986 <td><font size="-1">double azimuth_ = 30, double elevation_ = 30,</font> <br>
987 <font size="-1">bool colorShading_ = false</font></td>
988 <td><font size="-1">Shade image using distant light source.
989Specify <i> azimuth_</i> and <i>elevation_</i> as the&nbsp;
990position&nbsp; of&nbsp; the light source. By default, the shading
991results as a grayscale image.. Set c<i>olorShading_</i> to <i>true</i> to
992shade the red, green, and blue components of the image.</font></td>
993 </tr>
994 <tr>
995 <td>
996 <center><a name="sharpenImage"></a> <font size="-1">sharpenImage</font></center>
997 </td>
998 <td><font size="-1">const double radius_ = 1, const double sigma_
999= 0.5</font></td>
1000 <td><font size="-1">Sharpen pixels in image. The radius_
1001parameter specifies the radius of the Gaussian, in pixels, not counting
1002the center pixel.&nbsp; The sigma_ parameter specifies the standard
1003deviation of the Laplacian, in pixels.</font></td>
1004 </tr>
1005 <tr>
1006 <td>
1007 <center><a name="shaveImage"></a> <font size="-1">shaveImage</font></center>
1008 </td>
1009 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1010&amp;geometry_</font></td>
1011 <td><font size="-1">Shave pixels from image edges.</font></td>
1012 </tr>
1013 <tr>
1014 <td>
1015 <center><a name="shearImage"></a> <font size="-1">shearImage</font></center>
1016 </td>
1017 <td><font size="-1">double xShearAngle_, double yShearAngle_</font></td>
1018 <td><font size="-1">Shear image (create parallelogram by sliding
1019image by X or Y axis).&nbsp; Shearing slides one edge of an image along
1020the X&nbsp; or&nbsp; Y axis,&nbsp; creating&nbsp; a
1021parallelogram.&nbsp; An X direction shear slides an edge along the X
1022axis, while&nbsp; a&nbsp; Y&nbsp; direction shear&nbsp; slides&nbsp; an
1023edge along the Y axis.&nbsp; The amount of the shear is controlled by a
1024shear angle.&nbsp; For X direction&nbsp; shears,&nbsp; x&nbsp; degrees
1025is measured relative to the Y axis, and similarly, for Y direction
1026shears&nbsp; y&nbsp; degrees is measured relative to the X axis. Empty
1027triangles left over from shearing the&nbsp; image&nbsp; are filled&nbsp;
1028with&nbsp; the&nbsp; color&nbsp; defined as <i>borderColor</i>.&nbsp;</font></td>
1029 </tr>
1030 <tr>
1031 <td>
1032 <center><a name="solarizeImage"></a> <font size="-1">solarizeImage</font></center>
1033 </td>
1034 <td><font size="-1">double factor_</font></td>
1035 <td><font size="-1">Solarize image (similar to effect seen when
1036exposing a photographic film to light during the development process)</font></td>
1037 </tr>
1038 <tr>
1039 <td>
1040 <center><a name="spreadImage"></a> <font size="-1">spreadImage</font></center>
1041 </td>
1042 <td><font size="-1">unsigned int amount_ = 3</font></td>
1043 <td><font size="-1">Spread pixels randomly within image by
1044specified amount</font></td>
1045 </tr>
1046 <tr>
1047 <td>
1048 <center><a name="steganoImage"></a> <font size="-1">steganoImage</font></center>
1049 </td>
1050 <td><font size="-1">const <a href="Image.html">Image</a>
1051&amp;watermark_</font></td>
1052 <td><font size="-1">Add a digital watermark to the image (based
1053on second image)</font></td>
1054 </tr>
1055 <tr>
1056 <td>
1057 <center><a name="stereoImage"></a> <font size="-1">stereoImage</font></center>
1058 </td>
1059 <td><font size="-1">const <a href="Image.html">Image</a>
1060&amp;rightImage_</font></td>
1061 <td><font size="-1">Create an image which appears in stereo when
1062viewed with red-blue glasses (Red image on left, blue on right)</font></td>
1063 </tr>
1064 <tr>
1065 <td>
1066 <center><a name="swirlImage"></a> <font size="-1">swirlImage</font></center>
1067 </td>
1068 <td><font size="-1">double degrees_</font></td>
1069 <td><font size="-1">Swirl image (image pixels are rotated by
1070degrees)</font></td>
1071 </tr>
1072 <tr>
1073 <td>
1074 <center><a name="textureImage"></a> <font size="-1">textureImage</font></center>
1075 </td>
1076 <td><font size="-1">const <a href="Image.html">Image</a>
1077&amp;texture_</font></td>
1078 <td><font size="-1">Layer a texture on image background</font></td>
1079 </tr>
1080 <tr>
1081 <td>
1082 <center><a name="thresholdImage"></a> <font size="-1">thresholdImage</font></center>
1083 </td>
1084 <td><font size="-1">double threshold_</font></td>
1085 <td><font size="-1">Threshold image</font></td>
1086 </tr>
1087 <tr>
1088 <td rowspan="2">
1089 <center><a name="transformImage"></a> <font size="-1">transformImage</font></center>
1090 </td>
1091 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1092&amp;imageGeometry_</font></td>
1093 <td rowspan="2"><font size="-1">Transform image based on image
1094and crop geometries. Crop geometry is optional.</font></td>
1095 </tr>
1096 <tr>
1097 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1098&amp;imageGeometry_, const <a href="Geometry.html">Geometry</a>
1099&amp;cropGeometry_&nbsp;</font></td>
1100 </tr>
1101 <tr>
1102 <td>
1103 <center><a name="transparentImage"></a> <font size="-1">transparentImage</font></center>
1104 </td>
1105 <td><font size="-1">const <a href="Color.html">Color</a>
1106&amp;color_</font></td>
1107 <td><font size="-1">Add matte image to image, setting pixels
1108matching color to transparent.</font></td>
1109 </tr>
1110 <tr>
1111 <td>
1112 <center><a name="trimImage"></a> <font size="-1">trimImage</font></center>
1113 </td>
1114 <td><font size="-1">void</font></td>
1115 <td><font size="-1">Trim edges that are the background color from
1116the image.</font></td>
1117 </tr>
1118 <tr>
1119 <td>
1120 <center><a name="waveImage"></a> <font size="-1">waveImage</font></center>
1121 </td>
1122 <td><font size="-1">double amplitude_ = 25.0, double wavelength_
1123= 150.0</font></td>
1124 <td><font size="-1">Alter an image along a sine wave.</font></td>
1125 </tr>
1126 <tr>
1127 <td>
1128 <center><a name="zoomImage"></a> <font size="-1">zoomImage</font></center>
1129 </td>
1130 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1131&amp;geometry_</font></td>
1132 <td><font size="-1">Zoom image to specified size.</font></td>
1133 </tr>
1134 </tbody>
1135</table>
1136</p>
1137<p>Function objects are available to set attributes on image frames
1138which are equivalent to methods in the Image object. These function
1139objects allow setting an option across a range of image frames using f<tt>
1140or_each()</tt>. </p>
1141<p>The following code is an example of how the color 'red' may be set
1142to transparent in a GIF animation: </p>
1143<p><tt><font color="#000066">list&lt;image&gt; images;</font></tt> <br>
1144<tt><font color="#000066">readImages( &amp;images, "animation.gif" );</font></tt> <br>
1145<tt><font color="#000066">for_each ( images.begin(), images.end(),
1146transparentImage( "red" )&nbsp; );</font></tt> <br>
1147<tt><font color="#000066">writeImages( images.begin(), images.end(),
1148"animation.gif" );</font></tt> </p>
1149<p>The available function objects for setting image attributes are <br>
1150&nbsp;
1151<table border="1">
1152 <caption style="font-weight: bold;">Image Attributes</caption> <tbody>
1153 <tr>
1154 <td>
1155 <center><b>Attribute</b></center>
1156 </td>
1157 <td>
1158 <center><b>Type</b></center>
1159 </td>
1160 <td>
1161 <center><b>Constructor Signature(s)</b></center>
1162 </td>
1163 <td>
1164 <center><b>Description</b></center>
1165 </td>
1166 </tr>
1167 <tr>
1168 <td>
1169 <center><a name="adjoinImage"></a> <font size="-1">adjoinImage</font></center>
1170 </td>
1171 <td><font size="-1">bool</font></td>
1172 <td><font size="-1">bool flag_</font></td>
1173 <td><font size="-1">Join images into a single multi-image file.</font></td>
1174 </tr>
1175 <tr>
1176 <td>
1177 <center><a name="antiAlias"></a> <font size="-1">antiAliasImage</font></center>
1178 </td>
1179 <td><font size="-1">bool</font></td>
1180 <td><font size="-1">bool flag_</font></td>
1181 <td><font size="-1">Control antialiasing of rendered Postscript
1182and Postscript or TrueType fonts. Enabled by default.</font></td>
1183 </tr>
1184 <tr>
1185 <td>
1186 <center><a name="animationDelay"></a> <font size="-1">animation-</font> <br>
1187 <font size="-1">DelayImage</font></center>
1188 </td>
1189 <td><font size="-1">unsigned int (0 to 65535)</font></td>
1190 <td><font size="-1">unsigned int delay_</font></td>
1191 <td><font size="-1">Time in 1/100ths of a second (0 to 65535)
1192which must expire before displaying the next image in an animated
1193sequence. This option is useful for regulating the animation of a
1194sequence&nbsp; of GIF images within Netscape.</font></td>
1195 </tr>
1196 <tr>
1197 <td>
1198 <center><a name="animationIterations"></a> <font size="-1">animation-</font> <br>
1199 <font size="-1">IterationsImage</font></center>
1200 </td>
1201 <td><font size="-1">unsigned int</font></td>
1202 <td><font size="-1">unsigned int iterations_</font></td>
1203 <td><font size="-1">Number of iterations to loop an animation
1204(e.g. Netscape loop extension) for.</font></td>
1205 </tr>
1206 <tr>
1207 <td>
1208 <center><a name="backgroundColor"></a> <font size="-1">background-</font> <br>
1209 <font size="-1">ColorImage</font></center>
1210 </td>
1211 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1212 <td><font size="-1">const <a href="Color.html">Color</a>
1213&amp;color_</font></td>
1214 <td><font size="-1">Image background color</font></td>
1215 </tr>
1216 <tr>
1217 <td>
1218 <center><a name="backgroundTexture"></a> <font size="-1">background-</font> <br>
1219 <font size="-1">TextureImage</font></center>
1220 </td>
1221 <td><font size="-1">std::string</font></td>
1222 <td><font size="-1">const string &amp;texture_</font></td>
1223 <td><font size="-1">Image to use as background texture.</font></td>
1224 </tr>
1225 <tr>
1226 <td>
1227 <center><a name="borderColor"></a> <font size="-1">borderColor-</font> <br>
1228 <font size="-1">Image</font></center>
1229 </td>
1230 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1231 <td><font size="-1">&nbsp;const <a href="Color.html">Color</a>
1232&amp;color_</font></td>
1233 <td><font size="-1">Image border color</font></td>
1234 </tr>
1235 <tr>
1236 <td>
1237 <center><a name="boxColor"></a> <font size="-1">boxColorImage</font></center>
1238 </td>
1239 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1240 <td><font size="-1">const <a href="Color.html">Color</a>
1241&amp;boxColor_</font></td>
1242 <td><font size="-1">Base color that annotation text is rendered
1243on.</font></td>
1244 </tr>
1245 <tr>
1246 <td>
1247 <center><a name="chromaBluePrimary"></a> <font size="-1">chroma-</font> <br>
1248 <font size="-1">BluePrimaryImage</font></center>
1249 </td>
1250 <td><font size="-1">double x &amp; y</font></td>
1251 <td><font size="-1">double x_, double y_</font></td>
1252 <td><font size="-1">Chromaticity blue primary point (e.g. x=0.15,
1253y=0.06)</font></td>
1254 </tr>
1255 <tr>
1256 <td>
1257 <center><a name="chromaGreenPrimary"></a> <font size="-1">chroma-</font> <br>
1258 <font size="-1">GreenPrimaryImage</font></center>
1259 </td>
1260 <td><font size="-1">double x &amp; y</font></td>
1261 <td><font size="-1">double x_, double y_</font></td>
1262 <td><font size="-1">Chromaticity green primary point (e.g. x=0.3,
1263y=0.6)</font></td>
1264 </tr>
1265 <tr>
1266 <td>
1267 <center><a name="chromaRedPrimary"></a> <font size="-1">chroma-</font> <br>
1268 <font size="-1">RedPrimaryImage</font></center>
1269 </td>
1270 <td><font size="-1">double x &amp; y</font></td>
1271 <td><font size="-1">double x_, double y_</font></td>
1272 <td><font size="-1">Chromaticity red primary point (e.g. x=0.64,
1273y=0.33)</font></td>
1274 </tr>
1275 <tr>
1276 <td>
1277 <center><a name="chromaWhitePoint"></a> <font size="-1">chroma-</font> <br>
1278 <font size="-1">WhitePointImage</font></center>
1279 </td>
1280 <td><font size="-1">double x &amp; y</font></td>
1281 <td><font size="-1">double x_, double y_</font></td>
1282 <td><font size="-1">Chromaticity white point (e.g. x=0.3127,
1283y=0.329)</font></td>
1284 </tr>
1285 <tr>
1286 <td>
1287 <center><a name="colorFuzz"></a> <font size="-1">colorFuzzImage</font></center>
1288 </td>
1289 <td><font size="-1">double</font></td>
1290 <td><font size="-1">double fuzz_</font></td>
1291 <td><font size="-1">Colors within this distance are considered
1292equal. A number of algorithms search for a target&nbsp; color. By
1293default the color must be exact. Use this option to match colors that
1294are close to the target color in RGB space.</font></td>
1295 </tr>
1296 <tr>
1297 <td>
1298 <center><a name="colorMap"></a> <font size="-1">colorMapImage</font></center>
1299 </td>
1300 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1301 <td><font size="-1">unsigned int index_, const <a
1302 href="Color.html">Color</a> &amp;color_</font></td>
1303 <td><font size="-1">Color at color-pallet index.</font></td>
1304 </tr>
1305 <tr>
1306 <td><a name="colorSpaceImage"></a> <font size="-1">colorSpaceImage</font></td>
1307 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a> </font></td>
1308 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a>
1309colorSpace_</font></td>
1310 <td><font size="-1">The colorspace (e.g. CMYK) used to represent
1311the image pixel colors. Image pixels are always stored as RGB(A) except
1312for the case of CMY(K).</font></td>
1313 </tr>
1314 <tr>
1315 <td>
1316 <center><a name="composeImage"></a> <font size="-1">composeImage</font></center>
1317 </td>
1318 <td><font size="-1"><a href="Enumerations.html#CompositeOperator">CompositeOperator</a> </font></td>
1319 <td><font size="-1"><a href="Enumerations.html#CompositeOperator">CompositeOperator</a>
1320compose_</font></td>
1321 <td><font size="-1">Composition operator to be used when
1322composition is implicitly used (such as for image flattening).</font></td>
1323 </tr>
1324 <tr>
1325 <td>
1326 <center><a name="compressType"></a> <font size="-1">compressType-</font> <br>
1327 <font size="-1">Image</font></center>
1328 </td>
1329 <td><font size="-1"><a href="Enumerations.html#CompressionType">CompressionType</a> </font></td>
1330 <td><font size="-1"><a href="Enumerations.html#CompressionType">CompressionType</a>
1331compressType_</font></td>
1332 <td><font size="-1">Image compresion type. The default is the
1333compression type of the specified image file.</font></td>
1334 </tr>
1335 <tr>
1336 <td>
1337 <center><a name="density"></a> <font size="-1">densityImage</font></center>
1338 </td>
1339 <td><font size="-1"><a href="Geometry.html">Geometry</a> &nbsp;
1340(default 72x72)</font></td>
1341 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1342&amp;density_</font></td>
1343 <td><font size="-1">Vertical and horizontal resolution in pixels
1344of the image. This option specifies an image density when decoding a
1345Postscript or Portable Document page. Often used with <i>psPageSize</i>.</font></td>
1346 </tr>
1347 <tr>
1348 <td>
1349 <center><a name="depth"></a> <font size="-1">depthImage</font></center>
1350 </td>
1351 <td><font size="-1">unsigned int (8 or 16)</font></td>
1352 <td><font size="-1">unsigned int depth_</font></td>
1353 <td><font size="-1">Image depth. Used to specify the bit depth
1354when reading or writing&nbsp; raw images or thwn the output format
1355supports multiple depths. Defaults to the quantum depth that
1356ImageMagick is compiled with.</font></td>
1357 </tr>
1358 <tr>
1359 <td>
1360 <center><a name="endianImage"></a> <font size="-1">endianImage</font></center>
1361 </td>
1362 <td><font size="-1"><a href="Enumerations.html#EndianType">EndianType</a> </font></td>
1363 <td><font size="-1"><a href="Enumerations.html#EndianType">EndianType</a>
1364endian_</font></td>
1365 <td><font size="-1">Specify (or obtain) endian option for formats
1366which support it.</font></td>
1367 </tr>
1368 <tr>
1369 <td>
1370 <center><a name="fileName"></a> <font size="-1">fileNameImage</font></center>
1371 </td>
1372 <td><font size="-1">std::string</font></td>
1373 <td><font size="-1">const std::string &amp;fileName_</font></td>
1374 <td><font size="-1">Image file name.</font></td>
1375 </tr>
1376 <tr>
1377 <td>
1378 <center><a name="fillColorImage"></a> <font size="-1">fillColorImage</font></center>
1379 </td>
1380 <td><font size="-1">Color</font></td>
1381 <td><font size="-1">const Color &amp;fillColor_</font></td>
1382 <td><font size="-1">Color to use when filling drawn objects</font></td>
1383 </tr>
1384 <tr>
1385 <td>
1386 <center><a name="filterType"></a> <font size="-1">filterTypeImage</font></center>
1387 </td>
1388 <td><font size="-1"><a href="Enumerations.html#FilterTypes">FilterTypes</a> </font></td>
1389 <td><font size="-1"><a href="Enumerations.html#FilterTypes">FilterTypes</a>
1390filterType_</font></td>
1391 <td><font size="-1">Filter to use when resizing image. The
1392reduction filter employed has a sigificant effect on the time required
1393to resize an image and the resulting quality. The default filter is <i>Lanczos</i>
1394which has been shown to produce good results when reducing images.</font></td>
1395 </tr>
1396 <tr>
1397 <td>
1398 <center><a name="font"></a> <font size="-1">fontImage</font></center>
1399 </td>
1400 <td><font size="-1">std::string</font></td>
1401 <td><font size="-1">const std::string &amp;font_</font></td>
1402 <td><font size="-1">Text rendering font. If the font is a fully
1403qualified X server font name, the font is obtained from an X&nbsp;
1404server. To use a TrueType font, precede the TrueType filename with an @.
1405Otherwise, specify&nbsp; a&nbsp; Postscript font name (e.g.
1406"helvetica").</font></td>
1407 </tr>
1408 <tr>
1409 <td>
1410 <center><a name="fontPointsize"></a> <font size="-1">fontPointsize-</font> <br>
1411 <font size="-1">Image</font></center>
1412 </td>
1413 <td><font size="-1">unsigned int</font></td>
1414 <td><font size="-1">unsigned int pointSize_</font></td>
1415 <td><font size="-1">Text rendering font point size</font></td>
1416 </tr>
1417 <tr>
1418 <td>
1419 <center><a name="gifDisposeMethod"></a> <font size="-1">gifDispose-</font> <br>
1420 <font size="-1">MethodImage</font></center>
1421 </td>
1422 <td><font size="-1">unsigned int</font> <br>
1423 <font size="-1">{ 0 = Disposal not specified,</font> <br>
1424 <font size="-1">1 = Do not dispose of graphic,</font> <br>
1425 <font size="-1">3 = Overwrite graphic with background color,</font> <br>
1426 <font size="-1">4 = Overwrite graphic with previous graphic. }</font></td>
1427 <td><font size="-1">unsigned int disposeMethod_</font></td>
1428 <td><font size="-1">GIF disposal method. This option is used to
1429control how successive frames are rendered (how the preceding frame is
1430disposed of) when creating a GIF animation.</font></td>
1431 </tr>
1432 <tr>
1433 <td>
1434 <center><a name="interlaceType"></a> <font size="-1">interlace-</font> <br>
1435 <font size="-1">TypeImage</font></center>
1436 </td>
1437 <td><font size="-1"><a href="Enumerations.html#InterlaceType">InterlaceType</a> </font></td>
1438 <td><font size="-1"><a href="Enumerations.html#InterlaceType">InterlaceType</a>
1439interlace_</font></td>
1440 <td><font size="-1">The type of interlacing scheme (default <i>NoInterlace</i>
1441). This option is used to specify the type of&nbsp; interlacing
1442scheme&nbsp; for&nbsp; raw&nbsp; image formats such as RGB or YUV. <i>NoInterlace</i>
1443means do not&nbsp; interlace, <i>LineInterlace</i> uses scanline
1444interlacing, and <i>PlaneInterlace</i> uses plane interlacing. <i>
1445PartitionInterlace</i> is like <i>PlaneInterlace</i> except the&nbsp;
1446different planes&nbsp; are saved&nbsp; to individual files (e.g.&nbsp;
1447image.R, image.G, and image.B). Use <i>LineInterlace</i> or <i>PlaneInterlace</i>
1448to create an interlaced GIF or progressive JPEG image.</font></td>
1449 </tr>
1450 <tr>
1451 <td>
1452 <center><a name="isValidImage"></a> <font size="-1">isValidImage</font></center>
1453 </td>
1454 <td><font size="-1">bool</font></td>
1455 <td><font size="-1">bool isValid_</font></td>
1456 <td><font size="-1">Set image validity. Valid images become empty
1457(inValid) if argument is false.</font></td>
1458 </tr>
1459 <tr>
1460 <td>
1461 <center><a name="label"></a> <font size="-1">labelImage</font></center>
1462 </td>
1463 <td><font size="-1">std::string</font></td>
1464 <td><font size="-1">const std::string &amp;label_</font></td>
1465 <td><font size="-1">Image label</font></td>
1466 </tr>
1467 <tr>
1468 <td>
1469 <center><a name="lineWidth"></a> <font size="-1">lineWidthImage</font></center>
1470 </td>
1471 <td><font size="-1">double</font></td>
1472 <td><font size="-1">double lineWidth_</font></td>
1473 <td><font size="-1">Line width for drawing lines, circles,
1474ellipses, etc. See <a href="Drawable.html">Drawable</a> .</font></td>
1475 </tr>
1476 <tr>
1477 <td>
1478 <center><a name="magick"></a> <font size="-1">magickImage</font></center>
1479 </td>
1480 <td><font size="-1">std::string</font></td>
1481 <td><font size="-1">&nbsp;const std::string &amp;magick_</font></td>
1482 <td><font size="-1">Get image format (e.g. "GIF")</font></td>
1483 </tr>
1484 <tr>
1485 <td>
1486 <center><a name="matte"></a> <font size="-1">matteImage</font></center>
1487 </td>
1488 <td><font size="-1">bool</font></td>
1489 <td><font size="-1">bool matteFlag_</font></td>
1490 <td><font size="-1">True if the image has transparency. If set
1491True, store matte channel if&nbsp; the image has one otherwise create
1492an opaque one.</font></td>
1493 </tr>
1494 <tr>
1495 <td>
1496 <center><a name="matteColor"></a> <font size="-1">matteColorImage</font></center>
1497 </td>
1498 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1499 <td><font size="-1">const <a href="Color.html">Color</a>
1500&amp;matteColor_</font></td>
1501 <td><font size="-1">Image matte (frame) color</font></td>
1502 </tr>
1503 <tr>
1504 <td>
1505 <center><a name="monochrome"></a> <font size="-1">monochrome-</font> <br>
1506 <font size="-1">Image</font></center>
1507 </td>
1508 <td><font size="-1">bool</font></td>
1509 <td><font size="-1">bool flag_</font></td>
1510 <td><font size="-1">Transform the image to black and white</font></td>
1511 </tr>
1512 <tr>
1513 <td>
1514 <center><a name="pageImage"></a> <font size="-1">pageImage</font></center>
1515 </td>
1516 <td><font size="-1"><a href="Geometry.html#PostscriptPageSize">Geometry</a> </font></td>
1517 <td><font size="-1">const <a
1518 href="Geometry.html#PostscriptPageSize">Geometry</a> &amp;pageSize_</font></td>
1519 <td><font size="-1">Preferred size and location of an image
1520canvas.</font>
1521 <p><font size="-1">Use this option to specify the dimensions and
1522position of the Postscript page in dots per inch or a TEXT page in
1523pixels. This option is typically used in concert with <i><a
1524 href="#density">density</a> </i>.</font> </p>
1525 <p><font size="-1">Page may also be used to position a GIF image
1526(such as for a scene in an animation)</font></p>
1527 </td>
1528 </tr>
1529 <tr>
1530 <td>
1531 <center><a name="penColor"></a> <font size="-1">penColorImage</font></center>
1532 </td>
1533 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1534 <td><font size="-1">const <a href="Color.html">Color</a>
1535&amp;penColor_</font></td>
1536 <td><font size="-1">Pen color to use when annotating on or
1537drawing on image.</font></td>
1538 </tr>
1539 <tr>
1540 <td>
1541 <center><a name="penTexture"></a> <font size="-1">penTextureImage</font></center>
1542 </td>
1543 <td><font size="-1"><a href="Image.html">Image</a> </font></td>
1544 <td><font size="-1">const Image &amp; penTexture_</font></td>
1545 <td><font size="-1">Texture image to paint with (similar to
1546penColor).</font></td>
1547 </tr>
1548 <tr>
1549 <td>
1550 <center><a name="pixelColor"></a> <font size="-1">pixelColorImage</font></center>
1551 </td>
1552 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1553 <td><font size="-1">unsigned int x_, unsigned int y_, const <a
1554 href="Color.html"> Color</a> &amp;color_</font></td>
1555 <td><font size="-1">Get/set pixel color at location x &amp; y.</font></td>
1556 </tr>
1557 <tr>
1558 <td>
1559 <center><a name="psPageSize"></a> <font size="-1">psPageSizeImage</font></center>
1560 </td>
1561 <td><font size="-1"><a href="Geometry.html#PostscriptPageSize">Geometry</a> </font></td>
1562 <td><font size="-1">const <a
1563 href="Geometry.html#PostscriptPageSize">Geometry</a> &amp;pageSize_</font></td>
1564 <td><font size="-1">Postscript page size. Use this&nbsp; option
1565to specify the dimensions&nbsp; of the Postscript page in dots per inch
1566or a TEXT page in pixels. This option is typically used in concert with <i>density</i>.</font></td>
1567 </tr>
1568 <tr>
1569 <td>
1570 <center><a name="quality"></a> <font size="-1">qualityImage</font></center>
1571 </td>
1572 <td><font size="-1">unsigned int (0 to 100)</font></td>
1573 <td><font size="-1">unsigned int quality_</font></td>
1574 <td><font size="-1">JPEG/MIFF/PNG compression level (default 75).</font></td>
1575 </tr>
1576 <tr>
1577 <td>
1578 <center><a name="quantizeColors"></a> <font size="-1">quantize-</font> <br>
1579 <font size="-1">ColorsImage</font></center>
1580 </td>
1581 <td><font size="-1">unsigned int</font></td>
1582 <td><font size="-1">unsigned int colors_</font></td>
1583 <td><font size="-1">Preferred number of colors in the image. The
1584actual number of colors in the image may be less than your request, but
1585never more. Images with less unique colors than specified with this
1586option will have any duplicate or unused colors removed.</font></td>
1587 </tr>
1588 <tr>
1589 <td>
1590 <center><a name="quantizeColorSpace"></a> <font size="-1">quantize-</font> <br>
1591 <font size="-1">ColorSpaceImage</font></center>
1592 </td>
1593 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a> </font></td>
1594 <td><font size="-1"><a href="Enumerations.html#ColorspaceType">ColorspaceType</a>
1595colorSpace_</font></td>
1596 <td><font size="-1">Colorspace to quantize colors in (default
1597RGB). Empirical evidence suggests that distances in color spaces such
1598as YUV or YIQ correspond to perceptual color differences more closely
1599than do distances in RGB space. These color spaces may give better
1600results when color reducing an image.</font></td>
1601 </tr>
1602 <tr>
1603 <td>
1604 <center><a name="quantizeDither"></a> <font size="-1">quantize-</font> <br>
1605 <font size="-1">DitherImage</font></center>
1606 </td>
1607 <td><font size="-1">bool</font></td>
1608 <td><font size="-1">bool flag_</font></td>
1609 <td><font size="-1">Apply Floyd/Steinberg error diffusion to the
1610image. The basic strategy of dithering is to&nbsp; trade&nbsp; intensity
1611resolution&nbsp; for&nbsp; spatial&nbsp; resolution&nbsp; by&nbsp;
1612averaging the intensities&nbsp; of&nbsp; several&nbsp;
1613neighboring&nbsp; pixels. Images which&nbsp; suffer&nbsp; from&nbsp;
1614severe&nbsp; contouring&nbsp; when&nbsp; reducing colors can be improved
1615with this option. The quantizeColors or monochrome option must be set
1616for this option to take effect.</font></td>
1617 </tr>
1618 <tr>
1619 <td>
1620 <center><a name="quantizeTreeDepth"></a> <font size="-1">quantize-</font> <br>
1621 <font size="-1">TreeDepthImage</font></center>
1622 </td>
1623 <td><font size="-1">unsigned int (0 to 8)</font></td>
1624 <td><font size="-1">unsigned int treeDepth_</font></td>
1625 <td><font size="-1">Depth of the quantization color
1626classification tree. Values of 0 or 1 allow selection of the optimal
1627tree depth for the color reduction algorithm. Values between 2 and 8 may
1628be used to manually adjust the tree depth.</font></td>
1629 </tr>
1630 <tr>
1631 <td>
1632 <center><a name="renderingIntent"></a> <font size="-1">rendering-</font> <br>
1633 <font size="-1">IntentImage</font></center>
1634 </td>
1635 <td><font size="-1"><a href="Enumerations.html#RenderingIntent">RenderingIntent</a> </font></td>
1636 <td><font size="-1"><a href="Enumerations.html#RenderingIntent">RenderingIntent</a>
1637render_</font></td>
1638 <td><font size="-1">The type of rendering intent</font></td>
1639 </tr>
1640 <tr>
1641 <td>
1642 <center><a name="resolutionUnits"></a> <font size="-1">resolution-</font> <br>
1643 <font size="-1">UnitsImage</font></center>
1644 </td>
1645 <td><font size="-1"><a href="Enumerations.html#ResolutionType">ResolutionType</a> </font></td>
1646 <td><font size="-1"><a href="Enumerations.html#ResolutionType">ResolutionType</a>
1647units_</font></td>
1648 <td><font size="-1">Units of image resolution</font></td>
1649 </tr>
1650 <tr>
1651 <td>
1652 <center><a name="scene"></a> <font size="-1">sceneImage</font></center>
1653 </td>
1654 <td><font size="-1">unsigned int</font></td>
1655 <td><font size="-1">unsigned int scene_</font></td>
1656 <td><font size="-1">Image scene number</font></td>
1657 </tr>
1658 <tr>
1659 <td>
1660 <center><a name="size"></a> <font size="-1">sizeImage</font></center>
1661 </td>
1662 <td><font size="-1"><a href="Geometry.html">Geometry</a> </font></td>
1663 <td><font size="-1">const <a href="Geometry.html">Geometry</a>
1664&amp;geometry_</font></td>
1665 <td><font size="-1">Width and height of a raw image (an image
1666which does not support width and height information).&nbsp; Size may
1667also be used to affect the image size read from a multi-resolution
1668format (e.g. Photo CD, JBIG, or JPEG.</font></td>
1669 </tr>
1670 <tr>
1671 <td>
1672 <center><a name="strokeColorImage"></a> <font size="-1">strokeColorImage</font></center>
1673 </td>
1674 <td><font size="-1"><a href="Color.html">Color</a> </font></td>
1675 <td><font size="-1">const <a href="Color.html">Color</a>
1676&amp;strokeColor_</font></td>
1677 <td><font size="-1">Color to use when drawing object outlines</font></td>
1678 </tr>
1679 <tr>
1680 <td>
1681 <center><a name="subImage"></a> <font size="-1">subImageImage</font></center>
1682 </td>
1683 <td><font size="-1">unsigned int</font></td>
1684 <td><font size="-1">unsigned int subImage_</font></td>
1685 <td><font size="-1">Subimage of an image sequence</font></td>
1686 </tr>
1687 <tr>
1688 <td>
1689 <center><a name="subRange"></a> <font size="-1">subRangeImage</font></center>
1690 </td>
1691 <td><font size="-1">unsigned int</font></td>
1692 <td><font size="-1">unsigned int subRange_</font></td>
1693 <td><font size="-1">Number of images relative to the base image</font></td>
1694 </tr>
1695 <tr>
1696 <td>
1697 <center><a name="tileName"></a> <font size="-1">tileNameImage</font></center>
1698 </td>
1699 <td><font size="-1">std::string</font></td>
1700 <td><font size="-1">const std::string &amp;tileName_</font></td>
1701 <td><font size="-1">Tile name</font></td>
1702 </tr>
1703 <tr>
1704 <td>
1705 <center><a name="typeImage"></a> <font size="-1">typeImage</font></center>
1706 </td>
1707 <td><font size="-1"><a href="Enumerations.html#ImageType">ImageType</a> </font></td>
1708 <td><font size="-1"><a href="Enumerations.html#ImageType">ImageType</a>
1709type_</font></td>
1710 <td><font size="-1">Image storage type.</font></td>
1711 </tr>
1712 <tr>
1713 <td>
1714 <center><a name="verbose"></a> <font size="-1">verboseImage</font></center>
1715 </td>
1716 <td><font size="-1">bool</font></td>
1717 <td><font size="-1">bool verboseFlag_</font></td>
1718 <td><font size="-1">Print detailed information about the image</font></td>
1719 </tr>
1720 <tr>
1721 <td>
1722 <center><a name="view"></a> <font size="-1">viewImage</font></center>
1723 </td>
1724 <td><font size="-1">std::string</font></td>
1725 <td><font size="-1">const std::string &amp;view_</font></td>
1726 <td><font size="-1">FlashPix viewing parameters.</font></td>
1727 </tr>
1728 <tr>
1729 <td>
1730 <center><a name="x11Display"></a> <font size="-1">x11DisplayImage</font></center>
1731 </td>
1732 <td><font size="-1">std::string (e.g. "hostname:0.0")</font></td>
1733 <td><font size="-1">const std::string &amp;display_</font></td>
1734 <td><font size="-1">X11 display to display to, obtain fonts from,
1735or to capture image from</font></td>
1736 </tr>
1737 </tbody>
1738</table>
1739<br>
1740&nbsp; </p>
1741<center>
1742<h3> Query Image Format Support</h3>
1743</center>
1744Magick++ provides the&nbsp;<a name="coderInfoList"></a> <i>coderInfoList()</i>
1745function to support obtaining information about the image formats
1746supported by ImageMagick. Support for image formats in ImageMagick
1747is provided by modules known as "coders". A user-provided container is
1748updated based on a boolean truth-table match. The truth-table supports
1749matching based on whether ImageMagick can read the format, write the
1750format, or supports multiple frames for the format. A wildcard specifier
1751is supported for any "don't care" field. The data obtained via
1752coderInfoList() may be useful for preparing GUI dialog boxes or for
1753deciding which output format to write based on support within the
1754ImageMagick build.
1755<p>The definition of coderInfoList is: </p>
1756<p><tt><font color="#000066">&nbsp; class CoderInfo</font></tt> <br>
1757<tt><font color="#000066">&nbsp; {</font></tt> <br>
1758<tt><font color="#000066">&nbsp; public:</font></tt> </p>
1759<p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; enum MatchType {</font></tt> <br>
1760<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1761AnyMatch,&nbsp; // match any coder</font></tt> <br>
1762<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TrueMatch, //
1763match coder if true</font></tt> <br>
1764<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FalseMatch //
1765match coder if false</font></tt> <br>
1766<tt><font color="#000066">&nbsp;&nbsp;&nbsp; };</font></tt> </p>
1767<p><tt><font color="#000066">&nbsp;&nbsp;&nbsp; [ remaining CoderInfo
1768methods ]</font></tt> </p>
1769<p><tt><font color="#000066">&nbsp;&nbsp; }</font></tt> </p>
1770<p><tt><font color="#000066">&nbsp; template &lt;class Container &gt;</font></tt> <br>
1771<tt><font color="#000066">&nbsp; void coderInfoList( Container
1772*container_,</font></tt> <br>
1773<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1774CoderInfo::MatchType isReadable_&nbsp;&nbsp; = CoderInfo::AnyMatch,</font></tt> <br>
1775<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1776CoderInfo::MatchType isWritable_&nbsp;&nbsp; = CoderInfo::AnyMatch,</font></tt> <br>
1777<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1778CoderInfo::MatchType isMultiFrame_ = CoderInfo::AnyMatch</font></tt> <br>
1779<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1780);</font></tt> </p>
1781<p>The following example shows how to retrieve a list of all of the
1782coders which support reading images and print the coder attributes (all
1783listed formats will be readable): </p>
1784<p><tt><font color="#000066">&nbsp; list&lt;CoderInfo&gt; coderList;</font></tt> <br>
1785<tt><font color="#000066">&nbsp; coderInfoList(
1786&amp;coderList,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1787// Reference to output list</font></tt> <br>
1788<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1789CoderInfo::TrueMatch, // Match readable formats</font></tt> <br>
1790<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1791CoderInfo::AnyMatch,&nbsp; // Don't care about writable formats</font></tt> <br>
1792<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1793CoderInfo::AnyMatch); // Don't care about multi-frame support</font></tt> <br>
1794<tt><font color="#000066">&nbsp; list&lt;CoderInfo&gt;::iterator entry
1795= coderList.begin();</font></tt> <br>
1796<tt><font color="#000066">&nbsp; while( entry != coderList.end() )</font></tt> <br>
1797<tt><font color="#000066">&nbsp; {</font></tt> <br>
1798<tt><font color="#000066">&nbsp;&nbsp;&nbsp; cout &lt;&lt;
1799entry-&gt;name() &lt;&lt; ": (" &lt;&lt; entry-&gt;description()
1800&lt;&lt; ") : ";</font></tt> <br>
1801<tt><font color="#000066">&nbsp;&nbsp;&nbsp; cout &lt;&lt; "Readable =
1802";</font></tt> <br>
1803<tt><font color="#000066">&nbsp;&nbsp;&nbsp; if (
1804entry-&gt;isReadable() )</font></tt> <br>
1805<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt;
1806"true";</font></tt> <br>
1807<tt><font color="#000066">&nbsp;&nbsp;&nbsp; else</font></tt> <br>
1808<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt;
1809"false";</font></tt> <br>
1810<tt><font color="#000066">&nbsp;&nbsp;&nbsp; cout &lt;&lt; ", ";</font></tt> <br>
1811<tt><font color="#000066">&nbsp;&nbsp;&nbsp; cout &lt;&lt; "Writable =
1812";</font></tt> <br>
1813<tt><font color="#000066">&nbsp;&nbsp;&nbsp; if (
1814entry-&gt;isWritable() )</font></tt> <br>
1815<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt;
1816"true";</font></tt> <br>
1817<tt><font color="#000066">&nbsp;&nbsp;&nbsp; else</font></tt> <br>
1818<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt;
1819"false";</font></tt> <br>
1820<tt><font color="#000066">&nbsp;&nbsp;&nbsp; cout &lt;&lt; ", ";</font></tt> <br>
1821<tt><font color="#000066">&nbsp;&nbsp;&nbsp; cout &lt;&lt; "Multiframe
1822= ";</font></tt> <br>
1823<tt><font color="#000066">&nbsp;&nbsp;&nbsp; if (
1824entry-&gt;isMultiframe() )</font></tt> <br>
1825<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt;
1826"true";</font></tt> <br>
1827<tt><font color="#000066">&nbsp;&nbsp;&nbsp; else</font></tt> <br>
1828<tt><font color="#000066">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt;
1829"false";</font></tt> <br>
1830<tt><font color="#000066">&nbsp;&nbsp;&nbsp; cout &lt;&lt; endl;<br>
1831&nbsp; &nbsp; entry ++;</font></tt><br>
1832<tt><font color="#000066">&nbsp;&nbsp; }</font></tt>&nbsp;</p>
1833<h3 style="text-align: center;">Obtaining A Color Histogram&nbsp; </h3>
1834<p> &nbsp;Magick++ provides the <a name="colorHistogram"></a><span
1835 style="font-weight: bold;">colorHistogram</span> template function to
1836retrieve a color histogram from an image. A color histogram provides a
1837count of how many times each color occurs in the image. The histogram is
1838written into a user-provided container, which (for example) could be a <span
1839 style="font-style: italic;">&lt;vector&gt;</span> or a <span
1840 style="font-style: italic;">&lt;map&gt;</span>. &nbsp;When a
1841&lt;map&gt; is used, the <span style="font-style: italic;">Color</span>
1842is used as the key so that quick lookups of usage counts for colors may
1843be performed. Writing into a <span style="font-style: italic;">&lt;map&gt;</span>
1844may be slower than writing into a <span style="font-style: italic;">&lt;vector&gt;</span>
1845since the <span style="font-style: italic;">&lt;map&gt;</span> sorts the
1846entries (by color intensity) and checks for uniqueness. Each histogram
1847entry is contained in type&nbsp;<span style="font-style: italic;">std::pair&lt;Magick::Color,unsigned
1848long&gt;</span><span style="font-style: italic;"> </span>with the first
1849member of the pair being a <span style="font-style: italic;">Color,</span>
1850and the second member of the pair being an '<span
1851 style="font-style: italic;">unsigned long</span>'. Use the <span
1852 style="font-style: italic;">&lt;pair&gt;</span> "<span
1853 style="font-style: italic;">first</span>" member to access the Color
1854and the "<span style="font-style: italic;">second</span>" member to
1855access&nbsp;the number of times the color occurs in the image.</p>
1856<p>The template function declaration is as follows:<br>
1857</p>
1858<p><span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1859template &lt;class Container &gt;</span><br
1860 style="color: rgb(51, 51, 153); font-family: monospace;">
1861<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1862void colorHistogram( Container *histogram_, const Image image)</span><br>
1863</p>
1864<p>The following examples illustrate using both a &lt;map&gt; and a
1865&lt;vector&gt; to retrieve the color histogram, and print out a
1866formatted summary.<br>
1867<br>
1868Using &lt;map&gt;:<br>
1869&nbsp; &nbsp; <br>
1870<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1871Image image("image.miff");</span><br
1872 style="color: rgb(51, 51, 153); font-family: monospace;">
1873<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1874map&lt;Color,unsigned long&gt; histogram;</span><br
1875 style="color: rgb(51, 51, 153); font-family: monospace;">
1876<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1877colorHistogram( &amp;histogram, image );</span><br
1878 style="color: rgb(51, 51, 153); font-family: monospace;">
1879<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1880std::map&lt;Color,unsigned long&gt;::const_iterator p=histogram.begin();</span><br
1881 style="color: rgb(51, 51, 153); font-family: monospace;">
1882<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1883while (p != histogram.end())</span><br
1884 style="color: rgb(51, 51, 153); font-family: monospace;">
1885<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1886&nbsp; {</span><br
1887 style="color: rgb(51, 51, 153); font-family: monospace;">
1888<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1889&nbsp;&nbsp; &nbsp;cout &lt;&lt; setw(10) &lt;&lt; (int)p-&gt;second
1890&lt;&lt; ": ("</span><br
1891 style="color: rgb(51, 51, 153); font-family: monospace;">
1892<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1893&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; setw(quantum_width)
1894&lt;&lt; (int)p-&gt;first.redQuantum() &lt;&lt; ","</span><br
1895 style="color: rgb(51, 51, 153); font-family: monospace;">
1896<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1897&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; setw(quant</span><span
1898 style="color: rgb(51, 51, 153); font-family: monospace;">um_width)
1899&lt;&lt; (int)p-&gt;first.greenQuantum() &lt;&lt; ","</span><br
1900 style="color: rgb(51, 51, 153); font-family: monospace;">
1901<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1902&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; setw(quantum_width)
1903&lt;&lt; (int)p-&gt;first.blueQuantum() &lt;&lt; ")"</span><br
1904 style="color: rgb(51, 51, 153); font-family: monospace;">
1905<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1906&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; endl;</span><br
1907 style="color: rgb(51, 51, 153); font-family: monospace;">
1908<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1909&nbsp;&nbsp; &nbsp; p++;</span><br
1910 style="color: rgb(51, 51, 153); font-family: monospace;">
1911<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1912&nbsp; }</span><br>
1913<br>
1914Using &lt;vector&gt;:<br>
1915&nbsp; &nbsp; <br>
1916<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1917Image image("image.miff");</span><br
1918 style="color: rgb(51, 51, 153); font-family: monospace;">
1919<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1920std::vector&lt;std::pair&lt;Color,unsigned long&gt; &gt; histogram;</span><br
1921 style="color: rgb(51, 51, 153); font-family: monospace;">
1922<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1923colorHistogram( &amp;histogram, image );</span><br
1924 style="color: rgb(51, 51, 153); font-family: monospace;">
1925<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1926std::vector&lt;std::pair&lt;Color,unsigned long&gt; &gt;::const_iterator
1927p=histogram.begin();</span><br
1928 style="color: rgb(51, 51, 153); font-family: monospace;">
1929<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1930while (p != histogram.end())</span><br
1931 style="color: rgb(51, 51, 153); font-family: monospace;">
1932<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1933&nbsp; {</span><br
1934 style="color: rgb(51, 51, 153); font-family: monospace;">
1935<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1936&nbsp;&nbsp; &nbsp;cout &lt;&lt; setw(10) &lt;&lt; (int)p-&gt;second
1937&lt;&lt; ": ("</span><br
1938 style="color: rgb(51, 51, 153); font-family: monospace;">
1939<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1940&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; setw(quantum_width)
1941&lt;&lt; (int)p-&gt;first.redQuantum() &lt;&lt; ","</span><br
1942 style="color: rgb(51, 51, 153); font-family: monospace;">
1943<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1944&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; setw(quantum_width)
1945&lt;&lt; (int)p-&gt;first.greenQuantum() &lt;&lt; ","</span><br
1946 style="color: rgb(51, 51, 153); font-family: monospace;">
1947<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1948&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; setw(quantum_width)
1949&lt;&lt; (int)p-&gt;first.blueQuantum() &lt;&lt; ")"</span><br
1950 style="color: rgb(51, 51, 153); font-family: monospace;">
1951<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1952&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt; endl;</span><br
1953 style="color: rgb(51, 51, 153); font-family: monospace;">
1954<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1955&nbsp;&nbsp; &nbsp;p++;</span><br
1956 style="color: rgb(51, 51, 153); font-family: monospace;">
1957<span style="color: rgb(51, 51, 153); font-family: monospace;">&nbsp;
1958&nbsp; }</span><br>
1959</p>
1960<p><br>
1961<br>
1962</p>
1963</body>
1964</html>