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