From: cristy The preferred way to allocate Image objects is via automatic
allocation (on the stack). There is no concern that allocating Image
-objects on the stack will excessively enlarge the stack since Magick++
-allocates all large data objects (such as the actual image data) from
-the heap. Use of automatic allocation is preferred over explicit
-allocation (via new) since it is much less error prone and
-allows use of C++ scoping rules to avoid memory leaks. Use of automatic
-allocation allows Magick++ objects to be assigned and copied just like
-the C++ intrinsic data types (e.g. 'int '), leading to clear and
+objects on the stack will excessively enlarge the stack since Magick++
+allocates all large data objects (such as the actual image data) from
+the heap. Use of automatic allocation is preferred over explicit
+allocation (via new) since it is much less error prone and
+allows use of C++ scoping rules to avoid memory leaks. Use of automatic
+allocation allows Magick++ objects to be assigned and copied just like
+the C++ intrinsic data types (e.g. 'int '), leading to clear and
easy to read code. Use of automatic allocation leads to naturally
exception-safe code since if an exception is thrown, the object is
-automatically deallocated once the stack unwinds past the scope of the
+automagically deallocated once the stack unwinds past the scope of the
allocation (not the case for objects allocated via new ). Image is very easy to use. For example, here is a the source to a
-program which reads an image, crops it, and writes it to a new file (the
+program which reads an image, crops it, and writes it to a new file
+(the
exception handling is optional but strongly recommended): try { Magick::Image Class
Image is the primary object in Magick++ and represents
-a single image frame (see design ). The STL interface must be used to operate on
-image sequences or images (e.g. of format GIF, TIFF, MIFF, Postscript,
-& MNG) which are comprized of multiple image frames. Individual
+a single image frame (see design ). The
+STL interface must be used to operate on
+image sequences or images (e.g. of format GIF, TIFF, MIFF, Postscript,
+& MNG) which are comprized of multiple image frames. Individual
frames of a multi-frame image may be requested by adding array-style
notation to the end of the file name (e.g. "animation.gif[3]" retrieves
the fourth frame of a GIF animation. Various image manipulation
operations may be applied to the image. Attributes may be set on the
image to influence the operation of the manipulation operations. The Pixels class provides low-level access to image
+ href="Pixels.html"> Pixels class provides low-level access to
+image
pixels. As a convenience, including <Magick++.h>
-is sufficient in order to use the complete Magick++ API. The Magick++
+is sufficient in order to use the complete Magick++ API. The Magick++
API is enclosed within the Magick namespace so you must either
-add the prefix " Magick:: " to each class/enumeration name or add
-the statement " using namespace Magick;" after including the Magick++.h
+add the prefix " Magick:: " to each class/enumeration name or
+add
+the statement " using namespace Magick;" after including the Magick++.h
header.
#include <Magick++.h>
+#include <Magick++.h>
+
#include <iostream>
using namespace std;
using namespace Magick;
@@ -74,29 +79,34 @@ useless.
// Read a file into
image object
- image.read( "girl.gif" );
// Crop the image to
specified size (width, height, xOffset, yOffset)
image.crop(
Geometry(100,100, 100, 100) );
// Write the image to
a file
- image.write( "x.gif" );
+ image.write( "x.gif" );
+
}
- catch( Exception &error_ )
+ catch( Exception &error_ )
+
{
cout
-<< "Caught exception: " << error_.what() << endl;
- return 1;
+<< "Caught exception: " << error_.what() << endl;
+
+ return 1;
+
}
return 0;
}
#include <Magick++.h>
+#include <Magick++.h> +
#include <iostream>
using namespace std;
using namespace Magick;
@@ -115,10 +126,14 @@ following: {
Image master("horse.jpg");
- Image second = master;
- second.zoom("640x480");
- Image third = master;
- third.zoom("800x600");
+ Image second = master; +
+ second.zoom("640x480"); +
+ Image third = master; +
+ third.zoom("800x600"); +
second.write("horse640x480.jpg");
@@ -128,9 +143,10 @@ third.write("horse800x600.jpg");
During the entire operation, a maximum of three images exist in memory and the image data is never copied.The following is the source for another simple program which creates - a 100 by 100 pixel white image with a red pixel in the center and +a 100 by 100 pixel white image with a red pixel in the center and writes it to a file:
-#include <Magick++.h>
+#include <Magick++.h> +
using namespace std;
using namespace Magick;
int main(int argc,char **argv)
@@ -149,7 +165,8 @@ lines: image.quantizeColorSpace( GRAYColorspace );
image.quantizeColors( 256 );
- image.quantize( ); + image.quantize( ); +or, more simply:
image.type( GrayscaleType );
@@ -158,11 +175,12 @@ GrayscaleType );BLOBs
While encoded images (e.g. JPEG) are most often written-to and -read-from a disk file, encoded images may also reside in memory. Encoded -images in memory are known as BLOBs (Binary Large OBjects) and may be -represented using the Blob class. The encoded -image may be initially placed in memory by reading it directly from a -file, reading the image from a database, memory-mapped from a disk +read-from a disk file, encoded images may also reside in memory. +Encoded +images in memory are known as BLOBs (Binary Large OBjects) and may be +represented using the Blob class. The encoded +image may be initially placed in memory by reading it directly from a +file, reading the image from a database, memory-mapped from a disk file, or could be written to memory by Magick++. Once the encoded image has been placed within a Blob, it may be read into a Magick++ Image via a constructor or read() @@ -170,12 +188,13 @@ a constructor or read() href="#write"> write() .An example of using Image to write to a Blob follows:
-
#include <Magick++.h>
+#include <Magick++.h> +
using namespace std;
using namespace Magick;
int main(int argc,char **argv)
{
- // Read GIF file from + // Read GIF file from disk
Image image( "giraffe.gif" ); @@ -184,10 +203,12 @@ JPEG format
Blob blob;
image.magick( "JPEG" ) // Set JPEG output format
- image.write( &blob ); + image.write( &blob ); +[ Use BLOB data (in JPEG format) here ]
-return 0;
+return 0; +
}
@@ -196,15 +217,18 @@ following examples:[ Entry condition for the following examples is that data is pointer to encoded image data and length represents the size of the data ]
-Blob blob( data, length );
+Blob blob( data, length ); +or -
Image image( blob );Blob blob( data, length );
+Blob blob( data, length ); +some images do not contain their size or format so the size and format must be specified in advance: -
Image image;
image.read( blob);Blob blob( data, length );
+Blob blob( data, length ); +
Image image;
image.size( "640x480")
image.magick( "RGBA" );
@@ -218,7 +242,7 @@ in-memory BLOB . The available Image constructors are shown in the following table:
-+
Image Constructors @@ -232,13 +256,13 @@ constructors are shown in the following table:
const std::string &imageSpec_ Construct Image by reading from file or URL specified by imageSpec_. Use array notation (e.g. filename[9]) -to select a specific scene from a multi-frame image. +to select a specific scene from a multi-frame image.const Geometry &size_, const Color &color_ Construct a blank image canvas of specified -size and color +size and colorconst Construct Image by reading from encoded image data contained in an in-memory BLOB . Depending on the constructor arguments, the Blob size -, depth , magick (format) may -also be specified. Some image formats require that size be specified. +, depth , magick (format) +may +also be specified. Some image formats require that size be specified. The default ImageMagick uses for depth depends on the compiled-in Quantum size (8 or 16). If ImageMagick's Quantum size does not match that of the image, the depth may need to be specified. -ImageMagick can usually automatically detect the image's format. -When a format can't be automatically detected, the format (magick ) must be specified. @@ -262,32 +287,33 @@ When a format can't be automatically detected, the format ( const Blob &blob_, const Geometry &size, -unsigned int depth +size_t depthconst Blob &blob_, const Geometry &size, -unsigned int depth_, const string &magick_ +size_t depth_, const string &magick_const Blob -&blob_, const Geometry &size, const +&blob_, const Geometry &size, +const string &magick_ - const unsigned int width_,
- const unsigned int height_,
+const size_t width_, + const void *pixels_
+ const size_t height_,
std::string map_,
const StorageType type_,
- const unsigned char* pixels_Construct a new Image based on an array of -image pixels. The pixel data must be in scanline order top-to-bottom. -The data can be character, short int, integer, float, or double. Float +image pixels. The pixel data must be in scanline order top-to-bottom. +The data can be character, short int, integer, float, or double. Float and double require the pixels to be normalized [0..1]. The other types -are [0..QuantumRange]. For example, to create a 640x480 image from -unsigned red-green-blue character data, use - Image image( 640, 480, "RGB", +are [0..MaxRGB]. For example, to create a 640x480 image from +unsigned red-green-blue character data, use +
Image image( 640, 480, "RGB", 0, pixels );
The parameters are as follows:
@@ -304,21 +330,21 @@ unsigned red-green-blue character data, usemap_ This character string can be any -combination or order of R = red, G = green, B = blue, A = alpha, C = -cyan, Y = yellow M = magenta, and K = black. The ordering reflects the -order of the pixels in the supplied pixel array. +combination or order of R = red, G = green, B = blue, A = alpha, C = +cyan, Y = yellow M = magenta, and K = black. The ordering reflects the +order of the pixels in the supplied pixel array.type_ Pixel -storage type (CharPixel, ShortPixel, IntegerPixel, FloatPixel, or +storage type (CharPixel, ShortPixel, IntegerPixel, FloatPixel, or DoublePixel) @@ -329,13 +355,15 @@ values and type_ parameters. pixels_ This array of values contain the pixel -components as defined by the map_ and type_ parameters. The length of -the arrays must equal the area specified by the width_ and height_ +components as defined by the map_ and type_ parameters. The length of +the arrays must equal the area specified by the width_ and height_ values and type_ parameters. - -Image supports access to all the single-image (versus image-list) - manipulation operations provided by the ImageMagick library. If you +Image supports access to all the single-image (versus +image-list) manipulation operations provided by the ImageMagick +library. If you must process a multi-image file (such as an animation), the STL interface , which provides a multi-image -abstraction on top of Image, must be used. +abstraction on top of Image, must be used.Image Manipulation Methods
+Image Manipulation +Methods
Image manipulation methods are very easy to use. For example:
Image image;
image.read("myImage.tiff");
@@ -344,25 +372,26 @@ abstraction on top of Image, must be used. adds gaussian noise to the image file "myImage.tiff".The operations supported by Image are shown in the following table:
--
Image Manipulation Methods ++
Image Image Manipulation Methods Method Signature(s) Description - + - unsigned int width, unsigned + size_t width, unsigned int height, unsigned offset = 0 -
Apply adaptive thresholding to + Apply adaptive thresholding to the image. Adaptive thresholding is useful if the ideal threshold level -is not known in advance, or if the illumination gradient is not constant +is not known in advance, or if the illumination gradient is not +constant across the image. Adaptive thresholding works by evaulating the mean (average) of a pixel region (size specified by width and height) and using the mean as the thresholding value. In order to remove @@ -372,7 +401,7 @@ compute the threshold.
- + addNoise NoiseType @@ -380,7 +409,21 @@ noiseType_ Add noise to image with specified noise type. - +addNoiseChannel +
+const ChannelType +channel_, const NoiseType noiseType_ +
+Add noise to an image +channel with the specified noise type. The channel_ parameter specifies the +channel to add noise to. The noiseType_ parameter +specifies the type of noise. +
++ affineTransform
const DrawableAffine @@ -391,7 +434,7 @@ specified affine (or free transform) matrix.
- + annotate const std::string &text_, const &boundingArea_, GravityType gravity_Annotate using specified text, bounding area, -and placement gravity. If boundingArea_ is invalid, then -bounding area is entire image. +and placement gravity. If boundingArea_ is invalid, then +bounding area is entire image.const std::string &text_, const href="Enumerations.html#GravityType">GravityType gravity_, double degrees_,Annotate with text using specified text, -bounding area, placement gravity, and rotation. If boundingArea_ -is invalid, then bounding area is entire image. +bounding area, placement gravity, and rotation. If boundingArea_ +is invalid, then bounding area is entire image.const std::string &text_, image) and placement gravity.- + blur const double radius_ = 1, const double sigma_ = 0.5 Blur image. The radius_ parameter -specifies the radius of the Gaussian, in pixels, not counting the center +specifies the radius of the Gaussian, in pixels, not counting the +center pixel. The sigma_ parameter specifies the standard -deviation of the Laplacian, in pixels. +deviation of the Laplacian, in pixels.- ++ blurChannel +
+const ChannelType +channel_, const double radius_ = 0.0, const double sigma_ = 1.0 +
+Blur an image +channel. The channel_ +parameter specifies the channel to blur. The radius_ parameter +specifies the radius of the Gaussian, in pixels, not counting the +center +pixel. The sigma_ parameter specifies the standard +deviation of the Laplacian, in pixels. ++ border const Geometry @@ -443,29 +502,36 @@ deviation of the Laplacian, in pixels. color of the border is specified by the borderColor attribute.- ++ + +cdl +const std::string &cdl_ +color correct with a color decision list. See http://en.wikipedia.org/wiki/ASC_CDL for details. ++ channel ChannelType layer_ Extract channel from image. Use this option -to extract a particular channel from the image. MatteChannel +to extract a particular channel from the image. MatteChannel for example, is useful for extracting the opacity values from an image. - + charcoal const double radius_ = 1, const double sigma_ = 0.5 Charcoal effect image (looks like charcoal sketch). The radius_ parameter specifies the radius of the -Gaussian, in pixels, not counting the center pixel. The sigma_ -parameter specifies the standard deviation of the Laplacian, in pixels. +Gaussian, in pixels, not counting the center pixel. The sigma_ +parameter specifies the standard deviation of the Laplacian, in pixels.- + chop const Geometry @@ -474,59 +540,61 @@ parameter specifies the standard deviation of the Laplacian, in pixels. subregion of image) - + - colorize const unsigned int opacityRed_, const -unsigned int opacityGreen_, const unsigned int opacityBlue_, const + const size_t opacityRed_, const +size_t opacityGreen_, const size_t opacityBlue_, const Color &penColor_ Colorize image with pen color, using -specified percent opacity for red, green, and blue quantums. +specified percent opacity for red, green, and blue quantums.- const unsigned int opacity_, const Color -&penColor_ -Colorize image with pen color, using -specified percent opacity. ++ +colorMatrix +const size_t order_, const double *color_matrix_ +apply color correction to the image. - + - comment const string &comment_ +const std::string &comment_ Comment image (add comment string to image). By default, each image is commented with its file name. -Use this method to assign a specific comment to the -image. Optionally you can include the image filename, type, -width, height, or other image attributes by embedding special format characters. - compare
const Image &reference_ -
Compare current image with -another image. Sets meanErrorPerPixel , normalizedMaxError , and Compare current image with +another image. Sets meanErrorPerPixel +, normalizedMaxError , and normalizedMeanError in the current -image. False is returned if the images are identical. An ErrorOption -exception is thrown if the reference image columns, rows, colorspace, or +image. False is returned if the images are identical. An ErrorOption +exception is thrown if the reference image columns, rows, colorspace, +or matte differ from the current image.
- + composite const Image -&compositeImage_, int xOffset_, int yOffset_, CompositeOperator compose_ = InCompositeOp Compose an image onto the current image at -offset specified by xOffset_, yOffset_ using the -composition algorithm specified by compose_. +offset specified by xOffset_, yOffset_ using the +composition algorithm specified by compose_.const Image @@ -534,7 +602,7 @@ composition algorithm specified by compose_. &offset_, CompositeOperator compose_ = InCompositeOpCompose an image onto the current image at -offset specified by offset_ using the composition algorithm +offset specified by offset_ using the composition algorithm specified by compose_ . @@ -543,30 +611,31 @@ specified by compose_ . gravity_, CompositeOperator compose_ = InCompositeOp Compose an image onto the current image with -placement specified by gravity_ using the composition algorithm +placement specified by gravity_ using the composition +algorithm specified by compose_. - + - contrast unsigned int sharpen_ +size_t sharpen_ Contrast image (enhance intensity differences in image) - + - convolve unsigned int order_, const double *kernel_ +size_t order_, const double *kernel_ Convolve image. Applies a user-specfied convolution to the image. The order_ parameter represents the -number of columns and rows in the filter kernel, and kernel_ -is a two-dimensional array of doubles representing the convolution +number of columns and rows in the filter kernel, and kernel_ +is a two-dimensional array of doubles representing the convolution kernel to apply. - + crop const Geometry @@ -574,32 +643,40 @@ kernel to apply. Crop image (subregion of original image) - + cycleColormap int amount_ Cycle image colormap - + despeckle void Despeckle image (reduce speckle noise) - + display void Display image on screen.
Caution: if -an image format is not compatible with the display visual (e.g. -JPEG on a colormapped display) then the original image will be +an image format is is not compatible with the display visual (e.g. +JPEG on a colormapped display) then the original image will be altered. Use a copy of the original if this is a problem.- ++ + +distort +const DistortImageMethod method, const unsigned long number_arguments, const double *arguments, const bool bestfit = false +Distort image. Applies a user-specfied +distortion to the image. ++ draw const Drawable @@ -611,45 +688,45 @@ altered. Use a copy of the original if this is a problem. > &drawable_Draw shapes or text on image using a set of Drawable objects contained in an STL list. Use of this method improves -drawing performance and allows batching draw objects together in a +drawing performance and allows batching draw objects together in a list for repeated use. - + - edge unsigned int radius_ = 0.0 +size_t radius_ = 0.0 Edge image (hilight edges in image). -The radius is the radius of the pixel neighborhood.. Specify a radius -of zero for automatic radius selection. +The radius is the radius of the pixel neighborhood.. Specify a radius +of zero for automatic radius selection.- + emboss const double radius_ = 1, const double sigma_ = 0.5 Emboss image (hilight edges with 3D effect). The radius_ parameter specifies the radius of the Gaussian, in -pixels, not counting the center pixel. The sigma_ -parameter specifies the standard deviation of the Laplacian, in pixels. +pixels, not counting the center pixel. The sigma_ +parameter specifies the standard deviation of the Laplacian, in pixels.- + enhance void Enhance image (minimize noise) - + equalize void Equalize image (histogram equalization) - + erase void @@ -657,7 +734,27 @@ parameter specifies the standard deviation of the Laplacian, in pixels.< background color.- ++ + +extent const Geometry &geometry_ +extends the image as defined by the geometry, gravity, and image background color. ++ +const Geometry +&geometry_, const Color &backgroundColor_ ++ +const Geometry &geometry_, const GravityType +&gravity_ +extends the image as defined by the geometry, gravity, and image background color. ++ +const Geometry +&geometry_, const Color &backgroundColor_, +const GravityType &gravity_ ++ flip void @@ -665,69 +762,75 @@ background color. vertical direction)- - floodFill-
++ -floodFill- +
Colorunsigned int x_, unsigned int y_, const size_t x_, size_t y_, const Color &fillColor_ Flood-fill color across pixels -that match the color of the target pixel and are neighbors of the -target pixel. Uses current fuzz setting when determining color match. +that match the color of the target pixel and are neighbors of the +target pixel. Uses current fuzz setting when determining color match.const Geometry &point_, const Color &fillColor_ - unsigned int x_, unsigned int y_, const Color &fillColor_, const Color + size_t x_, size_t y_, const Color &fillColor_, const Color &borderColor_ Flood-fill color across pixels starting at target-pixel and stopping at pixels matching specified -border color. Uses current fuzz setting when determining color match. +border color. Uses current fuzz setting when determining color match.const Geometry -&point_, const Color &fillColor_, const Color &borderColor_ +&point_, const Color &fillColor_, +const Color &borderColor_- floodFillOpacity +floodFillOpacity const long x_, const long y_, const unsigned -int opacity_, const PaintMethod method_ +int opacity_, const PaintMethod method_Floodfill pixels matching color (within fuzz -factor) of target pixel(x,y) with replacement opacity value using method. +factor) of target pixel(x,y) with replacement opacity value using +method.- - floodFill-
++ -floodFill- +
Textureunsigned int x_, unsigned int y_, const + size_t x_, size_t y_, const Image &texture_ Flood-fill texture across pixels -that match the color of the target pixel and are neighbors of the -target pixel. Uses current fuzz setting when determining color match. +that match the color of the target pixel and are neighbors of the +target pixel. Uses current fuzz setting when determining color match.const Geometry &point_, const Image &texture_ - unsigned int x_, unsigned int y_, const Image + size_t x_, size_t y_, const Image &texture_, const Color &borderColor_ Flood-fill texture across pixels starting at target-pixel and stopping at pixels matching specified -border color. Uses current fuzz setting when determining color match. +border color. Uses current fuzz setting when determining color match.const Geometry -&point_, const Image &texture_, const Color +&point_, const Image &texture_, const +Color &borderColor_ - + flop void @@ -735,7 +838,14 @@ border color. Uses current fuzz setting when determining color match.- ++ + +forwardFourierTransform +const bool magnitude +Implements the discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair. ++ frame const Geometry @@ -743,11 +853,19 @@ horizontal direction) Add decorative frame around image - +unsigned int width_, unsigned int height_, -int x_, int y_, int innerBevel_ = 0, int outerBevel_ = 0 +size_t width_, size_t height_, +int x_, ssize_t y_, ssize_t innerBevel_ = 0, ssize_t outerBevel_ = 0 ++ + +fx +const std::string expression, const Magick::ChannelType channel +Fx image. Applies a mathematical +expression to the image. - + gamma double gamma_ @@ -761,34 +879,67 @@ gammaBlue_ of image.- + gaussianBlur const double width_, const double sigma_ Gaussian blur image. The number of neighbor pixels to be included in the convolution mask is specified by -'width_'. For example, a width of one gives a (standard) 3x3 -convolution mask. The standard deviation of the gaussian bell curve is +'width_'. For example, a width of one gives a (standard) 3x3 +convolution mask. The standard deviation of the gaussian bell curve is specified by 'sigma_'. - ++ gaussianBlurChannel +
+const ChannelType +channel_, const double radius_ = 0.0, const double sigma_ = 1.0 +
+Gaussian blur +an image channel. The channel_ parameter specifies the +channel to blur. The number of neighbor +pixels to be included in the convolution mask is specified by +'width_'. For example, a width of one gives a (standard) 3x3 +convolution mask. The standard deviation of the gaussian bell curve is +specified by 'sigma_'. ++ +haldClut +
+const Image &reference_ +
+apply a Hald color lookup table to the image. +
++ implode const double factor_ Implode image (special effect) - ++ + +inverseFourierTransform +const Image &phaseImage_, const bool magnitude_ +implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair. ++ @@ -808,19 +959,19 @@ Colors darker than the black point are set to zero. Mid point (gamma) specifies a gamma correction to apply to the image. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value. The black and -white point have the valid range 0 to QuantumRange while mid (gamma) has a +white point have the valid range 0 to MaxRGB while mid (gamma) has a useful range of 0 to ten.label const string &label_ Assign a label to an image. Use this option to assign a specific label to the image. Optionally -you can include the image filename, type, width, height, or scene -number in the label by embedding -special format characters. If the first character of string is @, the -image label is read from a file titled by the remaining characters in +you can include the image filename, type, width, height, or scene +number in the label by embedding +special format characters. If the first character of string is @, +the +image label is read from a file titled by the remaining characters in the string. When converting to Postscript, use this option to specify a header string to print above the image.
- levelChannel -
const ChannelType + const ChannelType channel, const double black_point, const double white_point, const double mid_point=1.0 -
Level image channel. + Level image channel. Adjust the levels of the image channel by scaling the values falling between specified white and black points to the full available quantum range. The parameters provided represent the black, mid (gamma), and @@ -829,131 +980,153 @@ Colors darker than the black point are set to zero. Mid point (gamma) specifies a gamma correction to apply to the image. White point specifies the lightest color in the image. Colors brighter than the white point are set to the maximum quantum value. The black and white -point have the valid range 0 to QuantumRange while mid (gamma) has a useful +point have the valid range 0 to MaxRGB while mid (gamma) has a useful range of 0 to ten.
- + magnify void Magnify image by integral size - + map const Image &mapImage_ , bool dither_ = false Remap image colors with closest color from -reference image. Set dither_ to true in to apply Floyd/Steinberg -error diffusion to the image. By default, color reduction chooses an -optimal set of colors that best represent the original +reference image. Set dither_ to true in to apply +Floyd/Steinberg +error diffusion to the image. By default, color reduction chooses an +optimal set of colors that best represent the original image. Alternatively, you can choose a -particular set of colors from an image file +particular set of colors from an image file with this option. - + matteFloodfill const Color -&target_, const unsigned int opacity_, const int x_, const int +&target_, const size_t opacity_, const ssize_t x_, const +int y_, PaintMethod method_ Floodfill designated area with a replacement opacity value. - medianFilter +medianFilter const double radius_ = 0.0 Filter image by replacing each pixel -component with the median color in a circular neighborhood +component with the median color in a circular neighborhood- + minify void Reduce image by integral size - modifyImage +modifyImage void Prepare to update image. Ensures that there -is only one reference to the underlying image so that the underlying -image may be safely modified without effecting previous generations of -the image. Copies the underlying image to a new image if necessary. +is only one reference to the underlying image so that the underlying +image may be safely modified without effecting previous generations of +the image. Copies the underlying image to a new image if necessary.- + modulate double brightness_, double saturation_, double hue_ Modulate percent hue, saturation, and -brightness of an image. Modulation of saturation and brightness is as a +brightness of an image. Modulation of saturation and brightness is as a ratio of the current value (1.0 for no change). Modulation of hue is an absolute rotation of -180 degrees to +180 degrees from the current position corresponding to an argument range of 0 to 2.0 (1.0 for no change). - ++ motionBlur +
+const double radius_, +const double sigma_, const double angle_ +
+Motion blur image with +specified blur factor. The radius_ parameter specifies the radius of +the Gaussian, in pixels, not counting the center pixel. The +sigma_ parameter specifies the standard deviation of the Laplacian, in +pixels. The angle_ parameter specifies the angle the object appears to +be comming from (zero degrees is from the right). +
++ negate bool grayscale_ = false Negate colors in image. Replace every -pixel with its complementary color (white becomes black, yellow becomes -blue, etc.). Set grayscale to only negate grayscale values in +pixel with its complementary color (white becomes black, yellow becomes +blue, etc.). Set grayscale to only negate grayscale values in image. - + normalize void Normalize image (increase contrast by -normalizing the pixel values to span the full range of color values). +normalizing the pixel values to span the full range of color values).- + - oilPaint unsigned int radius_ = 3 +size_t radius_ = 3 Oilpaint image (image looks like oil painting) - + - opacity unsigned int opacity_ +size_t opacity_ Set or attenuate the opacity channel in the -image. If the image pixels are opaque then they are set to the specified +image. If the image pixels are opaque then they are set to the +specified opacity value, otherwise they are blended with the supplied opacity -value. The value of opacity_ ranges from 0 (completely opaque) to QuantumRange +value. The value of opacity_ ranges from 0 (completely opaque) to + MaxRGB . The defines OpaqueOpacity and TransparentOpacity are available to specify completely opaque or completely transparent, respectively. - + opaque const Color &opaqueColor_, const Color &penColor_ Change color of pixels matching opaqueColor_ -to specified penColor_. +to specified penColor_.- @@ -961,14 +1134,15 @@ valid after calling ping.+ ping const std::string &imageSpec_ Ping is similar to read except only enough of the image is read to determine the image columns, -rows, and filesize. The columns , rows , and fileSize +rows, and filesize. The columns , + rows , and fileSize attributes are valid after invoking ping. The image data is not valid after calling ping. const Blob &blob_ - process
std::string name_, -const int argc_, char **argv_
+const ssize_t argc_, char **argv_
Execute the named -process module, passing any arguments via an argument vector, with argc_ +process module, passing any arguments via an argument vector, with +argc_ specifying the number of arguments in the vector, and argv_ passing the address of an array of null-terminated C strings which constitute the argument vector. An exception is thrown if the requested process module @@ -976,7 +1150,7 @@ does not exist, fails to load, or fails during execution.
- + quantize bool measureError_ = false @@ -984,16 +1158,16 @@ does not exist, fails to load, or fails during execution.
measureError_ to true in order to calculate error attributes.- + raise const Geometry &geometry_ = "6x6+0+0", bool raisedFlag_ = false Raise image (lighten or darken the edges of -an image to give a 3-D raised or lowered effect) +an image to give a 3-D raised or lowered effect)- + read const string &imageSpec_ @@ -1003,23 +1177,24 @@ an image to give a 3-D raised or lowered effect)const Geometry &size_, const std::string &imageSpec_ Read image of specified size into current -object. This form is useful for images that do not specifiy their size -or to specify a size hint for decoding an image. For example, when -reading a Photo CD, JBIG, or JPEG image, a size request causes the -library to return an image which is the next resolution greater or -equal to the specified size. This may result in memory and time savings. +object. This form is useful for images that do not specifiy their size +or to specify a size hint for decoding an image. For example, when +reading a Photo CD, JBIG, or JPEG image, a size request causes the +library to return an image which is the next resolution greater or +equal to the specified size. This may result in memory and time savings.const Blob &blob_ Read encoded image of specified -size from an in-memory BLOB into current -object. Depending on the method arguments, the Blob size, depth, and -format may also be specified. Some image formats require that size be +size from an in-memory BLOB into current +object. Depending on the method arguments, the Blob size, depth, and +format may also be specified. Some image formats require that size be specified. The default ImageMagick uses for depth depends on its Quantum size (8 or 16). If ImageMagick's Quantum size does not match that of the image, the depth may need to be specified. -ImageMagick can usually automatically detect the image's format. When -a format can't be automatically detected, the format must be specified. +ImageMagick can usually automagically detect the image's format. +When +a format can't be automagically detected, the format must be specified.const Blob @@ -1028,7 +1203,7 @@ a format can't be automatically detected, the format must be specified. const Blob &blob_, const Geometry &size_, -unsigned int depth_ +size_t depth_const Blob @@ -1037,19 +1212,20 @@ unsigned short depth_, const string &magick_ const Blob -&blob_, const Geometry &size_, const +&blob_, const Geometry &size_, +const string &magick_ - const unsigned int width_, const unsigned int -height_, std::string map_, const StorageType type_, const unsigned char* pixels_ +const size_t width_, const size_t +height_, std::string map_, const StorageType type_, const void *pixels_ Read image based on an array of image pixels. -The pixel data must be in scanline order top-to-bottom. The data can be +The pixel data must be in scanline order top-to-bottom. The data can be character, short int, integer, float, or double. Float and double -require the pixels to be normalized [0..1]. The other types are -[0..QuantumRange]. For example, to create a 640x480 image from +require the pixels to be normalized [0..1]. The other types are +[0..MaxRGB]. For example, to create a 640x480 image from unsigned red-green-blue character data, use - image.read( 640, 480, "RGB", 0, +
image.read( 640, 480, "RGB", CharPixel, pixels );
The parameters are as follows:
@@ -1066,20 +1242,20 @@ pixels );map_ This character string can be any -combination or order of R = red, G = green, B = blue, A = alpha, C = -cyan, Y = yellow M = magenta, and K = black. The ordering reflects the -order of the pixels in the supplied pixel array. +combination or order of R = red, G = green, B = blue, A = alpha, C = +cyan, Y = yellow M = magenta, and K = black. The ordering reflects the +order of the pixels in the supplied pixel array.type_ Pixel storage type (CharPixel, -ShortPixel, IntegerPixel, FloatPixel, or DoublePixel) +ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)@@ -1088,26 +1264,51 @@ values and type_ parameters. pixels_ This array of values contain the pixel -components as defined by the map_ and type_ parameters. The length of -the arrays must equal the area specified by the width_ and height_ +components as defined by the map_ and type_ parameters. The length of +the arrays must equal the area specified by the width_ and height_ values and type_ parameters. - + - reduceNoise void -Reduce noise in image using a -noise peak elimination filter. +const double order_ +reduce noise in image using a noise peak elimination filter. - unsigned int order_ +randomThreshold +
+const Geometry +&thresholds_ +
+Random threshold the +image. Changes the value of individual pixels based on the intensity of +each pixel compared to a random threshold. The result is a +low-contrast, two color image. The thresholds_ argument is a +geometry containing LOWxHIGH thresholds. If the string contains +2x2, 3x3, or 4x4, then an ordered dither of order 2, 3, or 4 will be +performed instead. This is a very fast alternative to 'quantize' based +dithering.
+- ++ randomThresholdChannel +
+const Geometry +&thresholds_, const ChannelType channel_ +
+Random threshold an +image channel. Similar to randomThreshold() +but restricted to the specified channel. +
++ - roll int columns_, int rows_ +int columns_, ssize_t rows_ Roll image (rolls image vertically and horizontally) by specified number of columnms and rows) - + rotate double degrees_ @@ -1115,7 +1316,7 @@ horizontally) by specified number of columnms and rows) number of degrees.- + sample const Geometry @@ -1123,7 +1324,7 @@ number of degrees. Resize image by using pixel sampling algorithm - + scale const Geometry @@ -1131,35 +1332,40 @@ number of degrees. Resize image by using simple ratio algorithm - + segment double clusterThreshold_ = 1.0,
double smoothingThreshold_ = 1.5Segment (coalesce similar image components) -by analyzing the histograms of the color components and identifying -units that are homogeneous with the fuzzy c-means technique. Also uses quantizeColorSpace -and verbose image attributes. Specify clusterThreshold_ , -as the number of pixels each cluster must exceed +by analyzing the histograms of the color components and identifying +units that are homogeneous with the fuzzy c-means technique. Also uses quantizeColorSpace +and verbose image attributes. Specify clusterThreshold_ +, +as the number of pixels each cluster must +exceed the cluster threshold to be considered valid. SmoothingThreshold_ -eliminates noise in the second derivative of the histogram. As the +eliminates noise in the second derivative of the histogram. As +the value is increased, you can expect a smoother second derivative. The default is 1.5. - + - shade double azimuth_ = 30, double elevation_ = 30,
+double azimuth_ = 30, double elevation_ = 30, +
bool colorShading_ = falseShade image using distant light source. Specify azimuth_ and elevation_ as the -position of the light source. By default, the shading -results as a grayscale image.. Set colorShading_ to true to -shade the red, green, and blue components of the image. +position of the light source. By default, the shading +results as a grayscale image.. Set colorShading_ to true +to +shade the red, green, and blue components of the image.- + sharpen const double radius_ = 1, const double sigma_ @@ -1170,31 +1376,46 @@ the center pixel. The sigma_ parameter specifies the standard deviation of the Laplacian, in pixels. - ++ sharpenChannel +
+const ChannelType +channel_, const double radius_ = 0.0, const double sigma_ = 1.0 +
+Sharpen pixel +quantums in an image channel The channel_ parameter specifies the +channel to sharpen.. The radius_ +parameter specifies the radius of the Gaussian, in pixels, not counting +the center pixel. The sigma_ parameter specifies the +standard deviation of the Laplacian, in pixels. ++ shave const Geometry &geometry_ Shave pixels from image edges. - + shear double xShearAngle_, double yShearAngle_ Shear image (create parallelogram by sliding image by X or Y axis). Shearing slides one edge of an image along -the X or Y axis, creating a -parallelogram. An X direction shear slides an edge along the X -axis, while a Y direction shear slides -an edge along the Y axis. The amount of the shear is controlled -by a shear angle. For X direction shears, x +the X or Y axis, creating a +parallelogram. An X direction shear slides an edge along the X +axis, while a Y direction shear slides +an edge along the Y axis. The amount of the shear is controlled +by a shear angle. For X direction shears, x degrees is measured relative to the Y axis, and similarly, for Y direction shears y degrees is measured relative to the X axis. Empty triangles left over from shearing the image are filled with the color defined as borderColor. - + solarize double factor_ = 50.0 @@ -1202,23 +1423,45 @@ filled with the color defined as borderColor.&nbs exposing a photographic film to light during the development process)- ++ + +splice +const Geometry +&geometry_ +splice the background color into the image ++ - spread unsigned int amount_ = 3 +size_t amount_ = 3 Spread pixels randomly within image by specified amount - + stegano const Image &watermark_ Add a digital watermark to the image (based -on second image) +on second image)+ + +sparseColor +const ChannelType channel, const SparseColorMethod method, const unsigned long number_arguments, const double *arguments +Sparse color image, given a set of coordinates, interpolates the colors found at those coordinates, across the whole image, using various methods. ++ ++ +statistics +ImageStatistics *statistics +Obtain image statistics. Statistics are normalized to the range of 0.0 to 1.0 and are output to the specified ImageStatistics structure. The structure includes members maximum, minimum, mean, standard_deviation, and variance for each of these channels: red, green, blue, and opacity (e.g. statistics->red.maximum). ++ stereo const Image &rightImage_ @@ -1226,7 +1469,7 @@ on second image) viewed with red-blue glasses (Red image on left, blue on right)- + swirl double degrees_ @@ -1234,7 +1477,7 @@ viewed with red-blue glasses (Red image on left, blue on right) degrees)- + texture const Image &texture_ @@ -1242,20 +1485,20 @@ degrees) background color.- + threshold double threshold_ Threshold image - + transform const Geometry &imageGeometry_ Transform image based on image -and crop geometries. Crop geometry is optional. +and crop geometries. Crop geometry is optional.const Geometry @@ -1263,16 +1506,16 @@ and crop geometries. Crop geometry is optional. &cropGeometry_- + transparent const Color &color_ Add matte image to image, setting pixels -matching color to transparent. +matching color to transparent.- + trim void @@ -1280,23 +1523,43 @@ matching color to transparent. the image.- + unsharpmask double radius_, double sigma_, double -amount_, double threshold_ -Replace image with a sharpened version of the -original image using the unsharp mask algorithm. The radius_ -parameter specifies the radius of the Gaussian, in pixels, not +amount_, double threshold_ +Sharpen the image using the unsharp mask +algorithm. The radius_ +parameter specifies the radius of the Gaussian, in pixels, not counting the center pixel. The sigma_ parameter specifies the -standard deviation of the Gaussian, in pixels. The amount_ -parameter specifies the percentage of the difference between the +standard deviation of the Gaussian, in pixels. The amount_ +parameter specifies the percentage of the difference between the original and the blur image that is added back into the original. The threshold_ -parameter specifies the threshold in pixels needed to apply the +parameter specifies the threshold in pixels needed to apply the diffence amount. - ++ unsharpmaskChannel +
+const ChannelType +channel_, const double radius_, const double sigma_, const double +amount_, const double threshold_ +
+Sharpen an image +channel using the unsharp mask algorithm. The channel_ parameter specifies the +channel to sharpen. The radius_ +parameter specifies the radius of the Gaussian, in pixels, not +counting the center pixel. The sigma_ parameter specifies the +standard deviation of the Gaussian, in pixels. The amount_ +parameter specifies the percentage of the difference between the +original and the blur image that is added back into the original. The threshold_ +parameter specifies the threshold in pixels needed to apply the +diffence amount. ++ wave double amplitude_ = 25.0, double wavelength_ @@ -1304,29 +1567,29 @@ diffence amount. Alter an image along a sine wave. - + write const string &imageSpec_ Write image to a file using filename imageSpec_ .
Caution: if -an image format is selected which is capable of supporting fewer -colors than the original image or quantization has been requested, the -original image will be quantized to fewer colors. Use a copy of the +an image format is selected which is capable of supporting fewer +colors than the original image or quantization has been requested, the +original image will be quantized to fewer colors. Use a copy of the original if this is a problem.Blob *blob_ Write image to a in-memory BLOB stored in blob_. The magick_ -parameter specifies the image format to write (defaults to magick ). The depth_ parameter species the image depth (defaults to depth ).
Caution: if -an image format is selected which is capable of supporting fewer -colors than the original image or quantization has been requested, the -original image will be quantized to fewer colors. Use a copy of the +an image format is selected which is capable of supporting fewer +colors than the original image or quantization has been requested, the +original image will be quantized to fewer colors. Use a copy of the original if this is a problem.@@ -1335,18 +1598,19 @@ std::string &magick_ Blob *blob_, -std::string &magick_, unsigned int depth_ +std::string &magick_, size_t depth_- const int x_, const int y_, const unsigned -int columns_, const unsigned int rows_, const std::string &map_, -const StorageType type_, unsigned char* pixels_ +const ssize_t x_, const ssize_t y_, const unsigned +int columns_, const size_t rows_, const std::string &map_, +const StorageType type_, void *pixels_ Write pixel data into a buffer you supply. -The data is saved either as char, short int, integer, float or double -format in the order specified by the type_ parameter. For example, we +The data is saved either as char, short int, integer, float or double +format in the order specified by the type_ parameter. For example, we want to extract scanline 1 of a 640x480 image as character data in red-green-blue order: - image.write(0,0,640,1,"RGB",0,pixels);
+image.write(0,0,640,1,"RGB",0,pixels); +
The parameters are as follows:
@@ -1354,12 +1618,12 @@ red-green-blue order:
x_ Horizontal ordinate of left-most -coordinate of region to extract. +coordinate of region to extract.y_ Vertical ordinate of top-most -coordinate of region to extract. +coordinate of region to extract.columns_ @@ -1374,20 +1638,20 @@ extract.map_ This character string can be any -combination or order of R = red, G = green, B = blue, A = alpha, C = -cyan, Y = yellow, M = magenta, and K = black. The ordering reflects -the order of the pixels in the supplied pixel array. +combination or order of R = red, G = green, B = blue, A = alpha, C = +cyan, Y = yellow, M = magenta, and K = black. The ordering reflects +the order of the pixels in the supplied pixel array.type_ Pixel storage type (CharPixel, -ShortPixel, IntegerPixel, FloatPixel, or DoublePixel) +ShortPixel, IntegerPixel, FloatPixel, or DoublePixel)@@ -1396,7 +1660,7 @@ values and type_ parameters. pixels_ This array of values contain the pixel -components as defined by the map_ and type_ parameters. The length of -the arrays must equal the area specified by the width_ and height_ +components as defined by the map_ and type_ parameters. The length of +the arrays must equal the area specified by the width_ and height_ values and type_ parameters. - + zoom const Geometry @@ -1419,7 +1683,8 @@ code: string filename("file.tiff");@@ -1462,31 +1727,33 @@ obtain them are shown in the following table:
Image image;
image.read(filename);
- image.resolutionUnits(PixelsPerInchResolution);
+ image.resolutionUnits(PixelsPerInchResolution); +
image.density(Geometry(150,150)); // could also use image.density("150x150")
image.write(filename)
void bool flag_ Control antialiasing of rendered Postscript -and Postscript or TrueType fonts. Enabled by default. +and Postscript or TrueType fonts. Enabled by default.- -animation-
+animation- +
Delayunsigned int (0 to 65535) +size_t (0 to 65535) void -unsigned int delay_ +size_t delay_ Time in 1/100ths of a second (0 to 65535) -which must expire before displaying the next image in an animated -sequence. This option is useful for regulating the animation of a -sequence of GIF images within Netscape. +which must expire before displaying the next image in an animated +sequence. This option is useful for regulating the animation of a +sequence of GIF images within Netscape.- -animation-
+animation- +
Iterationsunsigned int +size_t void -unsigned int iterations_ +size_t iterations_ Number of iterations to loop an animation -(e.g. Netscape loop extension) for. +(e.g. Netscape loop extension) for.image attribute. Any number of named attributes may be attached to the image. For example, the image comment is a named image attribute with the name "comment". EXIF tags are attached to the image as named -attributes. Use the syntax "[EXIF:<tag>]" to request an EXIF tag -similar to "[EXIF:DateTime]".
+attributes. Use the syntax "EXIF:<tag>" to request an EXIF tag +similar to "EXIF:DateTime".
- background-
+background- +
ColorColor @@ -1520,20 +1788,21 @@ similar to "[EXIF:DateTime]".
- background-
+background- +
Texturestring void const string &texture_ Image file name to use as the background -texture. Does not modify image pixels. +texture. Does not modify image pixels.- baseColumns unsigned int +size_t void Base image width (before transformations) @@ -1551,7 +1820,7 @@ texture. Does not modify image pixels.- baseRows unsigned int +size_t void Base image height (before transformations) @@ -1572,8 +1841,8 @@ texture. Does not modify image pixels.void Return smallest bounding box enclosing -non-border pixels. The current fuzz value is used when discriminating -between pixels. This is the crop bounding box used by +non-border pixels. The current fuzz value is used when discriminating +between pixels. This is the crop bounding box used by crop(Geometry(0,0)). @@ -1589,12 +1858,12 @@ on. cacheThreshold -unsigned int +size_t const int Pixel cache threshold in megabytes. Once this threshold is exceeded, all subsequent pixels cache operations are -to/from disk. This is a static method and the attribute it sets is +to/from disk. This is a static method and the attribute it sets is shared by all Image objects. @@ -1608,12 +1877,15 @@ int
ChannelType channel_
const ChannelType -channel_, const unsigned int depth_
+channel_, const size_t depth_
Channel modulus depth. -The channel modulus depth represents the minimum number of bits required -to support the channel without loss. Setting the channel's modulus depth -modifies the channel (i.e. discards resolution) if the requested modulus +The channel modulus depth represents the minimum number of bits +required +to support the channel without loss. Setting the channel's modulus +depth +modifies the channel (i.e. discards resolution) if the requested +modulus depth is less than the current modulus depth, otherwise the channel is not altered. There is no attribute associated with the modulus depth so the current modulus depth is obtained by inspecting the pixels. As a @@ -1624,7 +1896,8 @@ channel depth.
- chroma-
+chroma- +
BluePrimarydouble x & y @@ -1635,7 +1908,8 @@ y=0.06)- chroma-
+chroma- +
GreenPrimarydouble x & y @@ -1646,7 +1920,8 @@ y=0.6)- chroma-
+chroma- +
RedPrimarydouble x & y @@ -1657,7 +1932,8 @@ y=0.33)- chroma-
+chroma- +
WhitePointdouble x & y @@ -1670,13 +1946,14 @@ y=0.329)- classType ClassType +ClassType + void ClassType class_ Image storage class. Note that -conversion from a DirectClass image to a PseudoClass image may result -in a loss of color due to the limited size of the palette (256 or +conversion from a DirectClass image to a PseudoClass image may result +in a loss of color due to the limited size of the palette (256 or 65535 colors). @@ -1688,9 +1965,9 @@ in a loss of color due to the limited size of the palette (256 or const Image &clipMask_ Associate a clip mask image with the current image. The clip mask image must have the same dimensions as the current -image or an exception is thrown. Clipping occurs wherever pixels are -transparent in the clip mask image. Clipping Pass an invalid image to -unset an existing clip mask. +image or an exception is thrown. Clipping occurs wherever pixels are +transparent in the clip mask image. Clipping Pass an invalid image to +unset an existing clip mask.@@ -1701,16 +1978,16 @@ unset an existing clip mask. double fuzz_ Colors within this distance are considered equal. A number of algorithms search for a target color. By -default the color must be exact. Use this option to match colors that -are close to the target color in RGB space. +default the color must be exact. Use this option to match colors that +are close to the target color in RGB space.@@ -1719,14 +1996,15 @@ are close to the target color in RGB space. - colorMap Color -unsigned int index_ -unsigned int index_, const size_t index_ +size_t index_, const Color &color_ Color at colormap index. unsigned int
+size_t
void -
unsigned int entries_
+size_t entries_
Number of entries in the -colormap. Setting the colormap size may extend or truncate the colormap. +colormap. Setting the colormap size may extend or truncate the +colormap. The maximum number of supported entries is specified by the MaxColormapSizeconstant, and is dependent on the value of QuantumDepth when ImageMagick is compiled. An exception is thrown if more entries are requested than may @@ -1744,14 +2022,14 @@ colorSpace_ ColorspaceType colorSpace_ The colorspace (e.g. CMYK) used to represent -the image pixel colors. Image pixels are always stored as RGB(A) except -for the case of CMY(K). +the image pixel colors. Image pixels are always stored as RGB(A) except +for the case of CMY(K).- columns unsigned int +size_t void Image width @@ -1769,7 +2047,8 @@ for the case of CMY(K).- compose CompositeOperator +CompositeOperator + void CompositeOperator @@ -1779,10 +2058,12 @@ composition is implicitly used (such as for image flattening). - -compress-
+compress- +
TypeCompressionType +CompressionType + void CompressionType @@ -1798,7 +2079,7 @@ compression type of the specified image file. void bool flag_ Enable printing of internal debug messages -from ImageMagick as it executes. +from ImageMagick as it executes.
Set or obtain a definition flag to applied when encoding or decoding the specified format.. Similar to the defineValue() method except that -passing the flag_ value 'true' +passing the flag_ value +'true' creates a value-less define with that format and key. Passing the flag_ value 'false' removes any existing matching definition. The method @@ -1856,18 +2138,18 @@ exists.
const Geometry &density_ Vertical and horizontal resolution in pixels -of the image. This option specifies an image density when decoding a +of the image. This option specifies an image density when decoding a Postscript or Portable Document page. Often used with psPageSize. @@ -1875,7 +2157,8 @@ ImageMagick is compiled with. - depth unsigned int (8, 16, or 32) +size_t (8-32) void -unsigned int depth_ +size_t depth_ Image depth. Used to specify the bit depth -when reading or writing raw images or when the output format +when reading or writing raw images or when the output format supports multiple depths. Defaults to the quantum depth that ImageMagick is compiled with. - endian EndianType +EndianType + void EndianType endian_ @@ -1891,6 +2174,15 @@ which support it.Tile names from within an image montage ++ + +file +FILE * +FILE * +FILE *file_ +Image file descriptor. +@@ -1960,17 +2254,17 @@ images. fileName @@ -1932,7 +2224,8 @@ objects.- fillRule FillRule +FillRule + void const Magick::FillRule &fillRule_ Rule to use when filling drawn objects. @@ -1941,13 +2234,14 @@ objects.- filterType FilterTypes +FilterTypes + void FilterTypes filterType_ Filter to use when resizing image. The -reduction filter employed has a sigificant effect on the time required -to resize an image and the resulting quality. The default filter is Lanczos +reduction filter employed has a sigificant effect on the time required +to resize an image and the resulting quality. The default filter is Lanczos which has been shown to produce high quality results when reducing most images. const string &font_ Text rendering font. If the font is a fully qualified X server font name, the font is obtained from an X -server. To use a TrueType font, precede the TrueType filename with an -@. Otherwise, specify a Postscript font name (e.g. +server. To use a TrueType font, precede the TrueType filename with an +@. Otherwise, specify a Postscript font name (e.g. "helvetica"). - fontPointsize unsigned int +size_t void -unsigned int pointSize_ +size_t pointSize_ Text rendering font point size @@ -2002,9 +2296,9 @@ specified text, and current font and void Gamma level of the image. The same color -image displayed on two different workstations may -look different due to differences in the display monitor. -Use gamma correction to adjust for this +image displayed on two different workstations may +look different due to differences in the display monitor. +Use gamma correction to adjust for this color difference. @@ -2018,19 +2312,21 @@ color difference. - -gifDispose-
+gifDispose- +
Methodunsigned int
+size_t + 3 = Overwrite graphic with background color, +
{ 0 = Disposal not specified,
1 = Do not dispose of graphic,
- 3 = Overwrite graphic with background color,
- 4 = Overwrite graphic with previous graphic. }
+ 4 = Overwrite graphic with previous graphic. }void -unsigned int disposeMethod_ +size_t disposeMethod_ GIF disposal method. This option is used to control how successive frames are rendered (how the preceding frame is -disposed of) when creating a GIF animation. +disposed of) when creating a GIF animation.@@ -2042,16 +2338,18 @@ disposed of) when creating a GIF animation. &colorProfile_ICC color profile. Supplied via a Blob since Magick++/ and ImageMagick do not -currently support formating this data structure directly. +currently support formating this data structure directly. Specifications are available from the International Color Consortium for the format of ICC color profiles. - -interlace-
+interlace- +
TypeInterlaceType +InterlaceType + void InterlaceType interlace_ @@ -2061,9 +2359,10 @@ scheme for raw image formats such as RGB or YUV. NoInterlac means do not interlace, LineInterlace uses scanline interlacing, and PlaneInterlace uses plane interlacing. PartitionInterlace is like PlaneInterlace except the -different planes are saved to individual files (e.g. +different planes are saved to individual files (e.g. image.R, image.G, and image.B). Use LineInterlace or -PlaneInterlace to create an interlaced GIF or progressive JPEG image. +PlaneInterlace to create an interlaced GIF or progressive JPEG +image.@@ -2105,8 +2404,8 @@ International Press Telecommunications Council for IPTC profiles.void @@ -2075,7 +2374,7 @@ PlaneInterlace to create an interlaced GIF or progressive JPEG image. iptcProfile_ IPTC profile. Supplied via a Blob since Magick++ and ImageMagick do not -currently support formating this data structure directly. +currently support formating this data structure directly. Specifications are available from the International Press Telecommunications Council for IPTC profiles. bool matteFlag_ True if the image has transparency. If set -True, store matte channel if the image has one otherwise create -an opaque one. +True, store matte channel if the image has one otherwise create +an opaque one.@@ -2120,15 +2419,16 @@ an opaque one. - meanError-
+meanError- +
PerPixeldouble void The mean error per pixel computed when an -image is color reduced. This parameter is only valid if verbose is set -to true and the image has just been quantized. +image is color reduced. This parameter is only valid if verbose is set +to true and the image has just been quantized.modulus depth (minimum number of bits required to support red/green/blue components without loss of accuracy). The pixel modulus depth may be decreased by supplying a value which is less than the -current value, updating the pixels (reducing accuracy) to the new depth. +current value, updating the pixels (reducing accuracy) to the new +depth. The pixel modulus depth can not be increased over the current value using this method. @@ -2163,7 +2464,8 @@ using this method.
- montage-
+montage- +
GeometryGeometry @@ -2174,27 +2476,29 @@ Only valid for montage images.- normalized-
+normalized- +
MaxErrordouble void The normalized max error per pixel computed -when an image is color reduced. This parameter is only valid if verbose -is set to true and the image has just been quantized. +when an image is color reduced. This parameter is only valid if verbose +is set to true and the image has just been quantized.- normalized-
+normalized- +
MeanErrordouble void The normalized mean error per pixel computed -when an image is color reduced. This parameter is only valid if verbose -is set to true and the image has just been quantized. +when an image is color reduced. This parameter is only valid if verbose +is set to true and the image has just been quantized.void
OrientationType + href="Enumerations.html#OrientationType">OrientationType orientation_ Image orientation. Supported by some file formats such as DPX and TIFF. Useful for @@ -2216,17 +2520,18 @@ turning the right way up.
- packets unsigned int +size_t void - The number of runlength-encoded packets in
+The number of runlength-encoded packets in +
the image@@ -2254,8 +2560,8 @@ image (such as for a scene in an animation) - packetSize unsigned int +size_t void The number of bytes in each pixel packet @@ -2235,17 +2540,18 @@ turning the right way up.
- page Geometry +Geometry + void const Geometry &pageSize_ Preferred size and location of an image canvas. - Use this option to specify the dimensions -and position of the Postscript page in dots per inch or a TEXT page in +
Use this option to specify the dimensions +and position of the Postscript page in dots per inch or a TEXT page in pixels. This option is typically used in concert with density .
-Page may also be used to position a GIF +
Page may also be used to position a GIF image (such as for a scene in an animation)
pixelColor Color -unsigned int x_, unsigned int y_ -unsigned int x_, unsigned int y_, const size_t x_, size_t y_ +size_t x_, size_t y_, const Color &color_ Get/set pixel color at location x & y. @@ -2268,87 +2574,95 @@ image (such as for a scene in an animation)const std::string name_ -
const std::string name_, const Blob + const std::string name_, const Blob &colorProfile_
Get/set/remove a named profile. Valid names include "*", -"8bim", "icm", "iptc", or a user/format-defined profile name.
+"8BIM", "ICM", "IPTC", or a user/format-defined profile name.
- quality unsigned int (0 to 100) +size_t (0 to 100) void -unsigned int quality_ +size_t quality_ JPEG/MIFF/PNG compression level (default 75). - -quantize-
+quantize- +
Colorsunsigned int +size_t void -unsigned int colors_ +size_t colors_ Preferred number of colors in the image. The actual number of colors in the image may be less than your request, but -never more. Images with less unique colors than specified with this -option will have any duplicate or unused colors removed. +never more. Images with less unique colors than specified with this +option will have any duplicate or unused colors removed.- -quantize-
+quantize- +
ColorSpaceColorspaceType +ColorspaceType + void ColorspaceType colorSpace_ Colorspace to quantize colors in (default -RGB). Empirical evidence suggests that distances in color spaces such -as YUV or YIQ correspond to perceptual color differences more closely -than do distances in RGB space. These color spaces may give better +RGB). Empirical evidence suggests that distances in color spaces such +as YUV or YIQ correspond to perceptual color differences more closely +than do distances in RGB space. These color spaces may give better results when color reducing an image. - quantize-
+quantize- +
Ditherbool void bool flag_ Apply Floyd/Steinberg error diffusion to the -image. The basic strategy of dithering is to trade intensity +image. The basic strategy of dithering is to trade +intensity resolution for spatial resolution by -averaging the intensities of several -neighboring pixels. Images which suffer from -severe contouring when reducing colors can be +averaging the intensities of several +neighboring pixels. Images which suffer from +severe contouring when reducing colors can be improved with this option. The quantizeColors or monochrome option must be set for this option to take effect. - -quantize-
+quantize- +
TreeDepthunsigned int +size_t void -unsigned int treeDepth_ +size_t treeDepth_ Depth of the quantization color -classification tree. Values of 0 or 1 allow selection of the optimal -tree depth for the color reduction algorithm. Values between 2 and 8 -may be used to manually adjust the tree depth. +classification tree. Values of 0 or 1 allow selection of the optimal +tree depth for the color reduction algorithm. Values between 2 and 8 +may be used to manually adjust the tree depth.- -rendering-
+rendering- +
IntentRenderingIntent +RenderingIntent + void RenderingIntent render_ @@ -2356,10 +2670,12 @@ render_- - -resolution-
+resolution- +
UnitsResolutionType +ResolutionType + void ResolutionType units_ @@ -2369,27 +2685,18 @@ units_- rows unsigned int +size_t void The number of pixel rows in the image - - -samplingFactor -string (e.g. "2x1,1x1,1x1") -void -const string &samplingFactor_ -JPEG sampling factors -- scene unsigned int +size_t void -unsigned int scene_ +size_t scene_ Image scene number @@ -2411,9 +2718,9 @@ force re-computation of signature. const Geometry &geometry_ Width and height of a raw image (an image -which does not support width and height information). Size may -also be used to affect the image size read from a multi-resolution -format (e.g. Photo CD, JBIG, or JPEG. +which does not support width and height information). Size may +also be used to affect the image size read from a multi-resolution +format (e.g. Photo CD, JBIG, or JPEG.@@ -2438,7 +2745,7 @@ object outlines. - strokeDashOffset unsigned int +size_t void double strokeDashOffset_ While drawing using a dash pattern, specify @@ -2452,12 +2759,12 @@ distance into the dash pattern to start the dash (default 0). void const double* strokeDashArray_ Specify the pattern of dashes and gaps used -to stroke paths. The strokeDashArray represents a zero-terminated -array of numbers that specify the lengths (in pixels) of alternating -dashes and gaps in user units. If an odd number of values is provided, -then the list of values is repeated to yield an even number of -values. A typical strokeDashArray_ array might contain the -members 5 3 2 0, where the zero value indicates the end of the pattern +to stroke paths. The strokeDashArray represents a zero-terminated +array of numbers that specify the lengths (in pixels) of alternating +dashes and gaps in user units. If an odd number of values is provided, +then the list of values is repeated to yield an even number of +values. A typical strokeDashArray_ array might contain the +members 5 3 2 0, where the zero value indicates the end of the pattern array. @@ -2468,8 +2775,8 @@ array. void LineCap lineCap_ Specify the shape to be used at the corners -of paths (or other vector shapes) when they are stroked. Values of -LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. +of paths (or other vector shapes) when they are stroked. Values of +LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.@@ -2479,21 +2786,21 @@ LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. void LineJoin lineJoin_ Specify the shape to be used at the corners -of paths (or other vector shapes) when they are stroked. Values of -LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. +of paths (or other vector shapes) when they are stroked. Values of +LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.- strokeMiterLimit unsigned int +size_t void -unsigned int miterLimit_ +size_t miterLimit_ Specify miter limit. When two line segments -meet at a sharp angle and miter joins have been specified for -'lineJoin', it is possible for the miter to extend far beyond the -thickness of the line stroking the path. The miterLimit' imposes a -limit on the ratio of the miter length to the 'lineWidth'. The default +meet at a sharp angle and miter joins have been specified for +'lineJoin', it is possible for the miter to extend far beyond the +thickness of the line stroking the path. The miterLimit' imposes a +limit on the ratio of the miter length to the 'lineWidth'. The default value of this parameter is 4. @@ -2504,7 +2811,7 @@ value of this parameter is 4. void double strokeWidth_ Stroke width for use when drawing vector -objects (default one) +objects (default one)@@ -2520,18 +2827,18 @@ stroke (outlines). - subImage unsigned int +size_t void -unsigned int subImage_ +size_t subImage_ Subimage of an image sequence - subRange unsigned int +size_t void -unsigned int subRange_ +size_t subRange_ Number of images relative to the base image @@ -2545,12 +2852,12 @@ stroke (outlines). @@ -2576,7 +2883,8 @@ designed to support Unicode.const std::string &encoding_ -
Specify the code set to use for text -annotations. The only character encoding which may be specified at + Specify the code set to use for text +annotations. The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a -sequence of bytes. Specify an empty string to use the default ASCII -encoding. Successful text annotation using Unicode may require fonts +sequence of bytes. Specify an empty string to use the default ASCII +encoding. Successful text annotation using Unicode may require fonts designed to support Unicode.
- type ImageType +ImageType + void ImageType @@ -2600,6 +2908,18 @@ designed to support Unicode.
const string &view_ FlashPix viewing parameters. ++ + +virtualPixelMethod +VirtualPixelMethod + +void +VirtualPixelMethod +virtualPixelMethod_ +Image virtual pixel method. +x11Display @@ -2608,7 +2928,7 @@ designed to support Unicode.
void const string &display_ X11 display to display to, obtain fonts from, -or to capture image from +or to capture image from@@ -2634,18 +2954,21 @@ or to capture image from Low-Level Image Pixel Access
Image pixels (of type PixelPacket ) -may be accessed directly via the Image Pixel Cache . The -image pixel cache is a rectangular window into the actual image pixels -(which may be in memory, memory-mapped from a disk file, or entirely on -disk). Two interfaces exist to access the Image Pixel Cache. The -interface described here (part of the Image class) supports only +may be accessed directly via the Image Pixel Cache . The +image pixel cache is a rectangular window into the actual image pixels +(which may be in memory, memory-mapped from a disk file, or entirely on +disk). Two interfaces exist to access the Image Pixel Cache. +The +interface described here (part of the Image class) supports +only one view at a time. See the Pixels -class for a more abstract interface which supports simultaneous pixel -views (up to the number of rows). As an analogy, the interface described +class for a more abstract interface which supports simultaneous pixel +views (up to the number of rows). As an analogy, the interface +described here relates to the Pixels class as -stdio's gets() relates to fgets(). The Pixels -class provides the more general form of the interface. -Obtain existing image pixels via getPixels(). Create a new +stdio's gets() relates to fgets(). The Pixels +class provides the more general form of the interface. +
Obtain existing image pixels via getPixels(). Create a new pixel region using setPixels().
In order to ensure that only the current generation of the image is modified, the Image's modifyImage() method @@ -2654,16 +2977,17 @@ to one. If this is not done, then it is possible for a previous generation of the image to be modified due to the use of reference counting when copying or constructing an Image.
-
Depending on the capabilities of the operating system, and the +
Depending on the capabilities of the operating system, and the relationship of the window to the image, the pixel cache may be a copy of the pixels in the selected window, or it may be the actual image pixels. In any case calling syncPixels() insures that the base image is updated with the contents of the modified pixel cache. The -method readPixels() supports copying foreign pixel data formats -into the pixel cache according to the QuantumTypes. The method writePixels() -supports copying the pixels in the cache to a foreign pixel -representation according to the format specified by QuantumTypes.
-The pixel region is effectively a small image in which the pixels +method readPixels() supports copying foreign pixel data +formats +into the pixel cache according to the QuantumTypes. The method writePixels() +supports copying the pixels in the cache to a foreign pixel +representation according to the format specified by QuantumTypes.
+The pixel region is effectively a small image in which the pixels may be accessed, addressed, and updated, as shown in the following example:
@@ -2686,18 +3010,21 @@ DirectClass representation.
size="-1"> // Request pixel region with size 60x40, and top origin at 20x30
int columns = 60;
+ size="-1"> ssize_t columns = 60;
PixelPacket *pixel_cache = image.getPixels(20,30,columns,40);
+ size="-1"> PixelPacket *pixel_cache = +image.getPixels(20,30,columns,40);
// Set pixel at column 5, and row 10 in the pixel cache to red.
int column = 5;
+ size="-1"> ssize_t column = 5;
int row = 10;
+ size="-1"> ssize_t row = 10;
PixelPacket *pixel = pixel_cache+row*columns+column;
+ size="-1"> PixelPacket *pixel = +pixel_cache+row*columns*sizeof(PixelPacket)+column; +
*pixel = Color("red");
const PixelPacket * -const int x_, const int y_, const unsigned -int columns_, const unsigned int rows_ +const ssize_t x_, const ssize_t y_, const unsigned +int columns_, const size_t rows_ Transfers pixels from the image to the pixel cache as defined by the specified rectangular region. The returned pointer remains valid until the next getPixel, -getConstPixels, or setPixels call and should never be deallocated by the +getConstPixels, or setPixels call and should never be deallocated by +the user. @@ -2756,10 +3084,10 @@ corresponding to a previous getPixel, getConstPixels, or setPixels call. The returned pointer remains valid until the next getPixel, getConstPixels, or setPixels call and should never be deallocated by the user. Only valid for PseudoClass images or CMYKA images. The -pixel indexes represent an array of type IndexPacket, with each entry -corresponding to an x,y pixel position. For PseudoClass images, the -entry's value is the offset into the colormap (see colorMap + size="-1"> Only valid for PseudoClass images or CMYKA images. The +pixel indexes represent an array of type IndexPacket, with each entry +corresponding to an x,y pixel position. For PseudoClass images, the +entry's value is the offset into the colormap (see colorMap ) for that pixel. For CMYKA images, the indexes are used to contain the alpha channel. @@ -2772,28 +3100,32 @@ alpha channel.Returns a pointer to the Image pixel indexes corresponding to the pixel region requested by the last getConstPixels , getPixels -, or setPixels call. The +, or setPixels call. The returned pointer remains valid until the next getPixel, getConstPixels, or setPixels call and should never be deallocated by the user. Only valid for PseudoClass images or -CMYKA images. The pixel indexes represent an array of type -IndexPacket, with each entry corresponding to a pixel x,y position. For -PseudoClass images, the entry's value is the offset into the colormap -(see colorMap ) for that pixel. For CMYKA -images, the indexes are used to contain the alpha channel. + size="-1"> Only valid for PseudoClass images +or +CMYKA images. The pixel indexes represent an array of type +IndexPacket, with each entry corresponding to a pixel x,y position. For +PseudoClass images, the entry's value is the offset into the colormap +(see colorMap ) for that pixel. For +CMYKA +images, the indexes are used to contain the alpha channel.getPixels PixelPacket * -const int x_, const int y_, const unsigned -int columns_, const unsigned int rows_ +const ssize_t x_, const ssize_t y_, const unsigned +int columns_, const size_t rows_ Transfers pixels from the image to the pixel cache as defined by the specified rectangular region. Modified pixels -may be subsequently transferred back to the image via syncPixels. The returned pointer remains valid until the next getPixel, -getConstPixels, or setPixels call and should never be deallocated by the +getConstPixels, or setPixels call and should never be deallocated by +the user. @@ -2801,11 +3133,11 @@ user. diff --git a/www/Magick++/Pixels.html b/www/Magick++/Pixels.html index 66070b03d..2ebcf7c84 100644 --- a/www/Magick++/Pixels.html +++ b/www/Magick++/Pixels.html @@ -18,16 +18,8 @@ + - @@ -108,7 +100,7 @@ viewsetPixels PixelPacket * -const int x_, const int y_, const unsigned -int columns_, const unsigned int rows_ +const ssize_t x_, const ssize_t y_, const unsigned +int columns_, const size_t rows_ Allocates a pixel cache region to store image pixels as defined by the region rectangle. This area is -subsequently transferred from the pixel cache to the image via +subsequently transferred from the pixel cache to the image via syncPixels. The returned pointer remains valid until the next getPixel, getConstPixels, or setPixels call and should never be deallocated by the user. @@ -2838,8 +3170,8 @@ corresponds to the region set by a preceding setPixels call.QuantumTypes quantum_, unsigned char *destination_ Transfers one or more pixel components from -the image pixel cache to a buffer or file. WritePixels is typically -used to support image encoders. The region transferred corresponds to +the image pixel cache to a buffer or file. WritePixels is typically +used to support image encoders. The region transferred corresponds to the region set by a preceding getPixels or getConstPixels call.
color="#000099">Â Â // Set all pixels in region anchored at 38x36, with size 160x230 to green.
  unsigned int columns = 196; unsigned int rows = + color="#000099">  size_t columns = 196; size_t rows = 162;
  Color green("green");
@@ -116,10 +108,10 @@ in region anchored at 38x36, with size 160x230 to green. color="#000099">Â Â PixelPacket *pixels = view.get(38,36,columns,rows);
  for ( int row = 0; row < rows ; ++row ) + color="#000099">  for ( ssize_t row = 0; row < rows ; ++row )
    for ( int column = 0; column < columns ; + color="#000099">    for ( ssize_t column = 0; column < columns ; ++column )
      *pixels++=green; @@ -140,10 +132,10 @@ in region anchored at 86x72, with size 108x67 to yellow.   pixels = view.get(86,72,columns,rows);
  for ( int row = 0; row < rows ; ++row ) + color="#000099">  for ( ssize_t row = 0; row < rows ; ++row )
     for ( int column = 0; column < columns ; + color="#000099">     for ( ssize_t column = 0; column < columns ; ++column )
        *pixels++=yellow;
@@ -199,8 +191,8 @@ methods:
- const int x_, const int y_, const unsigned -const int columns_, const unsigned int rows_
+const ssize_t x_, const ssize_t y_, const unsigned +const int columns_, const size_t rows_
Transfers read-write pixels from the image to @@ -218,8 +210,8 @@ the pixel cache as defined by the specified rectangular region.
const PixelPacket*
- const int x_, const int y_, const unsigned int - columns_, const unsigned int rows_
+const ssize_t x_, const ssize_t y_, const size_t + columns_, const size_t rows_
Transfers read-only pixels from the image to @@ -234,8 +226,8 @@ the pixel cache as defined by the specified rectangular region.
- const int x_, const int y_, const unsigned int - columns_, const unsigned int rows_
+const ssize_t x_, const ssize_t y_, const size_t + columns_, const size_t rows_
@@ -317,7 +309,7 @@ should never be deallocated. Allocates a pixel cache region to store image @@ -279,7 +271,7 @@ which is itself typedef unsigned char, or unsigned short, depending on the value of the QuantumDepth define) provide the colormap index (see colorMap) for each pixel in the -image. For CMYKA images, the indexes represent the black +image. For CMYKA images, the indexes represent the black channel. The value returned is intended for pixel access only. It should never be deallocated.
- unsigned int
+size_t
void
@@ -331,7 +323,7 @@ should never be deallocated.- unsigned int
+size_t
@@ -244,7 +245,7 @@ as options by montageImages(). *morphedImages_, InputIterator first_, InputIterator -last_, unsigned int frames_ +last_, size_t frames_ void
diff --git a/www/Magick++/STL.html b/www/Magick++/STL.html index de0aab87f..26a0728b3 100644 --- a/www/Magick++/STL.html +++ b/www/Magick++/STL.html @@ -10,6 +10,7 @@ content="Documentation on Magick++'s STL support templates.">Magick++ STL Support + @@ -180,7 +181,7 @@ use of a pop-up menu, image frames may be selected in succession. This feature is fully supported under X11 but may have only limited support in other environments.
Caution: if -an image format is not compatable with the display visual (e.g. JPEG +an image format is is not compatable with the display visual (e.g. JPEG on a colormapped display) then the original image will be altered. Use a copy of the original if this is a problem.Morph a seqence of image frames. This algorithm expands the number of image frames (output to the container morphedImages_) by adding the number of intervening @@ -379,7 +380,7 @@ manipulating images are shown in the following table: -
size="-1">adaptiveThresholdImage
unsigned int width, unsigned + size_t width, unsigned int height, unsigned offset = 0
Apply adaptive thresholding to @@ -489,14 +490,14 @@ subregion of image) - colorizeImage const unsigned int opacityRed_, const -unsigned int opacityGreen_, const unsigned int opacityBlue_, const Color + const size_t opacityRed_, const +size_t opacityGreen_, const size_t opacityBlue_, const Color &penColor_ Colorize image with pen color, using specified percent opacity for red, green, and blue quantums. - @@ -589,7 +590,7 @@ for repeated use.const unsigned int opacity_, const const size_t opacity_, const Color &penColor_ Colorize image with pen color, using specified percent opacity. @@ -518,7 +519,7 @@ height, or other image attributes by embedding compositeImageconst Image -&compositeImage_, int xOffset_, int yOffset_, CompositeOperator compose_ = InCompositeOp Compose an image onto another at @@ -542,7 +543,7 @@ memory). - contrastImage unsigned int sharpen_ +size_t sharpen_ Contrast image (enhance intensity differences in image) - edgeImage unsigned int radius_ = 0.0 +size_t radius_ = 0.0 Edge image (hilight edges in image). The radius is the radius of the pixel neighborhood.. Specify a radius of zero for automatic radius selection. @@ -632,7 +633,7 @@ vertical direction)floodFill- -
ColorImageunsigned int x_, unsigned int y_, const size_t x_, size_t y_, const Color &fillColor_ Flood-fill color across pixels that match the color of the target pixel and are neighbors of the @@ -643,7 +644,7 @@ target pixel. Uses current fuzz setting when determining color match.Color &fillColor_ - unsigned int x_, unsigned int y_, const size_t x_, size_t y_, const Color &fillColor_, const Color &borderColor_ Flood-fill color across pixels @@ -660,7 +661,7 @@ border color. Uses current fuzz setting when determining color match. floodFill- -
TextureImageunsigned int x_, unsigned int y_, const size_t x_, size_t y_, const Image &texture_ Flood-fill texture across pixels that match the color of the target pixel and are neighbors of the @@ -671,7 +672,7 @@ target pixel. Uses current fuzz setting when determining color match. - unsigned int x_, unsigned int y_, const Image + size_t x_, size_t y_, const Image &texture_, const Color &borderColor_ Flood-fill texture across pixels starting at target-pixel and stopping at pixels matching specified @@ -699,8 +700,8 @@ horizontal direction) Add decorative frame around image - unsigned int width_, unsigned int height_, -int x_, int y_, int innerBevel_ = 0, int outerBevel_ = 0 +size_t width_, size_t height_, +int x_, ssize_t y_, ssize_t innerBevel_ = 0, ssize_t outerBevel_ = 0 + @@ -734,6 +735,14 @@ specified by 'sigma_'. double factor_ Implode image (special effect) + + +inverseFourierTransformImage +const Image +&phaseImage_, const bool magnitude_ +implements the inverse discrete Fourier transform (DFT) of the image either as a magnitude / phase or real / imaginary image pair. +@@ -877,14 +886,14 @@ normalizing the pixel values to span the full range of color values). Image labelImage @@ -825,7 +834,7 @@ with this option.const Color -&target_, unsigned int matte_, int x_, int y_, PaintMethod method_ Floodfill designated area with a matte value oilPaintImage -unsigned int radius_ = 3 +size_t radius_ = 3 Oilpaint image (image looks like oil painting) - opacityImage unsigned int opacity_ +size_t opacity_ Set or attenuate the opacity channel in the image. If the image pixels are opaque then they are set to the specified opacity value, otherwise they are blended with the supplied opacity @@ -929,13 +938,13 @@ an image to give a 3-D raised or lowered effect) noise peak elimination filter.- unsigned int order_ +size_t order_ @@ -1039,7 +1048,7 @@ exposing a photographic film to light during the development process) - rollImage int columns_, int rows_ +int columns_, ssize_t rows_ Roll image (rolls image vertically and horizontally) by specified number of columnms and rows) spreadImage -unsigned int amount_ = 3 +size_t amount_ = 3 Spread pixels randomly within image by specified amount @@ -1186,8 +1195,8 @@ and Postscript or TrueType fonts. Enabled by default.animation- -
DelayImageunsigned int (0 to 65535) -unsigned int delay_ +size_t (0 to 65535) +size_t delay_ Time in 1/100ths of a second (0 to 65535) which must expire before displaying the next image in an animated sequence. This option is useful for regulating the animation of a @@ -1198,8 +1207,8 @@ sequence of GIF images within Netscape. animation- -
IterationsImageunsigned int -unsigned int iterations_ +size_t +size_t iterations_ Number of iterations to loop an animation (e.g. Netscape loop extension) for. @@ -1298,7 +1307,7 @@ are close to the target color in RGB space.colorMapImage Color -unsigned int index_, const size_t index_, const Color &color_ Color at color-pallet index. @@ -1348,8 +1357,8 @@ Postscript or Portable Document page. Often used with psPageSize.<- depthImage unsigned int (8 or 16) -unsigned int depth_ +size_t (8 or 16) +size_t depth_ Image depth. Used to specify the bit depth when reading or writing raw images or thwn the output format supports multiple depths. Defaults to the quantum depth that @@ -1410,8 +1419,8 @@ Otherwise, specify a Postscript font name (e.g. -fontPointsize-
Imageunsigned int -unsigned int pointSize_ +size_t +size_t pointSize_ Text rendering font point size @@ -1419,13 +1428,13 @@ Otherwise, specify a Postscript font name (e.g. @@ -1550,7 +1559,7 @@ penColor).gifDispose- -
MethodImageunsigned int
+size_t -
{ 0 = Disposal not specified,
1 = Do not dispose of graphic,
3 = Overwrite graphic with background color,
4 = Overwrite graphic with previous graphic. }unsigned int disposeMethod_ -GIF disposal method. This option is used to + size_t disposeMethod_ +layer disposal method. This option is used to control how successive frames are rendered (how the preceding frame is disposed of) when creating a GIF animation. pixelColorImage Color -unsigned int x_, unsigned int y_, const size_t x_, size_t y_, const Color &color_ Get/set pixel color at location x & y. @@ -1569,8 +1578,8 @@ or a TEXT page in pixels. This option is typically used in concert with densi- qualityImage unsigned int (0 to 100) -unsigned int quality_ +size_t (0 to 100) +size_t quality_ JPEG/MIFF/PNG compression level (default 75). @@ -1578,8 +1587,8 @@ or a TEXT page in pixels. This option is typically used in concert with densi quantize- -
ColorsImageunsigned int -unsigned int colors_ +size_t +size_t colors_ Preferred number of colors in the image. The actual number of colors in the image may be less than your request, but never more. Images with less unique colors than specified with this @@ -1620,8 +1629,8 @@ for this option to take effect. quantize- -
TreeDepthImageunsigned int (0 to 8) -unsigned int treeDepth_ +size_t (0 to 8) +size_t treeDepth_ Depth of the quantization color classification tree. Values of 0 or 1 allow selection of the optimal tree depth for the color reduction algorithm. Values between 2 and 8 may @@ -1651,8 +1660,8 @@ units_ - sceneImage unsigned int -unsigned int scene_ +size_t +size_t scene_ Image scene number @@ -1680,16 +1689,16 @@ format (e.g. Photo CD, JBIG, or JPEG. - subImageImage unsigned int -unsigned int subImage_ +size_t +size_t subImage_ Subimage of an image sequence - subRangeImage unsigned int -unsigned int subRange_ +size_t +size_t subRange_ Number of images relative to the base image diff --git a/www/Magick++/index.html b/www/Magick++/index.html index 950911f94..289619fed 100644 --- a/www/Magick++/index.html +++ b/www/Magick++/index.html @@ -1,34 +1,98 @@ - - - - Magick++ -- C++ API for ImageMagick - - - -Magick++ -- C++ API for ImageMagick
-Magick++ is the object-oriented C++ API to the ImageMagick image-processing library, the most comprehensive open-source image processing package available. Read the latest NEWS and ChangeLog for Magick++.
--
Magick++ supports an object model which is inspired by PerlMagick. Images support implicit reference counting so that copy constructors and assignment incur almost no cost. The cost of actually copying an image (if necessary) is done just before modification and this copy is managed automatically by Magick++. De-referenced copies are automatically deleted. The image objects support value (rather than pointer) semantics so it is trivial to support multiple generations of an image in memory at one time.
Magick++ provides integrated support for the Standard Template Library (STL) so that the powerful containers available (e.g. deque, vector, list, and map) can be used to write programs similar to those possible with PERL &PerlMagick. STL-compatible template versions of ImageMagick's list-style operations are provided so that operations may be performed on multiple images stored in STL containers.
-Documentation
-Detailed documentation are provided for all Magick++ classes, class methods, and template functions which comprise the API.
-Obtaining Magick++
-Magick++ is included as part of ImageMagick source releases and may be retrieved via ftp or subversion.
-Installation
-Once you have the sources available, follow these detailed installation instructions for UNIX and Windows.
-Usage
-A helper script named Magick++-config is installed under Unix which assists with recalling compilation options required to compile and link programs which use Magick++. For example, the following command will compile and link the source file example.cpp to produce the executable example (notice that quotes are backward quotes):
-c++ `Magick++-config --cxxflags --cppflags` -o example example.cpp `Magick++-config --ldflags --libs` --Windows users may get started by manually editing a project file for one of the Magick++ demo programs.
-Please note that under Windows (and possibly the Mac) it is necessary to initialize the ImageMagick library prior to using the Magick++ library. This initialization is performed by passing the path to the ImageMagick DLLs (assumed to be in the same directory as your program) to the InitializeMagick() function call. This is commonly performed by providing the path to your program (argv[0]) as shown in the following example:
-int main( int /*argc*/, char ** argv)-
-{
-InitializeMagick(*argv);This initialization step is not required under Unix, Linux, Cygwin, or any other operating environment that supports the notion of "installing" ImageMagick in a known location.
-Reporting Bugs
-Please report any bugs or questions via the ImageMagick Discourse Server. -
Related Packages
-Users who are interested in displaying their images at video game rates on a wide number of platforms and graphic environments (e.g. Windows, X11, BeOS, and Linux/CGI) may want to try PtcMagick, which provides a simple interface between Magick++ and OpenPTC.
- - + + + + +Magick++ -- C++ API for ImageMagick + + + + + + + + + ++
Magick++ is the object-oriented C++ API to the ImageMagick +image-processing library, the most comprehensive open-source image +processing package available. Read the latest NEWS +and ChangeLog for Magick++. +
++
Magick++ +supports an object model which is inspired by PerlMagick. +Images support implicit reference counting so that copy constructors +and assignment incur almost no cost. The cost of actually copying an +image (if necessary) is done just before modification and this copy +is managed automagically by Magick++. De-referenced copies are +automagically deleted. The image objects support value (rather than +pointer) semantics so it is trivial to support multiple generations +of an image in memory at one time. +
Magick++ provides integrated support for the Standard +Template Library (STL) so that the powerful containers available +(e.g. deque, +vector, list, +and map) can +be used to write programs similar to those possible with PERL & +PerlMagick. STL-compatible template versions of ImageMagick's +list-style operations are provided so that operations may be +performed on multiple images stored in STL containers. +
+Documentation
+Detailed documentation is +provided for all Magick++ classes, class methods, and template +functions which comprise the API. See a Gentle Introduction to Magick++ for an introductory tutorial to Magick++. We include the source if you want to correct, enhance, or expand the tutorial.
+ +Obtaining Magick++
+Magick++ is included as part of ImageMagick +source releases and may be retrieved via ftp +or Subversion. +
+Installation
+Once you have the Magick++ sources available, follow these detailed +installation instructions for UNIX and +Windows. +
+Usage +
+A helper script named Magick++-config is installed +under Unix which assists with recalling compilation options required +to compile and link programs which use Magick++. For example, the +following command will compile and link the source file example.cpp +to produce the executable example (notice that quotes are +backward quotes): +
+c++ -o example example.cpp +`Magick++-config --cppflags --cxxflags --ldflags --libs`+Windows users may get started by manually editing a project file +for one of the Magick++ demo programs. +
+Please note that under Windows (and possibly the Mac) it is +necessary to initialize the ImageMagick library prior to using the +Magick++ library. This initialization is performed by passing the +path to the ImageMagick DLLs (assumed to be in the same directory +as your program) to the InitializeMagick() function call. This is +commonly performed by providing the path to your program (argv[0]) as +shown in the following example: +
+int main( ssize_t /*argc*/, char ** +argv)+
{
+InitializeMagick(*argv);This initialization step is not required under Unix, Linux, +Cygwin, or any other operating environment that supports the notion +of "installing" ImageMagick in a known location. +
+Reporting Bugs
+Please report any bugs via the +Magick++ bug tracking forum. +Questions regarding usage should be directed to +Magick++ discussion forum. +
+Related Packages
+Users who are interested in displaying their images at video game +rates on a wide number of platforms and graphic environments (e.g. +Windows, X11, BeOS, and Linux/CGI) may want to try PtcMagick, +which provides a simple interface between Magick++ and OpenPTC. +
+ +