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