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