Image.h revision 95f389652b69ee5487f18e744b7f54dcda1c733c
13ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// This may look like C code, but it is really -*- C++ -*- 23ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// 33ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003 43ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// 53ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Definition of Image, the representation of a single image in Magick++ 63ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// 73ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 83ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#if !defined(Magick_Image_header) 93ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#define Magick_Image_header 103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Include.h" 123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include <string> 133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include <list> 143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Blob.h" 153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Color.h" 163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Drawable.h" 173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Exception.h" 183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/Geometry.h" 193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#include "Magick++/TypeMetric.h" 203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 213ed852eea50f9d4cd633efb8c2b054b8e33c253cristynamespace Magick 223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Forward declarations 243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy class Options; 253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy class ImageRef; 263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 27af1dd259230d63d51f441c28bc23265a79b19c55cristy extern MagickPPExport const char *borderGeometryDefault; 28af1dd259230d63d51f441c28bc23265a79b19c55cristy extern MagickPPExport const char *frameGeometryDefault; 29af1dd259230d63d51f441c28bc23265a79b19c55cristy extern MagickPPExport const char *raiseGeometryDefault; 303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Compare two Image objects regardless of LHS/RHS 323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image sizes and signatures are used as basis of comparison 3395f389652b69ee5487f18e744b7f54dcda1c733cdirk int MagickPPExport operator == 3495f389652b69ee5487f18e744b7f54dcda1c733cdirk (const Magick::Image &left_,const Magick::Image &right_); 3595f389652b69ee5487f18e744b7f54dcda1c733cdirk int MagickPPExport operator != 3695f389652b69ee5487f18e744b7f54dcda1c733cdirk (const Magick::Image &left_,const Magick::Image &right_); 3795f389652b69ee5487f18e744b7f54dcda1c733cdirk int MagickPPExport operator > 3895f389652b69ee5487f18e744b7f54dcda1c733cdirk (const Magick::Image &left_,const Magick::Image &right_); 3995f389652b69ee5487f18e744b7f54dcda1c733cdirk int MagickPPExport operator < 4095f389652b69ee5487f18e744b7f54dcda1c733cdirk (const Magick::Image &left_,const Magick::Image &right_); 4195f389652b69ee5487f18e744b7f54dcda1c733cdirk int MagickPPExport operator >= 4295f389652b69ee5487f18e744b7f54dcda1c733cdirk (const Magick::Image &left_,const Magick::Image &right_); 4395f389652b69ee5487f18e744b7f54dcda1c733cdirk int MagickPPExport operator <= 4495f389652b69ee5487f18e744b7f54dcda1c733cdirk (const Magick::Image &left_,const Magick::Image &right_); 453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // C library initialization routine 4795f389652b69ee5487f18e744b7f54dcda1c733cdirk void MagickPPExport InitializeMagick(const char *path_); 483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 5095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image is the representation of an image. In reality, it actually 513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // a handle object which contains a pointer to a shared reference 523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // object (ImageRef). As such, this object is extremely space efficient. 533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 54c4b500215778da0d84cc748f7193f0a30cfc7806dirk class MagickPPExport Image 553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy public: 5795f389652b69ee5487f18e744b7f54dcda1c733cdirk 5895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Obtain image statistics. Statistics are normalized to the range 5995f389652b69ee5487f18e744b7f54dcda1c733cdirk // of 0.0 to 1.0 and are output to the specified ImageStatistics 6095f389652b69ee5487f18e744b7f54dcda1c733cdirk // structure. 6195f389652b69ee5487f18e744b7f54dcda1c733cdirk typedef struct _ImageChannelStatistics 6295f389652b69ee5487f18e744b7f54dcda1c733cdirk { 6395f389652b69ee5487f18e744b7f54dcda1c733cdirk /* Minimum value observed */ 6495f389652b69ee5487f18e744b7f54dcda1c733cdirk double maximum; 6595f389652b69ee5487f18e744b7f54dcda1c733cdirk /* Maximum value observed */ 6695f389652b69ee5487f18e744b7f54dcda1c733cdirk double minimum; 6795f389652b69ee5487f18e744b7f54dcda1c733cdirk /* Average (mean) value observed */ 6895f389652b69ee5487f18e744b7f54dcda1c733cdirk double mean; 6995f389652b69ee5487f18e744b7f54dcda1c733cdirk /* Standard deviation, sqrt(variance) */ 7095f389652b69ee5487f18e744b7f54dcda1c733cdirk double standard_deviation; 7195f389652b69ee5487f18e744b7f54dcda1c733cdirk /* Variance */ 7295f389652b69ee5487f18e744b7f54dcda1c733cdirk double variance; 7395f389652b69ee5487f18e744b7f54dcda1c733cdirk /* Kurtosis */ 7495f389652b69ee5487f18e744b7f54dcda1c733cdirk double kurtosis; 7595f389652b69ee5487f18e744b7f54dcda1c733cdirk /* Skewness */ 7695f389652b69ee5487f18e744b7f54dcda1c733cdirk double skewness; 7795f389652b69ee5487f18e744b7f54dcda1c733cdirk } ImageChannelStatistics; 7895f389652b69ee5487f18e744b7f54dcda1c733cdirk 7995f389652b69ee5487f18e744b7f54dcda1c733cdirk typedef struct _ImageStatistics 8095f389652b69ee5487f18e744b7f54dcda1c733cdirk { 8195f389652b69ee5487f18e744b7f54dcda1c733cdirk ImageChannelStatistics red; 8295f389652b69ee5487f18e744b7f54dcda1c733cdirk ImageChannelStatistics green; 8395f389652b69ee5487f18e744b7f54dcda1c733cdirk ImageChannelStatistics blue; 8495f389652b69ee5487f18e744b7f54dcda1c733cdirk ImageChannelStatistics alpha; 8595f389652b69ee5487f18e744b7f54dcda1c733cdirk } ImageStatistics; 8695f389652b69ee5487f18e744b7f54dcda1c733cdirk 8795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Default constructor 8895f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(void); 893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image from in-memory BLOB 9195f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const Blob &blob_); 923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image of specified size from in-memory BLOB 9495f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const Blob &blob_,const Geometry &size_); 953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image of specified size and depth from in-memory BLOB 9795f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const Blob &blob_,const Geometry &size,const size_t depth); 983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image of specified size, depth, and format from 1003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in-memory BLOB 10195f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const Blob &blob_,const Geometry &size,const size_t depth_, 10295f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &magick_); 10395f389652b69ee5487f18e744b7f54dcda1c733cdirk 10495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Construct Image of specified size, and format from in-memory BLOB 10595f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const Blob &blob_,const Geometry &size,const std::string &magick_); 10695f389652b69ee5487f18e744b7f54dcda1c733cdirk 10795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Construct a blank image canvas of specified size and color 10895f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const Geometry &size_,const Color &color_); 10995f389652b69ee5487f18e744b7f54dcda1c733cdirk 11095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Copy constructor 11195f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const Image &image_); 1123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct an image based on an array of raw pixels, of 1143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified type and mapping, in memory 11595f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const size_t width_,const size_t height_,const std::string &map_, 11695f389652b69ee5487f18e744b7f54dcda1c733cdirk const StorageType type_,const void *pixels_); 1173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Construct from image file or image specification 11995f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(const std::string &imageSpec_); 120092a8ea1959d818804462ea79231863dc2e3fd26dirk 1213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Destructor 12295f389652b69ee5487f18e744b7f54dcda1c733cdirk virtual ~Image(); 123092a8ea1959d818804462ea79231863dc2e3fd26dirk 1243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Assignment operator 12595f389652b69ee5487f18e744b7f54dcda1c733cdirk Image& operator=(const Image &image_); 1263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Join images into a single multi-image file 12895f389652b69ee5487f18e744b7f54dcda1c733cdirk void adjoin(const bool flag_); 12995f389652b69ee5487f18e744b7f54dcda1c733cdirk bool adjoin(void) const; 13095f389652b69ee5487f18e744b7f54dcda1c733cdirk 13195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Anti-alias Postscript and TrueType fonts (default true) 13295f389652b69ee5487f18e744b7f54dcda1c733cdirk void antiAlias(const bool flag_); 13395f389652b69ee5487f18e744b7f54dcda1c733cdirk bool antiAlias(void); 13495f389652b69ee5487f18e744b7f54dcda1c733cdirk 13595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Time in 1/100ths of a second which must expire before 13695f389652b69ee5487f18e744b7f54dcda1c733cdirk // displaying the next image in an animated sequence. 13795f389652b69ee5487f18e744b7f54dcda1c733cdirk void animationDelay(const size_t delay_); 13895f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t animationDelay(void) const; 13995f389652b69ee5487f18e744b7f54dcda1c733cdirk 14095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Number of iterations to loop an animation (e.g. Netscape loop 14195f389652b69ee5487f18e744b7f54dcda1c733cdirk // extension) for. 14295f389652b69ee5487f18e744b7f54dcda1c733cdirk void animationIterations(const size_t iterations_); 14395f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t animationIterations(void) const; 14495f389652b69ee5487f18e744b7f54dcda1c733cdirk 14595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image background color 14695f389652b69ee5487f18e744b7f54dcda1c733cdirk void backgroundColor(const Color &color_); 14795f389652b69ee5487f18e744b7f54dcda1c733cdirk Color backgroundColor(void) const; 14895f389652b69ee5487f18e744b7f54dcda1c733cdirk 14995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Name of texture image to tile onto the image background 15095f389652b69ee5487f18e744b7f54dcda1c733cdirk void backgroundTexture(const std::string &backgroundTexture_); 15195f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string backgroundTexture(void) const; 15295f389652b69ee5487f18e744b7f54dcda1c733cdirk 15395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Base image width (before transformations) 15495f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t baseColumns(void) const; 15595f389652b69ee5487f18e744b7f54dcda1c733cdirk 15695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Base image filename (before transformations) 15795f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string baseFilename(void) const; 15895f389652b69ee5487f18e744b7f54dcda1c733cdirk 15995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Base image height (before transformations) 16095f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t baseRows(void) const; 16195f389652b69ee5487f18e744b7f54dcda1c733cdirk 16295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image border color 16395f389652b69ee5487f18e744b7f54dcda1c733cdirk void borderColor(const Color &color_); 16495f389652b69ee5487f18e744b7f54dcda1c733cdirk Color borderColor(void) const; 16595f389652b69ee5487f18e744b7f54dcda1c733cdirk 16695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Return smallest bounding box enclosing non-border pixels. The 16795f389652b69ee5487f18e744b7f54dcda1c733cdirk // current fuzz value is used when discriminating between pixels. 16895f389652b69ee5487f18e744b7f54dcda1c733cdirk // This is the crop bounding box used by crop(Geometry(0,0)); 16995f389652b69ee5487f18e744b7f54dcda1c733cdirk Geometry boundingBox(void) const; 17095f389652b69ee5487f18e744b7f54dcda1c733cdirk 17195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Text bounding-box base color (default none) 17295f389652b69ee5487f18e744b7f54dcda1c733cdirk void boxColor(const Color &boxColor_); 17395f389652b69ee5487f18e744b7f54dcda1c733cdirk Color boxColor(void) const; 17495f389652b69ee5487f18e744b7f54dcda1c733cdirk 17595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Pixel cache threshold in bytes. Once this memory threshold 17695f389652b69ee5487f18e744b7f54dcda1c733cdirk // is exceeded, all subsequent pixels cache operations are to/from 17795f389652b69ee5487f18e744b7f54dcda1c733cdirk // disk. This setting is shared by all Image objects. 17895f389652b69ee5487f18e744b7f54dcda1c733cdirk static void cacheThreshold(const MagickSizeType threshold_); 17995f389652b69ee5487f18e744b7f54dcda1c733cdirk 18095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Set or obtain modulus channel depth 18195f389652b69ee5487f18e744b7f54dcda1c733cdirk void channelDepth(const size_t depth_); 18295f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t channelDepth(); 18395f389652b69ee5487f18e744b7f54dcda1c733cdirk 18495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Returns the number of channels in this image. 18595f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t channels() const; 18695f389652b69ee5487f18e744b7f54dcda1c733cdirk 18795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image class (DirectClass or PseudoClass) 18895f389652b69ee5487f18e744b7f54dcda1c733cdirk // NOTE: setting a DirectClass image to PseudoClass will result in 18995f389652b69ee5487f18e744b7f54dcda1c733cdirk // the loss of color information if the number of colors in the 19095f389652b69ee5487f18e744b7f54dcda1c733cdirk // image is greater than the maximum palette size (either 256 or 19195f389652b69ee5487f18e744b7f54dcda1c733cdirk // 65536 entries depending on the value of MAGICKCORE_QUANTUM_DEPTH when 19295f389652b69ee5487f18e744b7f54dcda1c733cdirk // ImageMagick was built). 19395f389652b69ee5487f18e744b7f54dcda1c733cdirk void classType(const ClassType class_); 19495f389652b69ee5487f18e744b7f54dcda1c733cdirk ClassType classType(void) const; 19595f389652b69ee5487f18e744b7f54dcda1c733cdirk 19695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Associate a clip mask with the image. The clip mask must be the 19795f389652b69ee5487f18e744b7f54dcda1c733cdirk // same dimensions as the image. Pass an invalid image to unset an 19895f389652b69ee5487f18e744b7f54dcda1c733cdirk // existing clip mask. 19995f389652b69ee5487f18e744b7f54dcda1c733cdirk void clipMask(const Image &clipMask_); 20095f389652b69ee5487f18e744b7f54dcda1c733cdirk Image clipMask(void) const; 20195f389652b69ee5487f18e744b7f54dcda1c733cdirk 20295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Colors within this distance are considered equal 20395f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorFuzz(const double fuzz_); 20495f389652b69ee5487f18e744b7f54dcda1c733cdirk double colorFuzz(void) const; 20595f389652b69ee5487f18e744b7f54dcda1c733cdirk 20695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Colormap size (number of colormap entries) 20795f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorMapSize(const size_t entries_); 20895f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t colorMapSize(void) const; 20995f389652b69ee5487f18e744b7f54dcda1c733cdirk 21095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image Color Space 21195f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorSpace(const ColorspaceType colorSpace_); 21295f389652b69ee5487f18e744b7f54dcda1c733cdirk ColorspaceType colorSpace(void) const; 21395f389652b69ee5487f18e744b7f54dcda1c733cdirk 21495f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorspaceType(const ColorspaceType colorSpace_); 21595f389652b69ee5487f18e744b7f54dcda1c733cdirk ColorspaceType colorspaceType(void) const; 21695f389652b69ee5487f18e744b7f54dcda1c733cdirk 21795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image width 21895f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t columns(void) const; 21995f389652b69ee5487f18e744b7f54dcda1c733cdirk 22095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Comment image (add comment string to image) 22195f389652b69ee5487f18e744b7f54dcda1c733cdirk void comment(const std::string &comment_); 22295f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string comment(void) const; 22395f389652b69ee5487f18e744b7f54dcda1c733cdirk 22495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Composition operator to be used when composition is implicitly 22595f389652b69ee5487f18e744b7f54dcda1c733cdirk // used (such as for image flattening). 22695f389652b69ee5487f18e744b7f54dcda1c733cdirk void compose(const CompositeOperator compose_); 22795f389652b69ee5487f18e744b7f54dcda1c733cdirk CompositeOperator compose(void) const; 22895f389652b69ee5487f18e744b7f54dcda1c733cdirk 22995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Compression type 23095f389652b69ee5487f18e744b7f54dcda1c733cdirk void compressType(const CompressionType compressType_); 23195f389652b69ee5487f18e744b7f54dcda1c733cdirk CompressionType compressType(void) const; 23295f389652b69ee5487f18e744b7f54dcda1c733cdirk 23395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Enable printing of debug messages from ImageMagick 23495f389652b69ee5487f18e744b7f54dcda1c733cdirk void debug(const bool flag_); 23595f389652b69ee5487f18e744b7f54dcda1c733cdirk bool debug(void) const; 23695f389652b69ee5487f18e744b7f54dcda1c733cdirk 23795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Vertical and horizontal resolution in pixels of the image 23895f389652b69ee5487f18e744b7f54dcda1c733cdirk void density(const Geometry &geomery_); 23995f389652b69ee5487f18e744b7f54dcda1c733cdirk Geometry density(void) const; 24095f389652b69ee5487f18e744b7f54dcda1c733cdirk 24195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image depth (bits allocated to red/green/blue components) 24295f389652b69ee5487f18e744b7f54dcda1c733cdirk void depth(const size_t depth_); 24395f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t depth(void) const; 24495f389652b69ee5487f18e744b7f54dcda1c733cdirk 24595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Tile names from within an image montage 24695f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string directory(void) const; 24795f389652b69ee5487f18e744b7f54dcda1c733cdirk 24895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Endianness (little like Intel or big like SPARC) for image 24995f389652b69ee5487f18e744b7f54dcda1c733cdirk // formats which support endian-specific options. 25095f389652b69ee5487f18e744b7f54dcda1c733cdirk void endian(const EndianType endian_); 25195f389652b69ee5487f18e744b7f54dcda1c733cdirk EndianType endian(void) const; 25295f389652b69ee5487f18e744b7f54dcda1c733cdirk 25395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Exif profile (BLOB) 25495f389652b69ee5487f18e744b7f54dcda1c733cdirk void exifProfile(const Blob &exifProfile_); 25595f389652b69ee5487f18e744b7f54dcda1c733cdirk Blob exifProfile(void) const; 25695f389652b69ee5487f18e744b7f54dcda1c733cdirk 25795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image file name 25895f389652b69ee5487f18e744b7f54dcda1c733cdirk void fileName(const std::string &fileName_); 25995f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string fileName(void) const; 26095f389652b69ee5487f18e744b7f54dcda1c733cdirk 26195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Number of bytes of the image on disk 26295f389652b69ee5487f18e744b7f54dcda1c733cdirk off_t fileSize(void) const; 26395f389652b69ee5487f18e744b7f54dcda1c733cdirk 26495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Color to use when filling drawn objects 26595f389652b69ee5487f18e744b7f54dcda1c733cdirk void fillColor(const Color &fillColor_); 26695f389652b69ee5487f18e744b7f54dcda1c733cdirk Color fillColor(void) const; 26795f389652b69ee5487f18e744b7f54dcda1c733cdirk 26895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Rule to use when filling drawn objects 26995f389652b69ee5487f18e744b7f54dcda1c733cdirk void fillRule(const FillRule &fillRule_); 27095f389652b69ee5487f18e744b7f54dcda1c733cdirk FillRule fillRule(void) const; 27195f389652b69ee5487f18e744b7f54dcda1c733cdirk 27295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Pattern to use while filling drawn objects. 27395f389652b69ee5487f18e744b7f54dcda1c733cdirk void fillPattern(const Image &fillPattern_); 27495f389652b69ee5487f18e744b7f54dcda1c733cdirk Image fillPattern(void) const; 27595f389652b69ee5487f18e744b7f54dcda1c733cdirk 27695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Filter to use when resizing image 27795f389652b69ee5487f18e744b7f54dcda1c733cdirk void filterType(const FilterTypes filterType_); 27895f389652b69ee5487f18e744b7f54dcda1c733cdirk FilterTypes filterType(void) const; 27995f389652b69ee5487f18e744b7f54dcda1c733cdirk 28095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Text rendering font 28195f389652b69ee5487f18e744b7f54dcda1c733cdirk void font(const std::string &font_); 28295f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string font(void) const; 28395f389652b69ee5487f18e744b7f54dcda1c733cdirk 28495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Font point size 28595f389652b69ee5487f18e744b7f54dcda1c733cdirk void fontPointsize(const double pointSize_); 28695f389652b69ee5487f18e744b7f54dcda1c733cdirk double fontPointsize(void) const; 28795f389652b69ee5487f18e744b7f54dcda1c733cdirk 28895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Long image format description 28995f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string format(void) const; 29095f389652b69ee5487f18e744b7f54dcda1c733cdirk 29195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Gamma level of the image 29295f389652b69ee5487f18e744b7f54dcda1c733cdirk double gamma(void) const; 29395f389652b69ee5487f18e744b7f54dcda1c733cdirk 29495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Preferred size of the image when encoding 29595f389652b69ee5487f18e744b7f54dcda1c733cdirk Geometry geometry(void) const; 29695f389652b69ee5487f18e744b7f54dcda1c733cdirk 29795f389652b69ee5487f18e744b7f54dcda1c733cdirk // GIF disposal method 29895f389652b69ee5487f18e744b7f54dcda1c733cdirk void gifDisposeMethod(const size_t disposeMethod_); 29995f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t gifDisposeMethod(void) const; 30095f389652b69ee5487f18e744b7f54dcda1c733cdirk 30195f389652b69ee5487f18e744b7f54dcda1c733cdirk // ICC color profile (BLOB) 30295f389652b69ee5487f18e744b7f54dcda1c733cdirk void iccColorProfile(const Blob &colorProfile_); 30395f389652b69ee5487f18e744b7f54dcda1c733cdirk Blob iccColorProfile(void) const; 30495f389652b69ee5487f18e744b7f54dcda1c733cdirk 30595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Type of interlacing to use 30695f389652b69ee5487f18e744b7f54dcda1c733cdirk void interlaceType(const InterlaceType interlace_); 30795f389652b69ee5487f18e744b7f54dcda1c733cdirk InterlaceType interlaceType(void) const; 30895f389652b69ee5487f18e744b7f54dcda1c733cdirk 30995f389652b69ee5487f18e744b7f54dcda1c733cdirk // IPTC profile (BLOB) 31095f389652b69ee5487f18e744b7f54dcda1c733cdirk void iptcProfile(const Blob &iptcProfile_); 31195f389652b69ee5487f18e744b7f54dcda1c733cdirk Blob iptcProfile(void) const; 31295f389652b69ee5487f18e744b7f54dcda1c733cdirk 31395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Does object contain valid image? 31495f389652b69ee5487f18e744b7f54dcda1c733cdirk void isValid(const bool isValid_); 31595f389652b69ee5487f18e744b7f54dcda1c733cdirk bool isValid(void) const; 31695f389652b69ee5487f18e744b7f54dcda1c733cdirk 31795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image label 31895f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string label(void) const; 31995f389652b69ee5487f18e744b7f54dcda1c733cdirk 32095f389652b69ee5487f18e744b7f54dcda1c733cdirk // File type magick identifier (.e.g "GIF") 32195f389652b69ee5487f18e744b7f54dcda1c733cdirk void magick(const std::string &magick_); 32295f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string magick(void) const; 32395f389652b69ee5487f18e744b7f54dcda1c733cdirk 32495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image supports transparency (matte channel) 32595f389652b69ee5487f18e744b7f54dcda1c733cdirk void matte(const bool matteFlag_); 32695f389652b69ee5487f18e744b7f54dcda1c733cdirk bool matte(void) const; 32795f389652b69ee5487f18e744b7f54dcda1c733cdirk 32895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Transparent color 32995f389652b69ee5487f18e744b7f54dcda1c733cdirk void matteColor(const Color &matteColor_); 33095f389652b69ee5487f18e744b7f54dcda1c733cdirk Color matteColor(void) const; 33195f389652b69ee5487f18e744b7f54dcda1c733cdirk 33295f389652b69ee5487f18e744b7f54dcda1c733cdirk // The mean error per pixel computed when an image is color reduced 33395f389652b69ee5487f18e744b7f54dcda1c733cdirk double meanErrorPerPixel(void) const; 33495f389652b69ee5487f18e744b7f54dcda1c733cdirk 33595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image modulus depth (minimum number of bits required to support 33695f389652b69ee5487f18e744b7f54dcda1c733cdirk // red/green/blue components without loss of accuracy) 33795f389652b69ee5487f18e744b7f54dcda1c733cdirk void modulusDepth(const size_t modulusDepth_); 33895f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t modulusDepth(void) const; 33995f389652b69ee5487f18e744b7f54dcda1c733cdirk 34095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Tile size and offset within an image montage 34195f389652b69ee5487f18e744b7f54dcda1c733cdirk Geometry montageGeometry(void) const; 34295f389652b69ee5487f18e744b7f54dcda1c733cdirk 34395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Transform image to black and white 34495f389652b69ee5487f18e744b7f54dcda1c733cdirk void monochrome(const bool monochromeFlag_); 34595f389652b69ee5487f18e744b7f54dcda1c733cdirk bool monochrome(void) const; 34695f389652b69ee5487f18e744b7f54dcda1c733cdirk 34795f389652b69ee5487f18e744b7f54dcda1c733cdirk // The normalized max error per pixel computed when an image is 34895f389652b69ee5487f18e744b7f54dcda1c733cdirk // color reduced. 34995f389652b69ee5487f18e744b7f54dcda1c733cdirk double normalizedMaxError(void) const; 35095f389652b69ee5487f18e744b7f54dcda1c733cdirk 35195f389652b69ee5487f18e744b7f54dcda1c733cdirk // The normalized mean error per pixel computed when an image is 35295f389652b69ee5487f18e744b7f54dcda1c733cdirk // color reduced. 35395f389652b69ee5487f18e744b7f54dcda1c733cdirk double normalizedMeanError(void) const; 35495f389652b69ee5487f18e744b7f54dcda1c733cdirk 35595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image orientation 35695f389652b69ee5487f18e744b7f54dcda1c733cdirk void orientation(const OrientationType orientation_); 35795f389652b69ee5487f18e744b7f54dcda1c733cdirk OrientationType orientation(void) const; 35895f389652b69ee5487f18e744b7f54dcda1c733cdirk 35995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Preferred size and location of an image canvas. 36095f389652b69ee5487f18e744b7f54dcda1c733cdirk void page(const Geometry &pageSize_); 36195f389652b69ee5487f18e744b7f54dcda1c733cdirk Geometry page(void) const; 36295f389652b69ee5487f18e744b7f54dcda1c733cdirk 36395f389652b69ee5487f18e744b7f54dcda1c733cdirk // JPEG/MIFF/PNG compression level (default 75). 36495f389652b69ee5487f18e744b7f54dcda1c733cdirk void quality(const size_t quality_); 36595f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t quality(void) const; 36695f389652b69ee5487f18e744b7f54dcda1c733cdirk 36795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Maximum number of colors to quantize to 36895f389652b69ee5487f18e744b7f54dcda1c733cdirk void quantizeColors(const size_t colors_); 36995f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t quantizeColors(void) const; 37095f389652b69ee5487f18e744b7f54dcda1c733cdirk 37195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Colorspace to quantize in. 37295f389652b69ee5487f18e744b7f54dcda1c733cdirk void quantizeColorSpace(const ColorspaceType colorSpace_); 37395f389652b69ee5487f18e744b7f54dcda1c733cdirk ColorspaceType quantizeColorSpace(void) const; 37495f389652b69ee5487f18e744b7f54dcda1c733cdirk 37595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Dither image during quantization (default true). 37695f389652b69ee5487f18e744b7f54dcda1c733cdirk void quantizeDither(const bool ditherFlag_); 37795f389652b69ee5487f18e744b7f54dcda1c733cdirk bool quantizeDither(void) const; 37895f389652b69ee5487f18e744b7f54dcda1c733cdirk 37995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Quantization tree-depth 38095f389652b69ee5487f18e744b7f54dcda1c733cdirk void quantizeTreeDepth(const size_t treeDepth_); 38195f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t quantizeTreeDepth(void) const; 38295f389652b69ee5487f18e744b7f54dcda1c733cdirk 38395f389652b69ee5487f18e744b7f54dcda1c733cdirk // The type of rendering intent 38495f389652b69ee5487f18e744b7f54dcda1c733cdirk void renderingIntent(const RenderingIntent renderingIntent_); 38595f389652b69ee5487f18e744b7f54dcda1c733cdirk RenderingIntent renderingIntent(void) const; 38695f389652b69ee5487f18e744b7f54dcda1c733cdirk 38795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Units of image resolution 38895f389652b69ee5487f18e744b7f54dcda1c733cdirk void resolutionUnits(const ResolutionType resolutionUnits_); 38995f389652b69ee5487f18e744b7f54dcda1c733cdirk ResolutionType resolutionUnits(void) const; 39095f389652b69ee5487f18e744b7f54dcda1c733cdirk 39195f389652b69ee5487f18e744b7f54dcda1c733cdirk // The number of pixel rows in the image 39295f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t rows(void) const; 39395f389652b69ee5487f18e744b7f54dcda1c733cdirk 39495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image scene number 39595f389652b69ee5487f18e744b7f54dcda1c733cdirk void scene(const size_t scene_); 39695f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t scene(void) const; 39795f389652b69ee5487f18e744b7f54dcda1c733cdirk 39895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Width and height of a raw image 39995f389652b69ee5487f18e744b7f54dcda1c733cdirk void size(const Geometry &geometry_); 40095f389652b69ee5487f18e744b7f54dcda1c733cdirk Geometry size(void) const; 40195f389652b69ee5487f18e744b7f54dcda1c733cdirk 40295f389652b69ee5487f18e744b7f54dcda1c733cdirk // enabled/disable stroke anti-aliasing 40395f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeAntiAlias(const bool flag_); 40495f389652b69ee5487f18e744b7f54dcda1c733cdirk bool strokeAntiAlias(void) const; 40595f389652b69ee5487f18e744b7f54dcda1c733cdirk 40695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Color to use when drawing object outlines 40795f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeColor(const Color &strokeColor_); 40895f389652b69ee5487f18e744b7f54dcda1c733cdirk Color strokeColor(void) const; 40995f389652b69ee5487f18e744b7f54dcda1c733cdirk 41095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Specify the pattern of dashes and gaps used to stroke 41195f389652b69ee5487f18e744b7f54dcda1c733cdirk // paths. The strokeDashArray represents a zero-terminated array 41295f389652b69ee5487f18e744b7f54dcda1c733cdirk // of numbers that specify the lengths of alternating dashes and 41395f389652b69ee5487f18e744b7f54dcda1c733cdirk // gaps in pixels. If an odd number of values is provided, then 41495f389652b69ee5487f18e744b7f54dcda1c733cdirk // the list of values is repeated to yield an even number of 41595f389652b69ee5487f18e744b7f54dcda1c733cdirk // values. A typical strokeDashArray_ array might contain the 41695f389652b69ee5487f18e744b7f54dcda1c733cdirk // members 5 3 2 0, where the zero value indicates the end of the 41795f389652b69ee5487f18e744b7f54dcda1c733cdirk // pattern array. 41895f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeDashArray(const double *strokeDashArray_); 41995f389652b69ee5487f18e744b7f54dcda1c733cdirk const double *strokeDashArray(void) const; 42095f389652b69ee5487f18e744b7f54dcda1c733cdirk 42195f389652b69ee5487f18e744b7f54dcda1c733cdirk // While drawing using a dash pattern, specify distance into the 42295f389652b69ee5487f18e744b7f54dcda1c733cdirk // dash pattern to start the dash (default 0). 42395f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeDashOffset(const double strokeDashOffset_); 42495f389652b69ee5487f18e744b7f54dcda1c733cdirk double strokeDashOffset(void) const; 42595f389652b69ee5487f18e744b7f54dcda1c733cdirk 42695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Specify the shape to be used at the end of open subpaths when 42795f389652b69ee5487f18e744b7f54dcda1c733cdirk // they are stroked. Values of LineCap are UndefinedCap, ButtCap, 42895f389652b69ee5487f18e744b7f54dcda1c733cdirk // RoundCap, and SquareCap. 42995f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeLineCap(const LineCap lineCap_); 43095f389652b69ee5487f18e744b7f54dcda1c733cdirk LineCap strokeLineCap(void) const; 43195f389652b69ee5487f18e744b7f54dcda1c733cdirk 43295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Specify the shape to be used at the corners of paths (or other 43395f389652b69ee5487f18e744b7f54dcda1c733cdirk // vector shapes) when they are stroked. Values of LineJoin are 43495f389652b69ee5487f18e744b7f54dcda1c733cdirk // UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. 43595f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeLineJoin(const LineJoin lineJoin_); 43695f389652b69ee5487f18e744b7f54dcda1c733cdirk LineJoin strokeLineJoin(void) const; 43795f389652b69ee5487f18e744b7f54dcda1c733cdirk 43895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Specify miter limit. When two line segments meet at a sharp 43995f389652b69ee5487f18e744b7f54dcda1c733cdirk // angle and miter joins have been specified for 'lineJoin', it is 44095f389652b69ee5487f18e744b7f54dcda1c733cdirk // possible for the miter to extend far beyond the thickness of 44195f389652b69ee5487f18e744b7f54dcda1c733cdirk // the line stroking the path. The miterLimit' imposes a limit on 44295f389652b69ee5487f18e744b7f54dcda1c733cdirk // the ratio of the miter length to the 'lineWidth'. The default 44395f389652b69ee5487f18e744b7f54dcda1c733cdirk // value of this parameter is 4. 44495f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeMiterLimit(const size_t miterLimit_); 44595f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t strokeMiterLimit(void) const; 44695f389652b69ee5487f18e744b7f54dcda1c733cdirk 44795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Pattern image to use while stroking object outlines. 44895f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokePattern(const Image &strokePattern_); 44995f389652b69ee5487f18e744b7f54dcda1c733cdirk Image strokePattern(void) const; 45095f389652b69ee5487f18e744b7f54dcda1c733cdirk 45195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Stroke width for drawing vector objects (default one) 45295f389652b69ee5487f18e744b7f54dcda1c733cdirk void strokeWidth(const double strokeWidth_); 45395f389652b69ee5487f18e744b7f54dcda1c733cdirk double strokeWidth(void) const; 45495f389652b69ee5487f18e744b7f54dcda1c733cdirk 45595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Subimage of an image sequence 45695f389652b69ee5487f18e744b7f54dcda1c733cdirk void subImage(const size_t subImage_); 45795f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t subImage(void) const; 45895f389652b69ee5487f18e744b7f54dcda1c733cdirk 45995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Number of images relative to the base image 46095f389652b69ee5487f18e744b7f54dcda1c733cdirk void subRange(const size_t subRange_); 46195f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t subRange(void) const; 46295f389652b69ee5487f18e744b7f54dcda1c733cdirk 46395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Annotation text encoding (e.g. "UTF-16") 46495f389652b69ee5487f18e744b7f54dcda1c733cdirk void textEncoding(const std::string &encoding_); 46595f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string textEncoding(void) const; 46695f389652b69ee5487f18e744b7f54dcda1c733cdirk 46795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Number of colors in the image 46895f389652b69ee5487f18e744b7f54dcda1c733cdirk size_t totalColors(void) const; 46995f389652b69ee5487f18e744b7f54dcda1c733cdirk 47095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Rotation to use when annotating with text or drawing 47195f389652b69ee5487f18e744b7f54dcda1c733cdirk void transformRotation(const double angle_); 47295f389652b69ee5487f18e744b7f54dcda1c733cdirk 47395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Skew to use in X axis when annotating with text or drawing 47495f389652b69ee5487f18e744b7f54dcda1c733cdirk void transformSkewX(const double skewx_); 47595f389652b69ee5487f18e744b7f54dcda1c733cdirk 47695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Skew to use in Y axis when annotating with text or drawing 47795f389652b69ee5487f18e744b7f54dcda1c733cdirk void transformSkewY(const double skewy_); 47895f389652b69ee5487f18e744b7f54dcda1c733cdirk 47995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image representation type (also see type operation) 48095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Available types: 48195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Bilevel Grayscale GrayscaleMatte 48295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Palette PaletteMatte TrueColor 48395f389652b69ee5487f18e744b7f54dcda1c733cdirk // TrueColorMatte ColorSeparation ColorSeparationMatte 48495f389652b69ee5487f18e744b7f54dcda1c733cdirk void type(const ImageType type_); 48595f389652b69ee5487f18e744b7f54dcda1c733cdirk ImageType type(void) const; 48695f389652b69ee5487f18e744b7f54dcda1c733cdirk 48795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Print detailed information about the image 48895f389652b69ee5487f18e744b7f54dcda1c733cdirk void verbose(const bool verboseFlag_); 48995f389652b69ee5487f18e744b7f54dcda1c733cdirk bool verbose(void) const; 49095f389652b69ee5487f18e744b7f54dcda1c733cdirk 49195f389652b69ee5487f18e744b7f54dcda1c733cdirk // FlashPix viewing parameters 49295f389652b69ee5487f18e744b7f54dcda1c733cdirk void view(const std::string &view_); 49395f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string view(void) const; 49495f389652b69ee5487f18e744b7f54dcda1c733cdirk 49595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Virtual pixel method 49695f389652b69ee5487f18e744b7f54dcda1c733cdirk void virtualPixelMethod(const VirtualPixelMethod virtualPixelMethod_); 49795f389652b69ee5487f18e744b7f54dcda1c733cdirk VirtualPixelMethod virtualPixelMethod(void) const; 49895f389652b69ee5487f18e744b7f54dcda1c733cdirk 49995f389652b69ee5487f18e744b7f54dcda1c733cdirk // X11 display to display to, obtain fonts from, or to capture 50095f389652b69ee5487f18e744b7f54dcda1c733cdirk // image from 50195f389652b69ee5487f18e744b7f54dcda1c733cdirk void x11Display(const std::string &display_); 50295f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string x11Display(void) const; 50395f389652b69ee5487f18e744b7f54dcda1c733cdirk 50495f389652b69ee5487f18e744b7f54dcda1c733cdirk // x resolution of the image 50595f389652b69ee5487f18e744b7f54dcda1c733cdirk double xResolution(void) const; 50695f389652b69ee5487f18e744b7f54dcda1c733cdirk 50795f389652b69ee5487f18e744b7f54dcda1c733cdirk // y resolution of the image 50895f389652b69ee5487f18e744b7f54dcda1c733cdirk double yResolution(void) const; 5093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Adaptive-blur image with specified blur factor 5113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 5123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 5133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 51495f389652b69ee5487f18e744b7f54dcda1c733cdirk void adaptiveBlur(const double radius_=0.0,const double sigma_=1.0); 5157323460d5cd42b6e10481f8fdbbdab7237cffab7dirk 5167323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // This is shortcut function for a fast interpolative resize using mesh 5177323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // interpolation. It works well for small resizes of less than +/- 50% 5187323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // of the original image size. For larger resizing on images a full 5197323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // filtered and slower resize function should be used instead. 52095f389652b69ee5487f18e744b7f54dcda1c733cdirk void adaptiveResize(const Geometry &geometry_); 5217323460d5cd42b6e10481f8fdbbdab7237cffab7dirk 5227323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // Adaptively sharpens the image by sharpening more intensely near image 5237323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // edges and less intensely far from edges. We sharpen the image with a 5247323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // Gaussian operator of the given radius and standard deviation (sigma). 5257323460d5cd42b6e10481f8fdbbdab7237cffab7dirk // For reasonable results, radius should be larger than sigma. 52695f389652b69ee5487f18e744b7f54dcda1c733cdirk void adaptiveSharpen(const double radius_=0.0,const double sigma_=1.0); 52795f389652b69ee5487f18e744b7f54dcda1c733cdirk void adaptiveSharpenChannel(const ChannelType channel_, 52895f389652b69ee5487f18e744b7f54dcda1c733cdirk const double radius_=0.0,const double sigma_=1.0); 5297323460d5cd42b6e10481f8fdbbdab7237cffab7dirk 5303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Local adaptive threshold image 5313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm 5323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Width x height define the size of the pixel neighborhood 5333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // offset = constant to subtract from pixel neighborhood mean 53495f389652b69ee5487f18e744b7f54dcda1c733cdirk void adaptiveThreshold(const size_t width,const size_t height, 53595f389652b69ee5487f18e744b7f54dcda1c733cdirk const ::ssize_t offset=0); 5363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add noise to image with specified noise type 53895f389652b69ee5487f18e744b7f54dcda1c733cdirk void addNoise(const NoiseType noiseType_); 53995f389652b69ee5487f18e744b7f54dcda1c733cdirk void addNoiseChannel(const ChannelType channel_, 54095f389652b69ee5487f18e744b7f54dcda1c733cdirk const NoiseType noiseType_); 5413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transform image by specified affine (or free transform) matrix. 54395f389652b69ee5487f18e744b7f54dcda1c733cdirk void affineTransform(const DrawableAffine &affine); 5443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5451bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Set or attenuate the alpha channel in the image. If the image 5461bab013cd87579204c8eb4671e3e658ef49d9aaadirk // pixels are opaque then they are set to the specified alpha 5471bab013cd87579204c8eb4671e3e658ef49d9aaadirk // value, otherwise they are blended with the supplied alpha 5481bab013cd87579204c8eb4671e3e658ef49d9aaadirk // value. The value of alpha_ ranges from 0 (completely opaque) 5491bab013cd87579204c8eb4671e3e658ef49d9aaadirk // to QuantumRange. The defines OpaqueAlpha and TransparentAlpha are 5501bab013cd87579204c8eb4671e3e658ef49d9aaadirk // available to specify completely opaque or completely 5511bab013cd87579204c8eb4671e3e658ef49d9aaadirk // transparent, respectively. 55295f389652b69ee5487f18e744b7f54dcda1c733cdirk void alpha(const unsigned int alpha_); 5531bab013cd87579204c8eb4671e3e658ef49d9aaadirk 554d246d8eb9563661d9cfe52a2dd87414bd2e10a5fdirk // AlphaChannel() activates, deactivates, resets, or sets the alpha 555d246d8eb9563661d9cfe52a2dd87414bd2e10a5fdirk // channel. 55695f389652b69ee5487f18e744b7f54dcda1c733cdirk void alphaChannel(AlphaChannelOption alphaOption_); 55795f389652b69ee5487f18e744b7f54dcda1c733cdirk 55895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Floodfill designated area with replacement alpha value 55995f389652b69ee5487f18e744b7f54dcda1c733cdirk void alphaFloodfill(const Color &target_,const unsigned int alpha_, 56095f389652b69ee5487f18e744b7f54dcda1c733cdirk const ::ssize_t x_, const ::ssize_t y_,const PaintMethod method_); 561d246d8eb9563661d9cfe52a2dd87414bd2e10a5fdirk 5623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 5633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate image (draw text on image) 5643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 5653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Gravity effects text placement in bounding area according to rules: 5663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // NorthWestGravity text bottom-left corner placed at top-left 5673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // NorthGravity text bottom-center placed at top-center 5683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // NorthEastGravity text bottom-right corner placed at top-right 5693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // WestGravity text left-center placed at left-center 5703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // CenterGravity text center placed at center 5713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // EastGravity text right-center placed at right-center 5723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // SouthWestGravity text top-left placed at bottom-left 5733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // SouthGravity text top-center placed at bottom-center 5743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // SouthEastGravity text top-right placed at bottom-right 5753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate using specified text, and placement location 57795f389652b69ee5487f18e744b7f54dcda1c733cdirk void annotate(const std::string &text_,const Geometry &location_); 57895f389652b69ee5487f18e744b7f54dcda1c733cdirk 5793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate using specified text, bounding area, and placement 5803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gravity 58195f389652b69ee5487f18e744b7f54dcda1c733cdirk void annotate(const std::string &text_,const Geometry &boundingArea_, 58295f389652b69ee5487f18e744b7f54dcda1c733cdirk const GravityType gravity_); 58395f389652b69ee5487f18e744b7f54dcda1c733cdirk 5843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate with text using specified text, bounding area, 5853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // placement gravity, and rotation. 58695f389652b69ee5487f18e744b7f54dcda1c733cdirk void annotate(const std::string &text_,const Geometry &boundingArea_, 58795f389652b69ee5487f18e744b7f54dcda1c733cdirk const GravityType gravity_,const double degrees_); 58895f389652b69ee5487f18e744b7f54dcda1c733cdirk 5893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate with text (bounding area is entire image) and placement 5903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gravity. 59195f389652b69ee5487f18e744b7f54dcda1c733cdirk void annotate(const std::string &text_,const GravityType gravity_); 592b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy 593b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy // Inserts the artifact with the specified name and value into 594b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy // the artifact tree of the image. 59595f389652b69ee5487f18e744b7f54dcda1c733cdirk void artifact(const std::string &name_,const std::string &value_); 59695f389652b69ee5487f18e744b7f54dcda1c733cdirk 597b5e877bd8701bc3f0ac1e9a3679a6cee64c69674cristy // Returns the value of the artifact with the specified name. 59895f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string artifact(const std::string &name_); 59995f389652b69ee5487f18e744b7f54dcda1c733cdirk 60095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Access/Update a named image attribute 60195f389652b69ee5487f18e744b7f54dcda1c733cdirk void attribute(const std::string name_,const std::string value_); 60295f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string attribute(const std::string name_); 603ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk 604ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk // Extracts the 'mean' from the image and adjust the image to try 605ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk // make set its gamma appropriatally. 60695f389652b69ee5487f18e744b7f54dcda1c733cdirk void autoGamma(void); 60795f389652b69ee5487f18e744b7f54dcda1c733cdirk void autoGammaChannel(const ChannelType channel_); 608ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk 609ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk // Adjusts the levels of a particular image channel by scaling the 610ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk // minimum and maximum values to the full quantum range. 61195f389652b69ee5487f18e744b7f54dcda1c733cdirk void autoLevel(void); 61295f389652b69ee5487f18e744b7f54dcda1c733cdirk void autoLevelChannel(const ChannelType channel_); 613ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk 614ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk // Adjusts an image so that its orientation is suitable for viewing. 61595f389652b69ee5487f18e744b7f54dcda1c733cdirk void autoOrient(void); 616ff9693a0273bd1ff375da6d0488aa70ba7aa84bedirk 617092a8ea1959d818804462ea79231863dc2e3fd26dirk // Forces all pixels below the threshold into black while leaving all 618092a8ea1959d818804462ea79231863dc2e3fd26dirk // pixels at or above the threshold unchanged. 61995f389652b69ee5487f18e744b7f54dcda1c733cdirk void blackThreshold(const std::string &threshold_); 62095f389652b69ee5487f18e744b7f54dcda1c733cdirk void blackThresholdChannel(const ChannelType channel_, 62195f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &threshold_); 622092a8ea1959d818804462ea79231863dc2e3fd26dirk 623f27731d206fb6b9b791c0964837f85fa85883ed2dirk // Simulate a scene at nighttime in the moonlight. 62495f389652b69ee5487f18e744b7f54dcda1c733cdirk void blueShift(const double factor_=1.5); 625f27731d206fb6b9b791c0964837f85fa85883ed2dirk 6263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Blur image with specified blur factor 6273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 6283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 6293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 63095f389652b69ee5487f18e744b7f54dcda1c733cdirk void blur(const double radius_=0.0,const double sigma_=1.0); 63195f389652b69ee5487f18e744b7f54dcda1c733cdirk void blurChannel(const ChannelType channel_,const double radius_=0.0, 63295f389652b69ee5487f18e744b7f54dcda1c733cdirk const double sigma_=1.0); 633092a8ea1959d818804462ea79231863dc2e3fd26dirk 6343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Border image (add border to image) 63595f389652b69ee5487f18e744b7f54dcda1c733cdirk void border(const Geometry &geometry_=borderGeometryDefault); 6363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 637f27731d206fb6b9b791c0964837f85fa85883ed2dirk // Changes the brightness and/or contrast of an image. It converts the 638f27731d206fb6b9b791c0964837f85fa85883ed2dirk // brightness and contrast parameters into slope and intercept and calls 639f27731d206fb6b9b791c0964837f85fa85883ed2dirk // a polynomical function to apply to the image. 64095f389652b69ee5487f18e744b7f54dcda1c733cdirk void brightnessContrast(const double brightness_=0.0, 64195f389652b69ee5487f18e744b7f54dcda1c733cdirk const double contrast_=0.0); 64295f389652b69ee5487f18e744b7f54dcda1c733cdirk void brightnessContrastChannel(const ChannelType channel_, 64395f389652b69ee5487f18e744b7f54dcda1c733cdirk const double brightness_=0.0,const double contrast_=0.0); 644f27731d206fb6b9b791c0964837f85fa85883ed2dirk 6453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Extract channel from image 64695f389652b69ee5487f18e744b7f54dcda1c733cdirk void channel(const ChannelType channel_); 6473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Charcoal effect image (looks like charcoal sketch) 6493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 6503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 6513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 65295f389652b69ee5487f18e744b7f54dcda1c733cdirk void charcoal(const double radius_=0.0,const double sigma_=1.0); 6533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Chop image (remove vertical or horizontal subregion of image) 6553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // FIXME: describe how geometry argument is used to select either 6563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // horizontal or vertical subregion of image. 65795f389652b69ee5487f18e744b7f54dcda1c733cdirk void chop(const Geometry &geometry_); 6583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 65995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Chromaticity blue primary point (e.g. x=0.15, y=0.06) 66095f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaBluePrimary(const double x_,const double y_); 66195f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaBluePrimary(double *x_,double *y_) const; 66295f389652b69ee5487f18e744b7f54dcda1c733cdirk 66395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Chromaticity green primary point (e.g. x=0.3, y=0.6) 66495f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaGreenPrimary(const double x_,const double y_); 66595f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaGreenPrimary(double *x_,double *y_) const; 66695f389652b69ee5487f18e744b7f54dcda1c733cdirk 66795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Chromaticity red primary point (e.g. x=0.64, y=0.33) 66895f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaRedPrimary(const double x_,const double y_); 66995f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaRedPrimary(double *x_,double *y_) const; 67095f389652b69ee5487f18e744b7f54dcda1c733cdirk 67195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Chromaticity white point (e.g. x=0.3127, y=0.329) 67295f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaWhitePoint(const double x_,const double y_); 67395f389652b69ee5487f18e744b7f54dcda1c733cdirk void chromaWhitePoint(double *x_,double *y_) const; 67495f389652b69ee5487f18e744b7f54dcda1c733cdirk 67595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Accepts a lightweight Color Correction Collection 676b32b90a7e1ee2275333589072c496b5f69e17feccristy // (CCC) file which solely contains one or more color corrections and 677b32b90a7e1ee2275333589072c496b5f69e17feccristy // applies the correction to the image. 67895f389652b69ee5487f18e744b7f54dcda1c733cdirk void cdl(const std::string &cdl_); 679f27731d206fb6b9b791c0964837f85fa85883ed2dirk 680f27731d206fb6b9b791c0964837f85fa85883ed2dirk // Set each pixel whose value is below zero to zero and any the 681f27731d206fb6b9b791c0964837f85fa85883ed2dirk // pixel whose value is above the quantum range to the quantum range (e.g. 682f27731d206fb6b9b791c0964837f85fa85883ed2dirk // 65535) otherwise the pixel value remains unchanged. 68395f389652b69ee5487f18e744b7f54dcda1c733cdirk void clamp(void); 68495f389652b69ee5487f18e744b7f54dcda1c733cdirk void clampChannel(const ChannelType channel_); 685f27731d206fb6b9b791c0964837f85fa85883ed2dirk 686d561b30050e85b31ba71c5dc15cc3ab3af403e65dirk // Sets the image clip mask based on any clipping path information 687d561b30050e85b31ba71c5dc15cc3ab3af403e65dirk // if it exists. 68895f389652b69ee5487f18e744b7f54dcda1c733cdirk void clip(void); 68995f389652b69ee5487f18e744b7f54dcda1c733cdirk void clipPath(const std::string pathname_,const bool inside_); 690d561b30050e85b31ba71c5dc15cc3ab3af403e65dirk 691f27731d206fb6b9b791c0964837f85fa85883ed2dirk // Apply a color lookup table (CLUT) to the image. 69295f389652b69ee5487f18e744b7f54dcda1c733cdirk void clut(const Image &clutImage_,const PixelInterpolateMethod method); 69395f389652b69ee5487f18e744b7f54dcda1c733cdirk void clutChannel(const ChannelType channel_,const Image &clutImage_, 69495f389652b69ee5487f18e744b7f54dcda1c733cdirk const PixelInterpolateMethod method); 69595f389652b69ee5487f18e744b7f54dcda1c733cdirk 69695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Colorize image with pen color, using specified percent alpha. 69795f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorize(const unsigned int alpha_,const Color &penColor_); 698f27731d206fb6b9b791c0964837f85fa85883ed2dirk 6994c08aed51c5899665ade97263692328eea4af106cristy // Colorize image with pen color, using specified percent alpha 7003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // for red, green, and blue quantums 70195f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorize(const unsigned int alphaRed_,const unsigned int alphaGreen_, 70295f389652b69ee5487f18e744b7f54dcda1c733cdirk const unsigned int alphaBlue_,const Color &penColor_); 70395f389652b69ee5487f18e744b7f54dcda1c733cdirk 70495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Color at colormap position index_ 70595f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorMap(const size_t index_,const Color &color_); 70695f389652b69ee5487f18e744b7f54dcda1c733cdirk Color colorMap(const size_t index_) const; 70795f389652b69ee5487f18e744b7f54dcda1c733cdirk 70895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Apply a color matrix to the image channels. The user supplied 709c8918bb2b224f642b06140506fa85a3703fa0748cristy // matrix may be of order 1 to 5 (1x1 through 5x5). 71095f389652b69ee5487f18e744b7f54dcda1c733cdirk void colorMatrix(const size_t order_,const double *color_matrix_); 7113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Compare current image with another image 7133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError 7143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in the current image. False is returned if the images are identical. 71595f389652b69ee5487f18e744b7f54dcda1c733cdirk bool compare(const Image &reference_); 7163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 71741c73241c91f5a5debf9380cdcff10f26aa04cc3dirk // Compare current image with another image 71841c73241c91f5a5debf9380cdcff10f26aa04cc3dirk // Returns the distortion based on the specified metric. 71995f389652b69ee5487f18e744b7f54dcda1c733cdirk double compare(const Image &reference_,const MetricType metric_); 72095f389652b69ee5487f18e744b7f54dcda1c733cdirk double compareChannel(const ChannelType channel_, 72141c73241c91f5a5debf9380cdcff10f26aa04cc3dirk const Image &reference_, 72241c73241c91f5a5debf9380cdcff10f26aa04cc3dirk const MetricType metric_ ); 72341c73241c91f5a5debf9380cdcff10f26aa04cc3dirk 72441c73241c91f5a5debf9380cdcff10f26aa04cc3dirk // Compare current image with another image 72541c73241c91f5a5debf9380cdcff10f26aa04cc3dirk // Sets the distortion and returns the difference image. 72695f389652b69ee5487f18e744b7f54dcda1c733cdirk Image compare(const Image &reference_,const MetricType metric_, 72795f389652b69ee5487f18e744b7f54dcda1c733cdirk double *distortion); 72895f389652b69ee5487f18e744b7f54dcda1c733cdirk Image compareChannel(const ChannelType channel_,const Image &reference_, 72995f389652b69ee5487f18e744b7f54dcda1c733cdirk const MetricType metric_,double *distortion); 73041c73241c91f5a5debf9380cdcff10f26aa04cc3dirk 7313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Compose an image onto another at specified offset and using 7323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified algorithm 73395f389652b69ee5487f18e744b7f54dcda1c733cdirk void composite(const Image &compositeImage_,const Geometry &offset_, 73495f389652b69ee5487f18e744b7f54dcda1c733cdirk const CompositeOperator compose_=InCompositeOp); 73595f389652b69ee5487f18e744b7f54dcda1c733cdirk void composite(const Image &compositeImage_,const GravityType gravity_, 73695f389652b69ee5487f18e744b7f54dcda1c733cdirk const CompositeOperator compose_=InCompositeOp); 73795f389652b69ee5487f18e744b7f54dcda1c733cdirk void composite(const Image &compositeImage_,const ::ssize_t xOffset_, 73895f389652b69ee5487f18e744b7f54dcda1c733cdirk const ::ssize_t yOffset_,const CompositeOperator compose_=InCompositeOp); 739f27731d206fb6b9b791c0964837f85fa85883ed2dirk 7403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Contrast image (enhance intensity differences in image) 74195f389652b69ee5487f18e744b7f54dcda1c733cdirk void contrast(const size_t sharpen_); 7423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 743f27731d206fb6b9b791c0964837f85fa85883ed2dirk // A simple image enhancement technique that attempts to improve the 744f27731d206fb6b9b791c0964837f85fa85883ed2dirk // contrast in an image by 'stretching' the range of intensity values 745f27731d206fb6b9b791c0964837f85fa85883ed2dirk // it contains to span a desired range of values. It differs from the 746f27731d206fb6b9b791c0964837f85fa85883ed2dirk // more sophisticated histogram equalization in that it can only apply a 747f27731d206fb6b9b791c0964837f85fa85883ed2dirk // linear scaling function to the image pixel values. As a result the 748f27731d206fb6b9b791c0964837f85fa85883ed2dirk // 'enhancement' is less harsh. 74995f389652b69ee5487f18e744b7f54dcda1c733cdirk void contrastStretch(const double black_point_,const double white_point_); 75095f389652b69ee5487f18e744b7f54dcda1c733cdirk void contrastStretchChannel(const ChannelType channel_, 75195f389652b69ee5487f18e744b7f54dcda1c733cdirk const double black_point_,const double white_point_); 752f27731d206fb6b9b791c0964837f85fa85883ed2dirk 7533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Convolve image. Applies a user-specified convolution to the image. 7543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // order_ represents the number of columns and rows in the filter kernel. 7553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // kernel_ is an array of doubles representing the convolution kernel. 75695f389652b69ee5487f18e744b7f54dcda1c733cdirk void convolve(const size_t order_,const double *kernel_); 7573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Crop image (subregion of original image) 75995f389652b69ee5487f18e744b7f54dcda1c733cdirk void crop(const Geometry &geometry_); 7605fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 7613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Cycle image colormap 76295f389652b69ee5487f18e744b7f54dcda1c733cdirk void cycleColormap(const ::ssize_t amount_); 7635fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 7645fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // Converts cipher pixels to plain pixels. 76595f389652b69ee5487f18e744b7f54dcda1c733cdirk void decipher(const std::string &passphrase_); 76695f389652b69ee5487f18e744b7f54dcda1c733cdirk 76795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Tagged image format define (set/access coder-specific option) The 76895f389652b69ee5487f18e744b7f54dcda1c733cdirk // magick_ option specifies the coder the define applies to. The key_ 76995f389652b69ee5487f18e744b7f54dcda1c733cdirk // option provides the key specific to that coder. The value_ option 77095f389652b69ee5487f18e744b7f54dcda1c733cdirk // provides the value to set (if any). See the defineSet() method if the 77195f389652b69ee5487f18e744b7f54dcda1c733cdirk // key must be removed entirely. 77295f389652b69ee5487f18e744b7f54dcda1c733cdirk void defineValue(const std::string &magick_,const std::string &key_, 77395f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &value_); 77495f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string defineValue(const std::string &magick_, 77595f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &key_) const; 77695f389652b69ee5487f18e744b7f54dcda1c733cdirk 77795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Tagged image format define. Similar to the defineValue() method 77895f389652b69ee5487f18e744b7f54dcda1c733cdirk // except that passing the flag_ value 'true' creates a value-less 77995f389652b69ee5487f18e744b7f54dcda1c733cdirk // define with that format and key. Passing the flag_ value 'false' 78095f389652b69ee5487f18e744b7f54dcda1c733cdirk // removes any existing matching definition. The method returns 'true' 78195f389652b69ee5487f18e744b7f54dcda1c733cdirk // if a matching key exists, and 'false' if no matching key exists. 78295f389652b69ee5487f18e744b7f54dcda1c733cdirk void defineSet(const std::string &magick_,const std::string &key_, 78395f389652b69ee5487f18e744b7f54dcda1c733cdirk bool flag_); 78495f389652b69ee5487f18e744b7f54dcda1c733cdirk bool defineSet(const std::string &magick_,const std::string &key_) const; 7855fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 7865fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // Removes skew from the image. Skew is an artifact that occurs in scanned 7875fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // images because of the camera being misaligned, imperfections in the 7885fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // scanning or surface, or simply because the paper was not placed 7895fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // completely flat when scanned. The value of threshold_ ranges from 0 7905fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // to QuantumRange. 79195f389652b69ee5487f18e744b7f54dcda1c733cdirk void deskew(const double threshold_); 7925fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 7933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Despeckle image (reduce speckle noise) 79495f389652b69ee5487f18e744b7f54dcda1c733cdirk void despeckle(void); 7955fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 7963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Display image on screen 79795f389652b69ee5487f18e744b7f54dcda1c733cdirk void display(void); 7983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Distort image. distorts an image using various distortion methods, by 8003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // mapping color lookups of the source image to a new destination image 8013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // usally of the same size as the source image, unless 'bestfit' is set to 8023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // true. 80395f389652b69ee5487f18e744b7f54dcda1c733cdirk void distort(const DistortImageMethod method_, 80495f389652b69ee5487f18e744b7f54dcda1c733cdirk const size_t numberArguments_,const double *arguments_, 80595f389652b69ee5487f18e744b7f54dcda1c733cdirk const bool bestfit_=false); 8063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Draw on image using a single drawable 80895f389652b69ee5487f18e744b7f54dcda1c733cdirk void draw(const Drawable &drawable_); 8093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Draw on image using a drawable list 81195f389652b69ee5487f18e744b7f54dcda1c733cdirk void draw(const std::list<Magick::Drawable> &drawable_); 8125fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Edge image (hilight edges in image) 81495f389652b69ee5487f18e744b7f54dcda1c733cdirk void edge(const double radius_=0.0); 8155fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Emboss image (hilight edges with 3D effect) 8173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 8183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 8193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 82095f389652b69ee5487f18e744b7f54dcda1c733cdirk void emboss(const double radius_=0.0,const double sigma_=1.0); 8215fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8225fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // Converts pixels to cipher-pixels. 82395f389652b69ee5487f18e744b7f54dcda1c733cdirk void encipher(const std::string &passphrase_); 8245fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Enhance image (minimize noise) 82695f389652b69ee5487f18e744b7f54dcda1c733cdirk void enhance(void); 82795f389652b69ee5487f18e744b7f54dcda1c733cdirk 8283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Equalize image (histogram equalization) 82995f389652b69ee5487f18e744b7f54dcda1c733cdirk void equalize(void); 8303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Erase image to current "background color" 83295f389652b69ee5487f18e744b7f54dcda1c733cdirk void erase(void); 8335fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Extend the image as defined by the geometry. 83595f389652b69ee5487f18e744b7f54dcda1c733cdirk void extent(const Geometry &geometry_); 83695f389652b69ee5487f18e744b7f54dcda1c733cdirk void extent(const Geometry &geometry_,const Color &backgroundColor); 83795f389652b69ee5487f18e744b7f54dcda1c733cdirk void extent(const Geometry &geometry_,const Color &backgroundColor, 83895f389652b69ee5487f18e744b7f54dcda1c733cdirk const GravityType gravity_); 83995f389652b69ee5487f18e744b7f54dcda1c733cdirk void extent(const Geometry &geometry_,const GravityType gravity_); 8405fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flip image (reflect each scanline in the vertical direction) 84295f389652b69ee5487f18e744b7f54dcda1c733cdirk void flip(void); 8433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill color across pixels that match the color of the 8453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // target pixel and are neighbors of the target pixel. 8463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 84795f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillColor(const ::ssize_t x_,const ::ssize_t y_, 84895f389652b69ee5487f18e744b7f54dcda1c733cdirk const Color &fillColor_ ); 84995f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillColor(const Geometry &point_,const Color &fillColor_); 85095f389652b69ee5487f18e744b7f54dcda1c733cdirk 85195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Floodfill pixels matching color (within fuzz factor) of target 85295f389652b69ee5487f18e744b7f54dcda1c733cdirk // pixel(x,y) with replacement alpha value using method. 85395f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillAlpha(const ::ssize_t x_,const ::ssize_t y_, 85495f389652b69ee5487f18e744b7f54dcda1c733cdirk const unsigned int alpha_,const PaintMethod method_); 8553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill color across pixels starting at target-pixel and 8573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // stopping at pixels matching specified border color. 8583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 85995f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillColor(const ::ssize_t x_,const ::ssize_t y_, 86095f389652b69ee5487f18e744b7f54dcda1c733cdirk const Color &fillColor_,const Color &borderColor_); 86195f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillColor(const Geometry &point_,const Color &fillColor_, 86295f389652b69ee5487f18e744b7f54dcda1c733cdirk const Color &borderColor_); 8633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill texture across pixels that match the color of the 8653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // target pixel and are neighbors of the target pixel. 8663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 86795f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillTexture(const ::ssize_t x_,const ::ssize_t y_, 86895f389652b69ee5487f18e744b7f54dcda1c733cdirk const Image &texture_); 86995f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillTexture(const Geometry &point_,const Image &texture_); 8703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill texture across pixels starting at target-pixel and 8723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // stopping at pixels matching specified border color. 8733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 87495f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillTexture(const ::ssize_t x_,const ::ssize_t y_, 87595f389652b69ee5487f18e744b7f54dcda1c733cdirk const Image &texture_,const Color &borderColor_); 87695f389652b69ee5487f18e744b7f54dcda1c733cdirk void floodFillTexture(const Geometry &point_,const Image &texture_, 87795f389652b69ee5487f18e744b7f54dcda1c733cdirk const Color &borderColor_); 8785fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flop image (reflect each scanline in the horizontal direction) 88095f389652b69ee5487f18e744b7f54dcda1c733cdirk void flop(void); 88195f389652b69ee5487f18e744b7f54dcda1c733cdirk 88295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Obtain font metrics for text string given current font, 88395f389652b69ee5487f18e744b7f54dcda1c733cdirk // pointsize, and density settings. 88495f389652b69ee5487f18e744b7f54dcda1c733cdirk void fontTypeMetrics(const std::string &text_,TypeMetric *metrics); 8855fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Frame image 88795f389652b69ee5487f18e744b7f54dcda1c733cdirk void frame(const Geometry &geometry_=frameGeometryDefault); 88895f389652b69ee5487f18e744b7f54dcda1c733cdirk void frame(const size_t width_,const size_t height_, 88995f389652b69ee5487f18e744b7f54dcda1c733cdirk const ::ssize_t innerBevel_=6,const ::ssize_t outerBevel_=6); 8903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Applies a mathematical expression to the image. 89295f389652b69ee5487f18e744b7f54dcda1c733cdirk void fx(const std::string expression); 89395f389652b69ee5487f18e744b7f54dcda1c733cdirk void fx(const std::string expression,const Magick::ChannelType channel); 8945fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 8953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Gamma correct image 89695f389652b69ee5487f18e744b7f54dcda1c733cdirk void gamma(const double gamma_); 89795f389652b69ee5487f18e744b7f54dcda1c733cdirk void gamma(const double gammaRed_,const double gammaGreen_, 89895f389652b69ee5487f18e744b7f54dcda1c733cdirk const double gammaBlue_); 8993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Gaussian blur image 9013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The number of neighbor pixels to be included in the convolution 9023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // mask is specified by 'width_'. The standard deviation of the 9033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gaussian bell curve is specified by 'sigma_'. 90495f389652b69ee5487f18e744b7f54dcda1c733cdirk void gaussianBlur(const double width_,const double sigma_); 90595f389652b69ee5487f18e744b7f54dcda1c733cdirk void gaussianBlurChannel(const ChannelType channel_,const double width_, 90695f389652b69ee5487f18e744b7f54dcda1c733cdirk const double sigma_); 90795f389652b69ee5487f18e744b7f54dcda1c733cdirk 90895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Transfers read-only pixels from the image to the pixel cache as 90995f389652b69ee5487f18e744b7f54dcda1c733cdirk // defined by the specified region 91095f389652b69ee5487f18e744b7f54dcda1c733cdirk const Quantum *getConstPixels(const ::ssize_t x_, const ::ssize_t y_, 91195f389652b69ee5487f18e744b7f54dcda1c733cdirk const size_t columns_,const size_t rows_) const; 91295f389652b69ee5487f18e744b7f54dcda1c733cdirk 91395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Obtain immutable image pixel metacontent (valid for PseudoClass images) 91495f389652b69ee5487f18e744b7f54dcda1c733cdirk const void *getConstMetacontent(void) const; 91595f389652b69ee5487f18e744b7f54dcda1c733cdirk 91695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Obtain mutable image pixel metacontent (valid for PseudoClass images) 91795f389652b69ee5487f18e744b7f54dcda1c733cdirk void *getMetacontent(void); 91895f389652b69ee5487f18e744b7f54dcda1c733cdirk 91995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Transfers pixels from the image to the pixel cache as defined 92095f389652b69ee5487f18e744b7f54dcda1c733cdirk // by the specified region. Modified pixels may be subsequently 92195f389652b69ee5487f18e744b7f54dcda1c733cdirk // transferred back to the image via syncPixels. This method is 92295f389652b69ee5487f18e744b7f54dcda1c733cdirk // valid for DirectClass images. 92395f389652b69ee5487f18e744b7f54dcda1c733cdirk Quantum *getPixels(const ::ssize_t x_,const ::ssize_t y_, 92495f389652b69ee5487f18e744b7f54dcda1c733cdirk const size_t columns_,const size_t rows_); 925b32b90a7e1ee2275333589072c496b5f69e17feccristy 926b32b90a7e1ee2275333589072c496b5f69e17feccristy // Apply a color lookup table (Hald CLUT) to the image. 92795f389652b69ee5487f18e744b7f54dcda1c733cdirk void haldClut(const Image &clutImage_); 928b32b90a7e1ee2275333589072c496b5f69e17feccristy 9293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Implode image (special effect) 93095f389652b69ee5487f18e744b7f54dcda1c733cdirk void implode(const double factor_); 9315fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 9325fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // Implements the inverse discrete Fourier transform (DFT) of the image 933529fcc251289b181417ebc355b221dcaa91b1611cristy // either as a magnitude / phase or real / imaginary image pair. 93495f389652b69ee5487f18e744b7f54dcda1c733cdirk void inverseFourierTransform(const Image &phase_); 93595f389652b69ee5487f18e744b7f54dcda1c733cdirk void inverseFourierTransform(const Image &phase_,const bool magnitude_); 9365fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 9373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Label image 93895f389652b69ee5487f18e744b7f54dcda1c733cdirk void label(const std::string &label_); 9393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Level image. Adjust the levels of the image by scaling the 9413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // colors falling between specified white and black points to the 9423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // full available quantum range. The parameters provided represent 9433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the black, mid (gamma), and white points. The black point 9443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the darkest color in the image. Colors darker than 9453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the black point are set to zero. Mid point (gamma) specifies a 9463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gamma correction to apply to the image. White point specifies 9473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the lightest color in the image. Colors brighter than the 9483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // white point are set to the maximum quantum value. The black and 9493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // white point have the valid range 0 to QuantumRange while mid (gamma) 9503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // has a useful range of 0 to ten. 95195f389652b69ee5487f18e744b7f54dcda1c733cdirk void level(const double blackPoint_,const double whitePoint_, 95295f389652b69ee5487f18e744b7f54dcda1c733cdirk const double gamma_=1.0); 9535fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 9545fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // Level image channel. Adjust the levels of the image channel by 9555fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // scaling the values falling between specified white and black 9565fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // points to the full available quantum range. The parameters 9575fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // provided represent the black, mid (gamma), and white points. 9585fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // The black point specifies the darkest color in the 9595fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // image. Colors darker than the black point are set to zero. Mid 9605fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // point (gamma) specifies a gamma correction to apply to the 9615fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // image. White point specifies the lightest color in the image. 9625fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // Colors brighter than the white point are set to the maximum 9635fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // quantum value. The black and white point have the valid range 0 9645fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // to QuantumRange while mid (gamma) has a useful range of 0 to ten. 96595f389652b69ee5487f18e744b7f54dcda1c733cdirk void levelChannel(const ChannelType channel_,const double blackPoint_, 96695f389652b69ee5487f18e744b7f54dcda1c733cdirk const double whitePoint_,const double gamma_=1.0); 9675fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk 9685fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // Maps the given color to "black" and "white" values, linearly spreading 9695fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // out the colors, and level values on a channel by channel bases, as 9705fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // per level(). The given colors allows you to specify different level 9715fdc21a395951a7057e948e63ff9bb816ae4fc9cdirk // ranges for each of the color channels separately. 97295f389652b69ee5487f18e744b7f54dcda1c733cdirk void levelColors(const Color &blackColor_,const Color &whiteColor_, 97395f389652b69ee5487f18e744b7f54dcda1c733cdirk const bool invert_=true); 97495f389652b69ee5487f18e744b7f54dcda1c733cdirk void levelColorsChannel(const ChannelType channel_, 97595f389652b69ee5487f18e744b7f54dcda1c733cdirk const Color &blackColor_,const Color &whiteColor_, 97695f389652b69ee5487f18e744b7f54dcda1c733cdirk const bool invert_=true); 9773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9781bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Discards any pixels below the black point and above the white point and 9791bab013cd87579204c8eb4671e3e658ef49d9aaadirk // levels the remaining pixels. 98095f389652b69ee5487f18e744b7f54dcda1c733cdirk void linearStretch(const double blackPoint_,const double whitePoint_); 9811bab013cd87579204c8eb4671e3e658ef49d9aaadirk 9821bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Rescales image with seam carving. 98395f389652b69ee5487f18e744b7f54dcda1c733cdirk void liquidRescale(const Geometry &geometry_); 9841bab013cd87579204c8eb4671e3e658ef49d9aaadirk 9853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Magnify image by integral size 98695f389652b69ee5487f18e744b7f54dcda1c733cdirk void magnify(void); 9871bab013cd87579204c8eb4671e3e658ef49d9aaadirk 9883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Remap image colors with closest color from reference image 98995f389652b69ee5487f18e744b7f54dcda1c733cdirk void map(const Image &mapImage_,const bool dither_=false); 9903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Filter image by replacing each pixel component with the median 9923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // color in a circular neighborhood 99395f389652b69ee5487f18e744b7f54dcda1c733cdirk void medianFilter(const double radius_=0.0); 9941bab013cd87579204c8eb4671e3e658ef49d9aaadirk 9953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Reduce image by integral size 99695f389652b69ee5487f18e744b7f54dcda1c733cdirk void minify(void); 9971bab013cd87579204c8eb4671e3e658ef49d9aaadirk 9983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Modulate percent hue, saturation, and brightness of an image 99995f389652b69ee5487f18e744b7f54dcda1c733cdirk void modulate(const double brightness_,const double saturation_, 100095f389652b69ee5487f18e744b7f54dcda1c733cdirk const double hue_); 10011bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Motion blur image with specified blur factor 10033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 10043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 10053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 10063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The angle_ parameter specifies the angle the object appears 10073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // to be comming from (zero degrees is from the right). 100895f389652b69ee5487f18e744b7f54dcda1c733cdirk void motionBlur(const double radius_,const double sigma_, 100995f389652b69ee5487f18e744b7f54dcda1c733cdirk const double angle_); 10101bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Negate colors in image. Set grayscale to only negate grayscale 10123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // values in image. 101395f389652b69ee5487f18e744b7f54dcda1c733cdirk void negate(const bool grayscale_=false); 101495f389652b69ee5487f18e744b7f54dcda1c733cdirk void negateChannel(const ChannelType channel_,const bool grayscale_=false); 10151bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Normalize image (increase contrast by normalizing the pixel 10173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // values to span the full range of color values) 101895f389652b69ee5487f18e744b7f54dcda1c733cdirk void normalize(void); 10193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10201bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Oilpaint image (image looks like oil painting) 102195f389652b69ee5487f18e744b7f54dcda1c733cdirk void oilPaint(const double radius_=0.0,const double sigma=1.0); 10223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Change color of opaque pixel to specified pen color. 102495f389652b69ee5487f18e744b7f54dcda1c733cdirk void opaque(const Color &opaqueColor_,const Color &penColor_); 10251bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10261bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Set each pixel whose value is less than epsilon to epsilon or 10271bab013cd87579204c8eb4671e3e658ef49d9aaadirk // -epsilon (whichever is closer) otherwise the pixel value remains 10281bab013cd87579204c8eb4671e3e658ef49d9aaadirk // unchanged. 102995f389652b69ee5487f18e744b7f54dcda1c733cdirk void perceptible(const double epsilon_); 103095f389652b69ee5487f18e744b7f54dcda1c733cdirk void perceptibleChannel(const ChannelType channel_,const double epsilon_); 10313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Ping is similar to read except only enough of the image is read 10333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // to determine the image columns, rows, and filesize. Access the 10343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // columns(), rows(), and fileSize() attributes after invoking 10353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // ping. The image data is not valid after calling ping. 103695f389652b69ee5487f18e744b7f54dcda1c733cdirk void ping(const std::string &imageSpec_); 10371bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Ping is similar to read except only enough of the image is read 10393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // to determine the image columns, rows, and filesize. Access the 10403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // columns(), rows(), and fileSize() attributes after invoking 10413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // ping. The image data is not valid after calling ping. 104295f389652b69ee5487f18e744b7f54dcda1c733cdirk void ping(const Blob &blob_); 104395f389652b69ee5487f18e744b7f54dcda1c733cdirk 104495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Get/set pixel color at location x & y. 104595f389652b69ee5487f18e744b7f54dcda1c733cdirk void pixelColor(const ::ssize_t x_,const ::ssize_t y_,const Color &color_); 104695f389652b69ee5487f18e744b7f54dcda1c733cdirk Color pixelColor(const ::ssize_t x_,const ::ssize_t y_ ) const; 104795f389652b69ee5487f18e744b7f54dcda1c733cdirk 104895f389652b69ee5487f18e744b7f54dcda1c733cdirk // Add or remove a named profile to/from the image. Remove the 104995f389652b69ee5487f18e744b7f54dcda1c733cdirk // profile by passing an empty Blob (e.g. Blob()). Valid names are 105095f389652b69ee5487f18e744b7f54dcda1c733cdirk // "*", "8BIM", "ICM", "IPTC", or a user/format-defined profile name. 105195f389652b69ee5487f18e744b7f54dcda1c733cdirk void profile(const std::string name_,const Blob &colorProfile_); 105295f389652b69ee5487f18e744b7f54dcda1c733cdirk 105395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Retrieve a named profile from the image. Valid names are: 105495f389652b69ee5487f18e744b7f54dcda1c733cdirk // "8BIM", "8BIMTEXT", "APP1", "APP1JPEG", "ICC", "ICM", & "IPTC" 105595f389652b69ee5487f18e744b7f54dcda1c733cdirk // or an existing user/format-defined profile name. 105695f389652b69ee5487f18e744b7f54dcda1c733cdirk Blob profile(const std::string name_) const; 10573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10581bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Simulates a Polaroid picture. 105995f389652b69ee5487f18e744b7f54dcda1c733cdirk void polaroid(const std::string &caption_,const double angle_, 106095f389652b69ee5487f18e744b7f54dcda1c733cdirk const PixelInterpolateMethod method_); 10611bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10621bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Reduces the image to a limited number of colors for a "poster" effect. 106395f389652b69ee5487f18e744b7f54dcda1c733cdirk void posterize(const size_t levels_,const DitherMethod method_); 106495f389652b69ee5487f18e744b7f54dcda1c733cdirk void posterizeChannel(const ChannelType channel_,const size_t levels_, 106595f389652b69ee5487f18e744b7f54dcda1c733cdirk const DitherMethod method_); 10661bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10671bab013cd87579204c8eb4671e3e658ef49d9aaadirk // Execute a named process module using an argc/argv syntax similar to 10681bab013cd87579204c8eb4671e3e658ef49d9aaadirk // that accepted by a C 'main' routine. An exception is thrown if the 10691bab013cd87579204c8eb4671e3e658ef49d9aaadirk // requested process module doesn't exist, fails to load, or fails during 10701bab013cd87579204c8eb4671e3e658ef49d9aaadirk // execution. 107195f389652b69ee5487f18e744b7f54dcda1c733cdirk void process(std::string name_,const ::ssize_t argc_,const char **argv_); 10721bab013cd87579204c8eb4671e3e658ef49d9aaadirk 10733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Quantize image (reduce number of colors) 107495f389652b69ee5487f18e744b7f54dcda1c733cdirk void quantize(const bool measureError_=false); 10753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 107695f389652b69ee5487f18e744b7f54dcda1c733cdirk void quantumOperator(const ChannelType channel_, 107795f389652b69ee5487f18e744b7f54dcda1c733cdirk const MagickEvaluateOperator operator_,double rvalue_); 10783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 107995f389652b69ee5487f18e744b7f54dcda1c733cdirk void quantumOperator(const ::ssize_t x_,const ::ssize_t y_, 108095f389652b69ee5487f18e744b7f54dcda1c733cdirk const size_t columns_,const size_t rows_,const ChannelType channel_, 108195f389652b69ee5487f18e744b7f54dcda1c733cdirk const MagickEvaluateOperator operator_,const double rvalue_); 10823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Raise image (lighten or darken the edges of an image to give a 10843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 3-D raised or lowered effect) 108595f389652b69ee5487f18e744b7f54dcda1c733cdirk void raise(const Geometry &geometry_=raiseGeometryDefault, 108695f389652b69ee5487f18e744b7f54dcda1c733cdirk const bool raisedFlag_=false); 10873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Random threshold image. 10893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 10903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Changes the value of individual pixels based on the intensity 10913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // of each pixel compared to a random threshold. The result is a 10923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // low-contrast, two color image. The thresholds_ argument is a 10933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // geometry containing LOWxHIGH thresholds. If the string 10943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // contains 2x2, 3x3, or 4x4, then an ordered dither of order 2, 10953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 3, or 4 will be performed instead. If a channel_ argument is 10963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified then only the specified channel is altered. This is 10973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // a very fast alternative to 'quantize' based dithering. 109895f389652b69ee5487f18e744b7f54dcda1c733cdirk void randomThreshold(const Geometry &thresholds_); 109995f389652b69ee5487f18e744b7f54dcda1c733cdirk void randomThresholdChannel(const Geometry &thresholds_, 110095f389652b69ee5487f18e744b7f54dcda1c733cdirk const ChannelType channel_); 11013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame from in-memory BLOB 110395f389652b69ee5487f18e744b7f54dcda1c733cdirk void read(const Blob &blob_); 11043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size from in-memory BLOB 110695f389652b69ee5487f18e744b7f54dcda1c733cdirk void read(const Blob &blob_,const Geometry &size_); 11073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size and depth from 11093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in-memory BLOB 111095f389652b69ee5487f18e744b7f54dcda1c733cdirk void read(const Blob &blob_,const Geometry &size_,const size_t depth_); 11113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size, depth, and format 11133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // from in-memory BLOB 111495f389652b69ee5487f18e744b7f54dcda1c733cdirk void read(const Blob &blob_,const Geometry &size_,const size_t depth_, 111595f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &magick_); 11163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size, and format from 11183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in-memory BLOB 111995f389652b69ee5487f18e744b7f54dcda1c733cdirk void read(const Blob &blob_,const Geometry &size_, 112095f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &magick_); 112195f389652b69ee5487f18e744b7f54dcda1c733cdirk 112295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Read single image frame of specified size into current object 112395f389652b69ee5487f18e744b7f54dcda1c733cdirk void read(const Geometry &size_,const std::string &imageSpec_); 112495f389652b69ee5487f18e744b7f54dcda1c733cdirk 112595f389652b69ee5487f18e744b7f54dcda1c733cdirk // Transfers one or more pixel components from a buffer or file 112695f389652b69ee5487f18e744b7f54dcda1c733cdirk // into the image pixel cache of an image. 112795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Used to support image decoders. 112895f389652b69ee5487f18e744b7f54dcda1c733cdirk void readPixels(const QuantumType quantum_,const unsigned char *source_); 11293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame from an array of raw pixels, with 11313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified storage type (ConstituteImage), e.g. 113295f389652b69ee5487f18e744b7f54dcda1c733cdirk // image.read( 640, 480, "RGB", 0, pixels ); 113395f389652b69ee5487f18e744b7f54dcda1c733cdirk void read( const size_t width_,const size_t height_, 113495f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &map_,const StorageType type_,const void *pixels_); 113595f389652b69ee5487f18e744b7f54dcda1c733cdirk 113695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Read single image frame into current object 113795f389652b69ee5487f18e744b7f54dcda1c733cdirk void read(const std::string &imageSpec_); 11383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Reduce noise in image using a noise peak elimination filter 114095f389652b69ee5487f18e744b7f54dcda1c733cdirk void reduceNoise(void); 114195f389652b69ee5487f18e744b7f54dcda1c733cdirk void reduceNoise(const double order_); 114295f389652b69ee5487f18e744b7f54dcda1c733cdirk 11433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Resize image to specified size. 114495f389652b69ee5487f18e744b7f54dcda1c733cdirk void resize(const Geometry &geometry_); 11453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Roll image (rolls image vertically and horizontally) by specified 11473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // number of columnms and rows) 114895f389652b69ee5487f18e744b7f54dcda1c733cdirk void roll(const Geometry &roll_); 114995f389652b69ee5487f18e744b7f54dcda1c733cdirk void roll(const size_t columns_,const size_t rows_); 115095f389652b69ee5487f18e744b7f54dcda1c733cdirk 11513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Rotate image counter-clockwise by specified number of degrees. 115295f389652b69ee5487f18e744b7f54dcda1c733cdirk void rotate(const double degrees_); 115395f389652b69ee5487f18e744b7f54dcda1c733cdirk 11543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Resize image by using pixel sampling algorithm 115595f389652b69ee5487f18e744b7f54dcda1c733cdirk void sample(const Geometry &geometry_); 115695f389652b69ee5487f18e744b7f54dcda1c733cdirk 115795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Allocates a pixel cache region to store image pixels as defined 115895f389652b69ee5487f18e744b7f54dcda1c733cdirk // by the region rectangle. This area is subsequently transferred 115995f389652b69ee5487f18e744b7f54dcda1c733cdirk // from the pixel cache to the image via syncPixels. 116095f389652b69ee5487f18e744b7f54dcda1c733cdirk Quantum *setPixels(const ::ssize_t x_, const ::ssize_t y_, 116195f389652b69ee5487f18e744b7f54dcda1c733cdirk const size_t columns_,const size_t rows_); 116295f389652b69ee5487f18e744b7f54dcda1c733cdirk 116395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Transfers the image cache pixels to the image. 116495f389652b69ee5487f18e744b7f54dcda1c733cdirk void syncPixels(void); 116595f389652b69ee5487f18e744b7f54dcda1c733cdirk 11663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Resize image by using simple ratio algorithm 116795f389652b69ee5487f18e744b7f54dcda1c733cdirk void scale(const Geometry &geometry_); 116895f389652b69ee5487f18e744b7f54dcda1c733cdirk 11693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Segment (coalesce similar image components) by analyzing the 11703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // histograms of the color components and identifying units that 11713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // are homogeneous with the fuzzy c-means technique. Also uses 11723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // QuantizeColorSpace and Verbose image attributes 117395f389652b69ee5487f18e744b7f54dcda1c733cdirk void segment(const double clusterThreshold_=1.0, 117495f389652b69ee5487f18e744b7f54dcda1c733cdirk const double smoothingThreshold_=1.5); 117595f389652b69ee5487f18e744b7f54dcda1c733cdirk 11763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Shade image using distant light source 117795f389652b69ee5487f18e744b7f54dcda1c733cdirk void shade(const double azimuth_=30,const double elevation_=30, 117895f389652b69ee5487f18e744b7f54dcda1c733cdirk const bool colorShading_=false); 117995f389652b69ee5487f18e744b7f54dcda1c733cdirk 1180171a5b35472b42f8dd5d8ce387506cc9f5022e62cristy // Simulate an image shadow 118195f389652b69ee5487f18e744b7f54dcda1c733cdirk void shadow(const double percentAlpha_=80.0,const double sigma_=0.5, 118295f389652b69ee5487f18e744b7f54dcda1c733cdirk const ssize_t x_=5,const ssize_t y_=5); 11836fee7fb9d4f334471f72a84f03df5f8172272794cristy 11843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Sharpen pixels in image 11853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 11863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 11873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 118895f389652b69ee5487f18e744b7f54dcda1c733cdirk void sharpen(const double radius_=0.0,const double sigma_=1.0); 118995f389652b69ee5487f18e744b7f54dcda1c733cdirk void sharpenChannel(const ChannelType channel_,const double radius_=0.0, 119095f389652b69ee5487f18e744b7f54dcda1c733cdirk const double sigma_=1.0); 11913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Shave pixels from image edges. 119395f389652b69ee5487f18e744b7f54dcda1c733cdirk void shave(const Geometry &geometry_); 119495f389652b69ee5487f18e744b7f54dcda1c733cdirk 11953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Shear image (create parallelogram by sliding image by X or Y axis) 119695f389652b69ee5487f18e744b7f54dcda1c733cdirk void shear(const double xShearAngle_,const double yShearAngle_); 119795f389652b69ee5487f18e744b7f54dcda1c733cdirk 11983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // adjust the image contrast with a non-linear sigmoidal contrast algorithm 119995f389652b69ee5487f18e744b7f54dcda1c733cdirk void sigmoidalContrast(const size_t sharpen_,const double contrast, 120095f389652b69ee5487f18e744b7f54dcda1c733cdirk const double midpoint=QuantumRange/2.0); 120195f389652b69ee5487f18e744b7f54dcda1c733cdirk 120295f389652b69ee5487f18e744b7f54dcda1c733cdirk // Image signature. Set force_ to true in order to re-calculate 120395f389652b69ee5487f18e744b7f54dcda1c733cdirk // the signature regardless of whether the image data has been 120495f389652b69ee5487f18e744b7f54dcda1c733cdirk // modified. 120595f389652b69ee5487f18e744b7f54dcda1c733cdirk std::string signature(const bool force_=false) const; 12063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Solarize image (similar to effect seen when exposing a 12083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // photographic film to light during the development process) 120995f389652b69ee5487f18e744b7f54dcda1c733cdirk void solarize(const double factor_=50.0); 121095f389652b69ee5487f18e744b7f54dcda1c733cdirk 12118198a75baed6048bb2f5a2c04c773cce5e512c34cristy // Splice the background color into the image. 121295f389652b69ee5487f18e744b7f54dcda1c733cdirk void splice(const Geometry &geometry_); 12138198a75baed6048bb2f5a2c04c773cce5e512c34cristy 12143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Spread pixels randomly within image by specified ammount 121595f389652b69ee5487f18e744b7f54dcda1c733cdirk void spread(const size_t amount_=3); 121695f389652b69ee5487f18e744b7f54dcda1c733cdirk 12173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Sparse color image, given a set of coordinates, interpolates the colors 12183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // found at those coordinates, across the whole image, using various 12193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // methods. 122095f389652b69ee5487f18e744b7f54dcda1c733cdirk void sparseColor(const ChannelType channel,const SparseColorMethod method, 122195f389652b69ee5487f18e744b7f54dcda1c733cdirk const size_t numberArguments,const double *arguments); 122295f389652b69ee5487f18e744b7f54dcda1c733cdirk 122395f389652b69ee5487f18e744b7f54dcda1c733cdirk void statistics(ImageStatistics *statistics); 12243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add a digital watermark to the image (based on second image) 122695f389652b69ee5487f18e744b7f54dcda1c733cdirk void stegano(const Image &watermark_); 122795f389652b69ee5487f18e744b7f54dcda1c733cdirk 12283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Create an image which appears in stereo when viewed with 12293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // red-blue glasses (Red image on left, blue on right) 123095f389652b69ee5487f18e744b7f54dcda1c733cdirk void stereo(const Image &rightImage_); 123195f389652b69ee5487f18e744b7f54dcda1c733cdirk 12329f89a3fdb53e6226e8361b6d7b422f0387aa9431cristy // Strip strips an image of all profiles and comments. 123395f389652b69ee5487f18e744b7f54dcda1c733cdirk void strip(void); 12349f89a3fdb53e6226e8361b6d7b422f0387aa9431cristy 12353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Swirl image (image pixels are rotated by degrees) 123695f389652b69ee5487f18e744b7f54dcda1c733cdirk void swirl(const double degrees_); 123795f389652b69ee5487f18e744b7f54dcda1c733cdirk 12383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Channel a texture on image background 123995f389652b69ee5487f18e744b7f54dcda1c733cdirk void texture(const Image &texture_); 124095f389652b69ee5487f18e744b7f54dcda1c733cdirk 12413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Threshold image 124295f389652b69ee5487f18e744b7f54dcda1c733cdirk void threshold(const double threshold_); 124395f389652b69ee5487f18e744b7f54dcda1c733cdirk 12443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transform image based on image and crop geometries 12453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Crop geometry is optional 124695f389652b69ee5487f18e744b7f54dcda1c733cdirk void transform(const Geometry &imageGeometry_); 124795f389652b69ee5487f18e744b7f54dcda1c733cdirk void transform(const Geometry &imageGeometry_, 124895f389652b69ee5487f18e744b7f54dcda1c733cdirk const Geometry &cropGeometry_); 124995f389652b69ee5487f18e744b7f54dcda1c733cdirk 125095f389652b69ee5487f18e744b7f54dcda1c733cdirk // Origin of coordinate system to use when annotating with text or drawing 125195f389652b69ee5487f18e744b7f54dcda1c733cdirk void transformOrigin(const double x_,const double y_); 125295f389652b69ee5487f18e744b7f54dcda1c733cdirk 125395f389652b69ee5487f18e744b7f54dcda1c733cdirk // Reset transformation parameters to default 125495f389652b69ee5487f18e744b7f54dcda1c733cdirk void transformReset(void); 125595f389652b69ee5487f18e744b7f54dcda1c733cdirk 125695f389652b69ee5487f18e744b7f54dcda1c733cdirk // Scale to use when annotating with text or drawing 125795f389652b69ee5487f18e744b7f54dcda1c733cdirk void transformScale(const double sx_,const double sy_); 12583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add matte image to image, setting pixels matching color to 12603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // transparent 126195f389652b69ee5487f18e744b7f54dcda1c733cdirk void transparent(const Color &color_); 126295f389652b69ee5487f18e744b7f54dcda1c733cdirk 12633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add matte image to image, for all the pixels that lies in between 12643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the given two color 126595f389652b69ee5487f18e744b7f54dcda1c733cdirk void transparentChroma(const Color &colorLow_,const Color &colorHigh_); 12663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Trim edges that are the background color from the image 126895f389652b69ee5487f18e744b7f54dcda1c733cdirk void trim(void); 12693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Replace image with a sharpened version of the original image 12713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // using the unsharp mask algorithm. 12723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // radius_ 12733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the radius of the Gaussian, in pixels, not counting the 12743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // center pixel. 12753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // sigma_ 12763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the standard deviation of the Gaussian, in pixels. 12773afd4014cd833bc3c170cb54e37c925ceacd17decristy // amount_ 12783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the percentage of the difference between the original and 12793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the blur image that is added back into the original. 12803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // threshold_ 12813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the threshold in pixels needed to apply the diffence amount. 128295f389652b69ee5487f18e744b7f54dcda1c733cdirk void unsharpmask(const double radius_,const double sigma_, 128395f389652b69ee5487f18e744b7f54dcda1c733cdirk const double amount_,const double threshold_); 128495f389652b69ee5487f18e744b7f54dcda1c733cdirk void unsharpmaskChannel(const ChannelType channel_,const double radius_, 128595f389652b69ee5487f18e744b7f54dcda1c733cdirk const double sigma_,const double amount_,const double threshold_); 12863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Map image pixels to a sine wave 128895f389652b69ee5487f18e744b7f54dcda1c733cdirk void wave(const double amplitude_=25.0,const double wavelength_=150.0); 1289092a8ea1959d818804462ea79231863dc2e3fd26dirk 129050666310ad7ab8e07037cb72cdab27b07540e150dirk // Forces all pixels above the threshold into white while leaving all 1291092a8ea1959d818804462ea79231863dc2e3fd26dirk // pixels at or below the threshold unchanged. 129295f389652b69ee5487f18e744b7f54dcda1c733cdirk void whiteThreshold(const std::string &threshold_); 129395f389652b69ee5487f18e744b7f54dcda1c733cdirk void whiteThresholdChannel(const ChannelType channel_, 129495f389652b69ee5487f18e744b7f54dcda1c733cdirk const std::string &threshold_); 12953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Write single image frame to in-memory BLOB, with optional 12973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // format and adjoin parameters. 129895f389652b69ee5487f18e744b7f54dcda1c733cdirk void write(Blob *blob_); 129995f389652b69ee5487f18e744b7f54dcda1c733cdirk void write(Blob *blob_,const std::string &magick_); 130095f389652b69ee5487f18e744b7f54dcda1c733cdirk void write(Blob *blob_,const std::string &magick_,const size_t depth_); 13013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Write single image frame to an array of pixels with storage 13033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // type specified by user (DispatchImage), e.g. 13043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // image.write( 0, 0, 640, 1, "RGB", 0, pixels ); 130595f389652b69ee5487f18e744b7f54dcda1c733cdirk void write(const ::ssize_t x_,const ::ssize_t y_,const size_t columns_, 130695f389652b69ee5487f18e744b7f54dcda1c733cdirk const size_t rows_,const std::string &map_,const StorageType type_, 130795f389652b69ee5487f18e744b7f54dcda1c733cdirk void *pixels_); 13083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 130995f389652b69ee5487f18e744b7f54dcda1c733cdirk // Write single image frame to a file 131095f389652b69ee5487f18e744b7f54dcda1c733cdirk void write(const std::string &imageSpec_); 13113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transfers one or more pixel components from the image pixel 13133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // cache to a buffer or file. 13143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Used to support image encoders. 131595f389652b69ee5487f18e744b7f54dcda1c733cdirk void writePixels(const QuantumType quantum_,unsigned char *destination_); 13163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 131795f389652b69ee5487f18e744b7f54dcda1c733cdirk // Zoom image to specified size. 131895f389652b69ee5487f18e744b7f54dcda1c733cdirk void zoom(const Geometry &geometry_); 131995f389652b69ee5487f18e744b7f54dcda1c733cdirk 132095f389652b69ee5487f18e744b7f54dcda1c733cdirk ////////////////////////////////////////////////////////////////////// 13213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 13223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // No user-serviceable parts beyond this point 13233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 13243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 13253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct with MagickCore::Image and default options 132795f389652b69ee5487f18e744b7f54dcda1c733cdirk Image(MagickCore::Image *image_); 13283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve Image* 133095f389652b69ee5487f18e744b7f54dcda1c733cdirk MagickCore::Image *&image(void); 133195f389652b69ee5487f18e744b7f54dcda1c733cdirk const MagickCore::Image *constImage(void) const; 13323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve Options* 133495f389652b69ee5487f18e744b7f54dcda1c733cdirk Options *options(void); 133595f389652b69ee5487f18e744b7f54dcda1c733cdirk const Options *constOptions(void) const; 13363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve ImageInfo* 133895f389652b69ee5487f18e744b7f54dcda1c733cdirk MagickCore::ImageInfo *imageInfo(void); 133995f389652b69ee5487f18e744b7f54dcda1c733cdirk const MagickCore::ImageInfo *constImageInfo(void) const; 13403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve QuantizeInfo* 134295f389652b69ee5487f18e744b7f54dcda1c733cdirk MagickCore::QuantizeInfo *quantizeInfo(void); 134395f389652b69ee5487f18e744b7f54dcda1c733cdirk const MagickCore::QuantizeInfo *constQuantizeInfo(void) const; 13443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Prepare to update image (copy if reference > 1) 134695f389652b69ee5487f18e744b7f54dcda1c733cdirk void modifyImage(void); 13473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Register image with image registry or obtain registration id 134995f389652b69ee5487f18e744b7f54dcda1c733cdirk ::ssize_t registerId( void ); 135095f389652b69ee5487f18e744b7f54dcda1c733cdirk 135195f389652b69ee5487f18e744b7f54dcda1c733cdirk // Replace current image (reference counted) 135295f389652b69ee5487f18e744b7f54dcda1c733cdirk MagickCore::Image *replaceImage(MagickCore::Image *replacement_); 135395f389652b69ee5487f18e744b7f54dcda1c733cdirk 135495f389652b69ee5487f18e744b7f54dcda1c733cdirk // Test for ImageMagick error and throw exception if error 135595f389652b69ee5487f18e744b7f54dcda1c733cdirk void throwImageException(void) const; 13563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Unregister image from image registry 135895f389652b69ee5487f18e744b7f54dcda1c733cdirk void unregisterId(void); 13593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy private: 136195f389652b69ee5487f18e744b7f54dcda1c733cdirk 136295f389652b69ee5487f18e744b7f54dcda1c733cdirk ImageRef *_imgRef; 13633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy }; 13643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} // end of namespace Magick 13663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#endif // Magick_Image_header 1368