Image.h revision d42d995b9cb2a16e13221e665554417a5b7ec7fb
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 273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy extern MagickDLLDecl const char *borderGeometryDefault; 283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy extern MagickDLLDecl const char *frameGeometryDefault; 293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy extern MagickDLLDecl const char *raiseGeometryDefault; 303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Compare two Image objects regardless of LHS/RHS 323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image sizes and signatures are used as basis of comparison 334e0eef0224b2612b06c74d42d7f7c20f66f7f8b3cristy int MagickDLLDecl operator == ( const Magick::Image& left_, 343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Magick::Image& right_ ); 354e0eef0224b2612b06c74d42d7f7c20f66f7f8b3cristy int MagickDLLDecl operator != ( const Magick::Image& left_, 363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Magick::Image& right_ ); 374e0eef0224b2612b06c74d42d7f7c20f66f7f8b3cristy int MagickDLLDecl operator > ( const Magick::Image& left_, 383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Magick::Image& right_ ); 394e0eef0224b2612b06c74d42d7f7c20f66f7f8b3cristy int MagickDLLDecl operator < ( const Magick::Image& left_, 403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Magick::Image& right_ ); 414e0eef0224b2612b06c74d42d7f7c20f66f7f8b3cristy int MagickDLLDecl operator >= ( const Magick::Image& left_, 423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Magick::Image& right_ ); 434e0eef0224b2612b06c74d42d7f7c20f66f7f8b3cristy int MagickDLLDecl operator <= ( const Magick::Image& left_, 443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Magick::Image& right_ ); 453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // C library initialization routine 473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void MagickDLLDecl InitializeMagick(const char *path_); 483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 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 // 543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy class MagickDLLDecl Image 553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy public: 573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct from image file or image specification 583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image( const std::string &imageSpec_ ); 593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct a blank image canvas of specified size and color 613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image( const Geometry &size_, const Color &color_ ); 623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image from in-memory BLOB 643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image ( const Blob &blob_ ); 653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image of specified size from in-memory BLOB 673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image ( const Blob &blob_, const Geometry &size_ ); 683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image of specified size and depth from in-memory BLOB 703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image ( const Blob &blob_, const Geometry &size, 71eaedf06777741da32408da72c1e512975c600c48cristy const size_t depth ); 723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image of specified size, depth, and format from 743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in-memory BLOB 753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image ( const Blob &blob_, const Geometry &size, 76eaedf06777741da32408da72c1e512975c600c48cristy const size_t depth_, 773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &magick_ ); 783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct Image of specified size, and format from in-memory 793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // BLOB 803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image ( const Blob &blob_, const Geometry &size, 813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &magick_ ); 823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct an image based on an array of raw pixels, of 843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified type and mapping, in memory 85eaedf06777741da32408da72c1e512975c600c48cristy Image ( const size_t width_, 86eaedf06777741da32408da72c1e512975c600c48cristy const size_t height_, 873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &map_, 883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const StorageType type_, 893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const void *pixels_ ); 903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Default constructor 923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image( void ); 933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Destructor 953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy virtual ~Image(); 963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /// Copy constructor 983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image ( const Image & image_ ); 993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Assignment operator 1013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image& operator= ( const Image &image_ ); 1023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 1043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 1053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image operations 1063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 1073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 1083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Adaptive-blur image with specified blur factor 1103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 1113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 1123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 1133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void adaptiveBlur ( const double radius_ = 0.0, 1143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ = 1.0 ); 1153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Local adaptive threshold image 1173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // http://www.dai.ed.ac.uk/HIPR2/adpthrsh.htm 1183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Width x height define the size of the pixel neighborhood 1193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // offset = constant to subtract from pixel neighborhood mean 120eaedf06777741da32408da72c1e512975c600c48cristy void adaptiveThreshold ( const size_t width, 121eaedf06777741da32408da72c1e512975c600c48cristy const size_t height, 122b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t offset = 0 ); 1233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add noise to image with specified noise type 1253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void addNoise ( const NoiseType noiseType_ ); 1263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void addNoiseChannel ( const ChannelType channel_, 1273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const NoiseType noiseType_); 1283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transform image by specified affine (or free transform) matrix. 1303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void affineTransform ( const DrawableAffine &affine ); 1313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 1333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate image (draw text on image) 1343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 1353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Gravity effects text placement in bounding area according to rules: 1373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // NorthWestGravity text bottom-left corner placed at top-left 1383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // NorthGravity text bottom-center placed at top-center 1393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // NorthEastGravity text bottom-right corner placed at top-right 1403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // WestGravity text left-center placed at left-center 1413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // CenterGravity text center placed at center 1423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // EastGravity text right-center placed at right-center 1433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // SouthWestGravity text top-left placed at bottom-left 1443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // SouthGravity text top-center placed at bottom-center 1453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // SouthEastGravity text top-right placed at bottom-right 1463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate using specified text, and placement location 1483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void annotate ( const std::string &text_, 1493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &location_ ); 1503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate using specified text, bounding area, and placement 1513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gravity 1523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void annotate ( const std::string &text_, 1533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &boundingArea_, 1543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const GravityType gravity_ ); 1553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate with text using specified text, bounding area, 1563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // placement gravity, and rotation. 1573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void annotate ( const std::string &text_, 1583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &boundingArea_, 1593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const GravityType gravity_, 1603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double degrees_ ); 1613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotate with text (bounding area is entire image) and placement 1623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gravity. 1633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void annotate ( const std::string &text_, 1643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const GravityType gravity_ ); 1653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Blur image with specified blur factor 1673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 1683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 1693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 1703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void blur ( const double radius_ = 0.0, 1713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ = 1.0 ); 1723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void blurChannel ( const ChannelType channel_, 1733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double radius_ = 0.0, 1743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ = 1.0 ); 1753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Border image (add border to image) 1773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void border ( const Geometry &geometry_ 1783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy = borderGeometryDefault ); 1793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Extract channel from image 1813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void channel ( const ChannelType channel_ ); 1823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Set or obtain modulus channel depth 184fefab1b20f043d650c398fa7377274cf43d5e55dcristy void channelDepth ( const size_t depth_ ); 185fefab1b20f043d650c398fa7377274cf43d5e55dcristy size_t channelDepth ( ); 1863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Charcoal effect image (looks like charcoal sketch) 1883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 1893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 1903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 1913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void charcoal ( const double radius_ = 0.0, 1923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ = 1.0 ); 1933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Chop image (remove vertical or horizontal subregion of image) 1953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // FIXME: describe how geometry argument is used to select either 1963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // horizontal or vertical subregion of image. 1973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chop ( const Geometry &geometry_ ); 199b32b90a7e1ee2275333589072c496b5f69e17feccristy 200b32b90a7e1ee2275333589072c496b5f69e17feccristy // Accepts a lightweight Color Correction Collection 201b32b90a7e1ee2275333589072c496b5f69e17feccristy // (CCC) file which solely contains one or more color corrections and 202b32b90a7e1ee2275333589072c496b5f69e17feccristy // applies the correction to the image. 203b32b90a7e1ee2275333589072c496b5f69e17feccristy void cdl ( const std::string &cdl_ ); 2043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2054c08aed51c5899665ade97263692328eea4af106cristy // Colorize image with pen color, using specified percent alpha 2063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // for red, green, and blue quantums 2074c08aed51c5899665ade97263692328eea4af106cristy void colorize ( const unsigned int alphaRed_, 2084c08aed51c5899665ade97263692328eea4af106cristy const unsigned int alphaGreen_, 2094c08aed51c5899665ade97263692328eea4af106cristy const unsigned int alphaBlue_, 2103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &penColor_ ); 2114c08aed51c5899665ade97263692328eea4af106cristy // Colorize image with pen color, using specified percent alpha. 2124c08aed51c5899665ade97263692328eea4af106cristy void colorize ( const unsigned int alpha_, 2133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &penColor_ ); 2143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 215c8918bb2b224f642b06140506fa85a3703fa0748cristy // Apply a color matrix to the image channels. The user supplied 216c8918bb2b224f642b06140506fa85a3703fa0748cristy // matrix may be of order 1 to 5 (1x1 through 5x5). 217eaedf06777741da32408da72c1e512975c600c48cristy void colorMatrix (const size_t order_, 218c8918bb2b224f642b06140506fa85a3703fa0748cristy const double *color_matrix_); 219c8918bb2b224f642b06140506fa85a3703fa0748cristy 2203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Comment image (add comment string to image) 2213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void comment ( const std::string &comment_ ); 2223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Composition operator to be used when composition is implicitly 2243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // used (such as for image flattening). 2253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void compose (const CompositeOperator compose_); 2263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy CompositeOperator compose ( void ) const; 2273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Compare current image with another image 2293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError 2303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in the current image. False is returned if the images are identical. 2313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool compare ( const Image &reference_ ); 2323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Compose an image onto another at specified offset and using 2343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified algorithm 2353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void composite ( const Image &compositeImage_, 236b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t xOffset_, 237b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t yOffset_, 2383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const CompositeOperator compose_ 2393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy = InCompositeOp ); 2403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void composite ( const Image &compositeImage_, 2413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &offset_, 2423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const CompositeOperator compose_ 2433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy = InCompositeOp ); 2443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void composite ( const Image &compositeImage_, 2453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const GravityType gravity_, 2463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const CompositeOperator compose_ 2473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy = InCompositeOp ); 2483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Contrast image (enhance intensity differences in image) 250eaedf06777741da32408da72c1e512975c600c48cristy void contrast ( const size_t sharpen_ ); 2513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Convolve image. Applies a user-specified convolution to the image. 2533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // order_ represents the number of columns and rows in the filter kernel. 2543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // kernel_ is an array of doubles representing the convolution kernel. 255eaedf06777741da32408da72c1e512975c600c48cristy void convolve ( const size_t order_, 2563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double *kernel_ ); 2573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Crop image (subregion of original image) 2593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void crop ( const Geometry &geometry_ ); 2603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Cycle image colormap 262b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void cycleColormap ( const ::ssize_t amount_ ); 2633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Despeckle image (reduce speckle noise) 2653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void despeckle ( void ); 2663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Display image on screen 2683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void display ( void ); 2693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Distort image. distorts an image using various distortion methods, by 2713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // mapping color lookups of the source image to a new destination image 2723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // usally of the same size as the source image, unless 'bestfit' is set to 2733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // true. 274b32b90a7e1ee2275333589072c496b5f69e17feccristy void distort ( const DistortImageMethod method_, 275bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy const size_t number_arguments_, 276b32b90a7e1ee2275333589072c496b5f69e17feccristy const double *arguments_, 277b32b90a7e1ee2275333589072c496b5f69e17feccristy const bool bestfit_ = false ); 2783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Draw on image using a single drawable 2803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void draw ( const Drawable &drawable_ ); 2813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Draw on image using a drawable list 2833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void draw ( const std::list<Magick::Drawable> &drawable_ ); 2843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Edge image (hilight edges in image) 2863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void edge ( const double radius_ = 0.0 ); 2873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Emboss image (hilight edges with 3D effect) 2893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 2903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 2913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 2923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void emboss ( const double radius_ = 0.0, 2933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ = 1.0); 2943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Enhance image (minimize noise) 2963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void enhance ( void ); 2973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 2983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Equalize image (histogram equalization) 2993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void equalize ( void ); 3003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Erase image to current "background color" 3023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void erase ( void ); 3033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Extend the image as defined by the geometry. 3053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void extent ( const Geometry &geometry_ ); 3068bf9e296bfe66c29544f41f760ce2ce00e311c70cristy void extent ( const Geometry &geometry_, const Color &backgroundColor ); 3078bf9e296bfe66c29544f41f760ce2ce00e311c70cristy void extent ( const Geometry &geometry_, const GravityType gravity_ ); 3088bf9e296bfe66c29544f41f760ce2ce00e311c70cristy void extent ( const Geometry &geometry_, const Color &backgroundColor, const GravityType gravity_ ); 3098bf9e296bfe66c29544f41f760ce2ce00e311c70cristy 3103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flip image (reflect each scanline in the vertical direction) 3113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void flip ( void ); 3123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill color across pixels that match the color of the 3143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // target pixel and are neighbors of the target pixel. 3153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 316b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void floodFillColor( const ::ssize_t x_, 317b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_, 3183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &fillColor_ ); 3193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void floodFillColor( const Geometry &point_, 3203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &fillColor_ ); 3213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill color across pixels starting at target-pixel and 3233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // stopping at pixels matching specified border color. 3243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 325b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void floodFillColor( const ::ssize_t x_, 326b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_, 3273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &fillColor_, 3283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &borderColor_ ); 3293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void floodFillColor( const Geometry &point_, 3303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &fillColor_, 3313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &borderColor_ ); 3323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Floodfill pixels matching color (within fuzz factor) of target 3344c08aed51c5899665ade97263692328eea4af106cristy // pixel(x,y) with replacement alpha value using method. 335b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void floodFillOpacity ( const ::ssize_t x_, 336b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_, 3374c08aed51c5899665ade97263692328eea4af106cristy const unsigned int alpha_, 3383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const PaintMethod method_ ); 3393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill texture across pixels that match the color of the 3413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // target pixel and are neighbors of the target pixel. 3423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 343b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void floodFillTexture( const ::ssize_t x_, 344b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_, 3453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Image &texture_ ); 3463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void floodFillTexture( const Geometry &point_, 3473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Image &texture_ ); 3483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flood-fill texture across pixels starting at target-pixel and 3503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // stopping at pixels matching specified border color. 3513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Uses current fuzz setting when determining color match. 352b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void floodFillTexture( const ::ssize_t x_, 353b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_, 3543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Image &texture_, 3553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &borderColor_ ); 3563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void floodFillTexture( const Geometry &point_, 3573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Image &texture_, 3583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &borderColor_ ); 3593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Flop image (reflect each scanline in the horizontal direction) 3613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void flop ( void ); 3623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Frame image 3643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void frame ( const Geometry &geometry_ = frameGeometryDefault ); 365eaedf06777741da32408da72c1e512975c600c48cristy void frame ( const size_t width_, 366eaedf06777741da32408da72c1e512975c600c48cristy const size_t height_, 367b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t innerBevel_ = 6, 368b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t outerBevel_ = 6 ); 3693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Applies a mathematical expression to the image. 371c9550792cd47c57370cd82fef338304f9e576473cristy void fx ( const std::string expression ); 3723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void fx ( const std::string expression, 3733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Magick::ChannelType channel ); 3743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Gamma correct image 3763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void gamma ( const double gamma_ ); 3773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void gamma ( const double gammaRed_, 3783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double gammaGreen_, 3793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double gammaBlue_ ); 3803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Gaussian blur image 3823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The number of neighbor pixels to be included in the convolution 3833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // mask is specified by 'width_'. The standard deviation of the 3843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gaussian bell curve is specified by 'sigma_'. 3853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void gaussianBlur ( const double width_, const double sigma_ ); 3863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void gaussianBlurChannel ( const ChannelType channel_, 3873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double width_, 3883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ ); 389b32b90a7e1ee2275333589072c496b5f69e17feccristy 390b32b90a7e1ee2275333589072c496b5f69e17feccristy // Apply a color lookup table (Hald CLUT) to the image. 391b32b90a7e1ee2275333589072c496b5f69e17feccristy void haldClut ( const Image &clutImage_ ); 392b32b90a7e1ee2275333589072c496b5f69e17feccristy 3933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 3943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Implode image (special effect) 3953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void implode ( const double factor_ ); 3963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 397529fcc251289b181417ebc355b221dcaa91b1611cristy // implements the inverse discrete Fourier transform (DFT) of the image 398529fcc251289b181417ebc355b221dcaa91b1611cristy // either as a magnitude / phase or real / imaginary image pair. 399529fcc251289b181417ebc355b221dcaa91b1611cristy // 400529fcc251289b181417ebc355b221dcaa91b1611cristy void inverseFourierTransform ( const Image &phase_ ); 401529fcc251289b181417ebc355b221dcaa91b1611cristy void inverseFourierTransform ( const Image &phase_, 402529fcc251289b181417ebc355b221dcaa91b1611cristy const bool magnitude_ ); 4033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Label image 4043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void label ( const std::string &label_ ); 4053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Level image. Adjust the levels of the image by scaling the 4073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // colors falling between specified white and black points to the 4083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // full available quantum range. The parameters provided represent 4093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the black, mid (gamma), and white points. The black point 4103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the darkest color in the image. Colors darker than 4113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the black point are set to zero. Mid point (gamma) specifies a 4123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gamma correction to apply to the image. White point specifies 4133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the lightest color in the image. Colors brighter than the 4143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // white point are set to the maximum quantum value. The black and 4153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // white point have the valid range 0 to QuantumRange while mid (gamma) 4163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // has a useful range of 0 to ten. 4173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void level ( const double black_point, 4183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double white_point, 4193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double mid_point=1.0 ); 4203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Magnify image by integral size 4223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void magnify ( void ); 4233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Remap image colors with closest color from reference image 4253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void map ( const Image &mapImage_ , 4263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const bool dither_ = false ); 4273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4284c08aed51c5899665ade97263692328eea4af106cristy // Floodfill designated area with replacement alpha value 4293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void matteFloodfill ( const Color &target_ , 4304c08aed51c5899665ade97263692328eea4af106cristy const unsigned int alpha_, 431b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t x_, const ::ssize_t y_, 4323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const PaintMethod method_ ); 4333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Filter image by replacing each pixel component with the median 4353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // color in a circular neighborhood 4363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void medianFilter ( const double radius_ = 0.0 ); 4373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Reduce image by integral size 4393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void minify ( void ); 4403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Modulate percent hue, saturation, and brightness of an image 4423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void modulate ( const double brightness_, 4433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double saturation_, 4443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double hue_ ); 4453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Motion blur image with specified blur factor 4473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 4483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 4493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 4503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The angle_ parameter specifies the angle the object appears 4513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // to be comming from (zero degrees is from the right). 4523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void motionBlur ( const double radius_, 4533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_, 4543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double angle_ ); 4553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Negate colors in image. Set grayscale to only negate grayscale 4573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // values in image. 4583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void negate ( const bool grayscale_ = false ); 4593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Normalize image (increase contrast by normalizing the pixel 4613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // values to span the full range of color values) 4623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void normalize ( void ); 4633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Oilpaint image (image looks like oil painting) 4653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void oilPaint ( const double radius_ = 3.0 ); 4663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4674c08aed51c5899665ade97263692328eea4af106cristy // Set or attenuate the alpha channel in the image. If the image 4684c08aed51c5899665ade97263692328eea4af106cristy // pixels are opaque then they are set to the specified alpha 4694c08aed51c5899665ade97263692328eea4af106cristy // value, otherwise they are blended with the supplied alpha 4704c08aed51c5899665ade97263692328eea4af106cristy // value. The value of alpha_ ranges from 0 (completely opaque) 4714c08aed51c5899665ade97263692328eea4af106cristy // to QuantumRange. The defines OpaqueAlpha and TransparentAlpha are 4723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // available to specify completely opaque or completely 4733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // transparent, respectively. 4744c08aed51c5899665ade97263692328eea4af106cristy void alpha ( const unsigned int alpha_ ); 4753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Change color of opaque pixel to specified pen color. 4773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void opaque ( const Color &opaqueColor_, 4783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &penColor_ ); 4793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Ping is similar to read except only enough of the image is read 4813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // to determine the image columns, rows, and filesize. Access the 4823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // columns(), rows(), and fileSize() attributes after invoking 4833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // ping. The image data is not valid after calling ping. 4843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void ping ( const std::string &imageSpec_ ); 4853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Ping is similar to read except only enough of the image is read 4873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // to determine the image columns, rows, and filesize. Access the 4883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // columns(), rows(), and fileSize() attributes after invoking 4893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // ping. The image data is not valid after calling ping. 4903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void ping ( const Blob &blob_ ); 4913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Quantize image (reduce number of colors) 4933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void quantize ( const bool measureError_ = false ); 4943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 4953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void quantumOperator ( const ChannelType channel_, 4963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const MagickEvaluateOperator operator_, 4973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double rvalue_); 4983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 499b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void quantumOperator ( const ::ssize_t x_,const ::ssize_t y_, 500eaedf06777741da32408da72c1e512975c600c48cristy const size_t columns_, 501eaedf06777741da32408da72c1e512975c600c48cristy const size_t rows_, 5023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const ChannelType channel_, 5033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const MagickEvaluateOperator operator_, 5043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double rvalue_); 5053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Execute a named process module using an argc/argv syntax similar to 5073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // that accepted by a C 'main' routine. An exception is thrown if the 5083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // requested process module doesn't exist, fails to load, or fails during 5093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // execution. 5103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void process ( std::string name_, 511b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t argc_, 5123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const char **argv_ ); 5133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Raise image (lighten or darken the edges of an image to give a 5153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 3-D raised or lowered effect) 5163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void raise ( const Geometry &geometry_ = raiseGeometryDefault, 5173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const bool raisedFlag_ = false ); 5183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Random threshold image. 5203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 5213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Changes the value of individual pixels based on the intensity 5223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // of each pixel compared to a random threshold. The result is a 5233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // low-contrast, two color image. The thresholds_ argument is a 5243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // geometry containing LOWxHIGH thresholds. If the string 5253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // contains 2x2, 3x3, or 4x4, then an ordered dither of order 2, 5263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 3, or 4 will be performed instead. If a channel_ argument is 5273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified then only the specified channel is altered. This is 5283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // a very fast alternative to 'quantize' based dithering. 5293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void randomThreshold( const Geometry &thresholds_ ); 5303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void randomThresholdChannel( const Geometry &thresholds_, 5313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const ChannelType channel_ ); 5323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame into current object 5343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void read ( const std::string &imageSpec_ ); 5353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size into current object 5373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void read ( const Geometry &size_, 5383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &imageSpec_ ); 5393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame from in-memory BLOB 5413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void read ( const Blob &blob_ ); 5423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size from in-memory BLOB 5443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void read ( const Blob &blob_, 5453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &size_ ); 5463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size and depth from 5483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in-memory BLOB 5493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void read ( const Blob &blob_, 5503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &size_, 551eaedf06777741da32408da72c1e512975c600c48cristy const size_t depth_ ); 5523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size, depth, and format 5543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // from in-memory BLOB 5553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void read ( const Blob &blob_, 5563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &size_, 557eaedf06777741da32408da72c1e512975c600c48cristy const size_t depth_, 5583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &magick_ ); 5593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame of specified size, and format from 5613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // in-memory BLOB 5623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void read ( const Blob &blob_, 5633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &size_, 5643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &magick_ ); 5653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Read single image frame from an array of raw pixels, with 5673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specified storage type (ConstituteImage), e.g. 5683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // image.read( 640, 480, "RGB", 0, pixels ); 569eaedf06777741da32408da72c1e512975c600c48cristy void read ( const size_t width_, 570eaedf06777741da32408da72c1e512975c600c48cristy const size_t height_, 5713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &map_, 5723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const StorageType type_, 5733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const void *pixels_ ); 5743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Reduce noise in image using a noise peak elimination filter 5763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void reduceNoise ( void ); 5773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void reduceNoise ( const double order_ ); 5783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Resize image to specified size. 5803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void resize ( const Geometry &geometry_ ); 5813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Roll image (rolls image vertically and horizontally) by specified 5833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // number of columnms and rows) 5843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void roll ( const Geometry &roll_ ); 585eaedf06777741da32408da72c1e512975c600c48cristy void roll ( const size_t columns_, 586eaedf06777741da32408da72c1e512975c600c48cristy const size_t rows_ ); 5873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Rotate image counter-clockwise by specified number of degrees. 5893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void rotate ( const double degrees_ ); 5903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Resize image by using pixel sampling algorithm 5923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void sample ( const Geometry &geometry_ ); 5933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Resize image by using simple ratio algorithm 5953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void scale ( const Geometry &geometry_ ); 5963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 5973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Segment (coalesce similar image components) by analyzing the 5983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // histograms of the color components and identifying units that 5993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // are homogeneous with the fuzzy c-means technique. Also uses 6003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // QuantizeColorSpace and Verbose image attributes 6013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void segment ( const double clusterThreshold_ = 1.0, 6023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double smoothingThreshold_ = 1.5 ); 6033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Shade image using distant light source 6053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void shade ( const double azimuth_ = 30, 6063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double elevation_ = 30, 6073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const bool colorShading_ = false ); 6083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Sharpen pixels in image 6103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The radius_ parameter specifies the radius of the Gaussian, in 6113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pixels, not counting the center pixel. The sigma_ parameter 6123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // specifies the standard deviation of the Laplacian, in pixels. 6133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void sharpen ( const double radius_ = 0.0, 6143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ = 1.0 ); 6153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void sharpenChannel ( const ChannelType channel_, 6163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double radius_ = 0.0, 6173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_ = 1.0 ); 6183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Shave pixels from image edges. 6203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void shave ( const Geometry &geometry_ ); 6213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Shear image (create parallelogram by sliding image by X or Y axis) 6233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void shear ( const double xShearAngle_, 6243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double yShearAngle_ ); 6253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // adjust the image contrast with a non-linear sigmoidal contrast algorithm 627eaedf06777741da32408da72c1e512975c600c48cristy void sigmoidalContrast ( const size_t sharpen_, const double contrast, const double midpoint = QuantumRange / 2.0 ); 6283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Solarize image (similar to effect seen when exposing a 6303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // photographic film to light during the development process) 6313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void solarize ( const double factor_ = 50.0 ); 6323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6338198a75baed6048bb2f5a2c04c773cce5e512c34cristy // Splice the background color into the image. 6348198a75baed6048bb2f5a2c04c773cce5e512c34cristy void splice ( const Geometry &geometry_ ); 6358198a75baed6048bb2f5a2c04c773cce5e512c34cristy 6363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Spread pixels randomly within image by specified ammount 637eaedf06777741da32408da72c1e512975c600c48cristy void spread ( const size_t amount_ = 3 ); 6383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Sparse color image, given a set of coordinates, interpolates the colors 6403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // found at those coordinates, across the whole image, using various 6413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // methods. 6423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void sparseColor ( const ChannelType channel, 6433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const SparseColorMethod method, 644bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy const size_t number_arguments, 6453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double *arguments ); 6463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add a digital watermark to the image (based on second image) 6483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void stegano ( const Image &watermark_ ); 6493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Create an image which appears in stereo when viewed with 6513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // red-blue glasses (Red image on left, blue on right) 6523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void stereo ( const Image &rightImage_ ); 6533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6549f89a3fdb53e6226e8361b6d7b422f0387aa9431cristy // Strip strips an image of all profiles and comments. 6559f89a3fdb53e6226e8361b6d7b422f0387aa9431cristy void strip ( void ); 6569f89a3fdb53e6226e8361b6d7b422f0387aa9431cristy 6573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Swirl image (image pixels are rotated by degrees) 6583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void swirl ( const double degrees_ ); 6593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Channel a texture on image background 6613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void texture ( const Image &texture_ ); 6623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Threshold image 6643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void threshold ( const double threshold_ ); 6653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transform image based on image and crop geometries 6673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Crop geometry is optional 6683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transform ( const Geometry &imageGeometry_ ); 6693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transform ( const Geometry &imageGeometry_, 6703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Geometry &cropGeometry_ ); 6713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add matte image to image, setting pixels matching color to 6733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // transparent 6743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transparent ( const Color &color_ ); 6753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add matte image to image, for all the pixels that lies in between 6773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the given two color 6783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transparentChroma ( const Color &colorLow_, const Color &colorHigh_); 6793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Trim edges that are the background color from the image 6813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void trim ( void ); 6823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image representation type (also see type attribute) 6843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Available types: 6853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Bilevel Grayscale GrayscaleMatte 6863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Palette PaletteMatte TrueColor 6873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // TrueColorMatte ColorSeparation ColorSeparationMatte 6883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void type ( const ImageType type_ ); 6893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 6903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Replace image with a sharpened version of the original image 6913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // using the unsharp mask algorithm. 6923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // radius_ 6933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the radius of the Gaussian, in pixels, not counting the 6943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // center pixel. 6953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // sigma_ 6963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the standard deviation of the Gaussian, in pixels. 6973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // amount_ 6983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the percentage of the difference between the original and 6993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the blur image that is added back into the original. 7003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // threshold_ 7013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the threshold in pixels needed to apply the diffence amount. 7023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void unsharpmask ( const double radius_, 7033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_, 7043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double amount_, 7053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double threshold_ ); 7063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void unsharpmaskChannel ( const ChannelType channel_, 7073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double radius_, 7083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double sigma_, 7093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double amount_, 7103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double threshold_ ); 7113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Map image pixels to a sine wave 7133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void wave ( const double amplitude_ = 25.0, 7143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double wavelength_ = 150.0 ); 7153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Write single image frame to a file 7173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void write ( const std::string &imageSpec_ ); 7183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Write single image frame to in-memory BLOB, with optional 7203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // format and adjoin parameters. 7213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void write ( Blob *blob_ ); 7223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void write ( Blob *blob_, 7233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &magick_ ); 7243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void write ( Blob *blob_, 7253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &magick_, 726eaedf06777741da32408da72c1e512975c600c48cristy const size_t depth_ ); 7273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Write single image frame to an array of pixels with storage 7293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // type specified by user (DispatchImage), e.g. 7303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // image.write( 0, 0, 640, 1, "RGB", 0, pixels ); 731b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void write ( const ::ssize_t x_, 732b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_, 733eaedf06777741da32408da72c1e512975c600c48cristy const size_t columns_, 734eaedf06777741da32408da72c1e512975c600c48cristy const size_t rows_, 7353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string& map_, 7363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const StorageType type_, 7373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void *pixels_ ); 7383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Zoom image to specified size. 7403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void zoom ( const Geometry &geometry_ ); 7413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 7433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 7443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image Attributes and Options 7453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 7463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 7473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Join images into a single multi-image file 7493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void adjoin ( const bool flag_ ); 7503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool adjoin ( void ) const; 7513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Anti-alias Postscript and TrueType fonts (default true) 7533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void antiAlias( const bool flag_ ); 7543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool antiAlias( void ); 7553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Time in 1/100ths of a second which must expire before 7573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // displaying the next image in an animated sequence. 758eaedf06777741da32408da72c1e512975c600c48cristy void animationDelay ( const size_t delay_ ); 759eaedf06777741da32408da72c1e512975c600c48cristy size_t animationDelay ( void ) const; 7603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Number of iterations to loop an animation (e.g. Netscape loop 7623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // extension) for. 763eaedf06777741da32408da72c1e512975c600c48cristy void animationIterations ( const size_t iterations_ ); 764eaedf06777741da32408da72c1e512975c600c48cristy size_t animationIterations ( void ) const; 7653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Access/Update a named image attribute 7673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void attribute ( const std::string name_, 7683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string value_ ); 7693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string attribute ( const std::string name_ ); 7703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image background color 7723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void backgroundColor ( const Color &color_ ); 7733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Color backgroundColor ( void ) const; 7743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Name of texture image to tile onto the image background 7763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void backgroundTexture (const std::string &backgroundTexture_ ); 7773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string backgroundTexture ( void ) const; 7783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Base image width (before transformations) 780eaedf06777741da32408da72c1e512975c600c48cristy size_t baseColumns ( void ) const; 7813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Base image filename (before transformations) 7833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string baseFilename ( void ) const; 7843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Base image height (before transformations) 786eaedf06777741da32408da72c1e512975c600c48cristy size_t baseRows ( void ) const; 7873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image border color 7893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void borderColor ( const Color &color_ ); 7903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Color borderColor ( void ) const; 7913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Return smallest bounding box enclosing non-border pixels. The 7933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // current fuzz value is used when discriminating between pixels. 7943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // This is the crop bounding box used by crop(Geometry(0,0)); 7953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Geometry boundingBox ( void ) const; 7963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 7973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Text bounding-box base color (default none) 7983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void boxColor ( const Color &boxColor_ ); 7993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Color boxColor ( void ) const; 8003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Pixel cache threshold in megabytes. Once this memory threshold 8023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // is exceeded, all subsequent pixels cache operations are to/from 8033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // disk. This setting is shared by all Image objects. 804eaedf06777741da32408da72c1e512975c600c48cristy static void cacheThreshold ( const size_t threshold_ ); 8053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Chromaticity blue primary point (e.g. x=0.15, y=0.06) 8073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaBluePrimary ( const double x_, const double y_ ); 8083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaBluePrimary ( double *x_, double *y_ ) const; 8093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Chromaticity green primary point (e.g. x=0.3, y=0.6) 8113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaGreenPrimary ( const double x_, const double y_ ); 8123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaGreenPrimary ( double *x_, double *y_ ) const; 8133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Chromaticity red primary point (e.g. x=0.64, y=0.33) 8153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaRedPrimary ( const double x_, const double y_ ); 8163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaRedPrimary ( double *x_, double *y_ ) const; 8173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Chromaticity white point (e.g. x=0.3127, y=0.329) 8193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaWhitePoint ( const double x_, const double y_ ); 8203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void chromaWhitePoint ( double *x_, double *y_ ) const; 8213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image class (DirectClass or PseudoClass) 8233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // NOTE: setting a DirectClass image to PseudoClass will result in 8243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the loss of color information if the number of colors in the 8253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // image is greater than the maximum palette size (either 256 or 8263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 65536 entries depending on the value of MAGICKCORE_QUANTUM_DEPTH when 8273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // ImageMagick was built). 8283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void classType ( const ClassType class_ ); 8293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ClassType classType ( void ) const; 8303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Associate a clip mask with the image. The clip mask must be the 8323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // same dimensions as the image. Pass an invalid image to unset an 8333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // existing clip mask. 8343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void clipMask ( const Image & clipMask_ ); 8353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image clipMask ( void ) const; 8363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Colors within this distance are considered equal 8383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void colorFuzz ( const double fuzz_ ); 8393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double colorFuzz ( void ) const; 8403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Color at colormap position index_ 842eaedf06777741da32408da72c1e512975c600c48cristy void colorMap ( const size_t index_, 8433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &color_ ); 844eaedf06777741da32408da72c1e512975c600c48cristy Color colorMap ( const size_t index_ ) const; 8453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Colormap size (number of colormap entries) 847eaedf06777741da32408da72c1e512975c600c48cristy void colorMapSize ( const size_t entries_ ); 848eaedf06777741da32408da72c1e512975c600c48cristy size_t colorMapSize ( void ); 8493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image Color Space 8513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void colorSpace ( const ColorspaceType colorSpace_ ); 8523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ColorspaceType colorSpace ( void ) const; 8533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void colorspaceType ( const ColorspaceType colorSpace_ ); 8553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ColorspaceType colorspaceType ( void ) const; 8563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image width 858eaedf06777741da32408da72c1e512975c600c48cristy size_t columns ( void ) const; 8593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image comment 8613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string comment ( void ) const; 8623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Compression type 8643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void compressType ( const CompressionType compressType_ ); 8653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy CompressionType compressType ( void ) const; 8663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Enable printing of debug messages from ImageMagick 8683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void debug ( const bool flag_ ); 8693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool debug ( void ) const; 8703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Tagged image format define (set/access coder-specific option) The 8723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // magick_ option specifies the coder the define applies to. The key_ 8733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // option provides the key specific to that coder. The value_ option 8743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // provides the value to set (if any). See the defineSet() method if the 8753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // key must be removed entirely. 8763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void defineValue ( const std::string &magick_, 8773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &key_, 8783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &value_ ); 8793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string defineValue ( const std::string &magick_, 8803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &key_ ) const; 8813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Tagged image format define. Similar to the defineValue() method 8833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // except that passing the flag_ value 'true' creates a value-less 8843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // define with that format and key. Passing the flag_ value 'false' 8853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // removes any existing matching definition. The method returns 'true' 8863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // if a matching key exists, and 'false' if no matching key exists. 8873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void defineSet ( const std::string &magick_, 8883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &key_, 8893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool flag_ ); 8903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool defineSet ( const std::string &magick_, 8913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const std::string &key_ ) const; 8923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Vertical and horizontal resolution in pixels of the image 8943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void density ( const Geometry &geomery_ ); 8953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Geometry density ( void ) const; 8963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 8973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image depth (bits allocated to red/green/blue components) 898eaedf06777741da32408da72c1e512975c600c48cristy void depth ( const size_t depth_ ); 899eaedf06777741da32408da72c1e512975c600c48cristy size_t depth ( void ) const; 9003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Tile names from within an image montage 9023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string directory ( void ) const; 9033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Endianness (little like Intel or big like SPARC) for image 9053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // formats which support endian-specific options. 9063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void endian ( const EndianType endian_ ); 9073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy EndianType endian ( void ) const; 9083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Exif profile (BLOB) 9103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void exifProfile( const Blob& exifProfile_ ); 9113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Blob exifProfile( void ) const; 9123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image file name 9143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void fileName ( const std::string &fileName_ ); 9153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string fileName ( void ) const; 9163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Number of bytes of the image on disk 9183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy off_t fileSize ( void ) const; 9193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Color to use when filling drawn objects 9213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void fillColor ( const Color &fillColor_ ); 9223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Color fillColor ( void ) const; 9233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Rule to use when filling drawn objects 9253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void fillRule ( const FillRule &fillRule_ ); 9263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FillRule fillRule ( void ) const; 9273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Pattern to use while filling drawn objects. 9293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void fillPattern ( const Image &fillPattern_ ); 9303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image fillPattern ( void ) const; 9313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Filter to use when resizing image 9333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void filterType ( const FilterTypes filterType_ ); 9343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy FilterTypes filterType ( void ) const; 9353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Text rendering font 9373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void font ( const std::string &font_ ); 9383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string font ( void ) const; 9393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Font point size 9413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void fontPointsize ( const double pointSize_ ); 9423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double fontPointsize ( void ) const; 9433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Obtain font metrics for text string given current font, 9453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pointsize, and density settings. 9463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void fontTypeMetrics( const std::string &text_, 9473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy TypeMetric *metrics ); 9483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Long image format description 9503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string format ( void ) const; 9513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Gamma level of the image 9533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double gamma ( void ) const; 9543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Preferred size of the image when encoding 9563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Geometry geometry ( void ) const; 9573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // GIF disposal method 959eaedf06777741da32408da72c1e512975c600c48cristy void gifDisposeMethod ( const size_t disposeMethod_ ); 960eaedf06777741da32408da72c1e512975c600c48cristy size_t gifDisposeMethod ( void ) const; 9613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // ICC color profile (BLOB) 9633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void iccColorProfile( const Blob &colorProfile_ ); 9643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Blob iccColorProfile( void ) const; 9653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Type of interlacing to use 9673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void interlaceType ( const InterlaceType interlace_ ); 9683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy InterlaceType interlaceType ( void ) const; 9693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // IPTC profile (BLOB) 9713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void iptcProfile( const Blob& iptcProfile_ ); 9723ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Blob iptcProfile( void ) const; 9733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Does object contain valid image? 9753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void isValid ( const bool isValid_ ); 9763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool isValid ( void ) const; 9773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image label 9793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string label ( void ) const; 9803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 9813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Obtain image statistics. Statistics are normalized to the range 9823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // of 0.0 to 1.0 and are output to the specified ImageStatistics 9833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // structure. 9843ed852eea50f9d4cd633efb8c2b054b8e33c253cristytypedef struct _ImageChannelStatistics 9853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 9863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* Minimum value observed */ 9873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double maximum; 9883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* Maximum value observed */ 9893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double minimum; 9903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* Average (mean) value observed */ 9913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double mean; 9923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* Standard deviation, sqrt(variance) */ 9933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double standard_deviation; 9943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* Variance */ 9953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double variance; 9963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* Kurtosis */ 9973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double kurtosis; 9983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy /* Skewness */ 9993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double skewness; 10003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } ImageChannelStatistics; 10013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10023ed852eea50f9d4cd633efb8c2b054b8e33c253cristytypedef struct _ImageStatistics 10033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy { 10043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ImageChannelStatistics red; 10053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ImageChannelStatistics green; 10063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ImageChannelStatistics blue; 10074c08aed51c5899665ade97263692328eea4af106cristy ImageChannelStatistics alpha; 10083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy } ImageStatistics; 10093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 1010d42d995b9cb2a16e13221e665554417a5b7ec7fbcristy void statistics ( ImageStatistics *statistics ) ; 10113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Stroke width for drawing vector objects (default one) 10133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // This method is now deprecated. Please use strokeWidth instead. 10143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void lineWidth ( const double lineWidth_ ); 10153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double lineWidth ( void ) const; 10163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // File type magick identifier (.e.g "GIF") 10183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void magick ( const std::string &magick_ ); 10193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string magick ( void ) const; 10203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image supports transparency (matte channel) 10223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void matte ( const bool matteFlag_ ); 10233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool matte ( void ) const; 10243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transparent color 10263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void matteColor ( const Color &matteColor_ ); 10273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Color matteColor ( void ) const; 10283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The mean error per pixel computed when an image is color reduced 10303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double meanErrorPerPixel ( void ) const; 10313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image modulus depth (minimum number of bits required to support 10333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // red/green/blue components without loss of accuracy) 1034eaedf06777741da32408da72c1e512975c600c48cristy void modulusDepth ( const size_t modulusDepth_ ); 1035eaedf06777741da32408da72c1e512975c600c48cristy size_t modulusDepth ( void ) const; 10363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Tile size and offset within an image montage 10383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Geometry montageGeometry ( void ) const; 10393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transform image to black and white 10413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void monochrome ( const bool monochromeFlag_ ); 10423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool monochrome ( void ) const; 10433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The normalized max error per pixel computed when an image is 10453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // color reduced. 10463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double normalizedMaxError ( void ) const; 10473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The normalized mean error per pixel computed when an image is 10493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // color reduced. 10503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double normalizedMeanError ( void ) const; 10513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image orientation 10533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void orientation ( const OrientationType orientation_ ); 10543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy OrientationType orientation ( void ) const; 10553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Preferred size and location of an image canvas. 10573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void page ( const Geometry &pageSize_ ); 10583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Geometry page ( void ) const; 10593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Pen color (deprecated, don't use any more) 10613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void penColor ( const Color &penColor_ ); 10623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Color penColor ( void ) const; 10633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Pen texture image (deprecated, don't use any more) 10653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void penTexture ( const Image &penTexture_ ); 10663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image penTexture ( void ) const; 10673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Get/set pixel color at location x & y. 1069b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy void pixelColor ( const ::ssize_t x_, 1070b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_, 10713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Color &color_ ); 1072b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy Color pixelColor ( const ::ssize_t x_, 1073b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy const ::ssize_t y_ ) const; 10743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Add or remove a named profile to/from the image. Remove the 10763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // profile by passing an empty Blob (e.g. Blob()). Valid names are 10773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // "*", "8BIM", "ICM", "IPTC", or a user/format-defined profile name. 10783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void profile( const std::string name_, 10793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Blob &colorProfile_ ); 10803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve a named profile from the image. Valid names are: 10823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // "8BIM", "8BIMTEXT", "APP1", "APP1JPEG", "ICC", "ICM", & "IPTC" 10833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // or an existing user/format-defined profile name. 10843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Blob profile( const std::string name_ ) const; 10853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // JPEG/MIFF/PNG compression level (default 75). 1087eaedf06777741da32408da72c1e512975c600c48cristy void quality ( const size_t quality_ ); 1088eaedf06777741da32408da72c1e512975c600c48cristy size_t quality ( void ) const; 10893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Maximum number of colors to quantize to 1091eaedf06777741da32408da72c1e512975c600c48cristy void quantizeColors ( const size_t colors_ ); 1092eaedf06777741da32408da72c1e512975c600c48cristy size_t quantizeColors ( void ) const; 10933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Colorspace to quantize in. 10953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void quantizeColorSpace ( const ColorspaceType colorSpace_ ); 10963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ColorspaceType quantizeColorSpace ( void ) const; 10973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 10983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Dither image during quantization (default true). 10993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void quantizeDither ( const bool ditherFlag_ ); 11003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool quantizeDither ( void ) const; 11013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Quantization tree-depth 1103eaedf06777741da32408da72c1e512975c600c48cristy void quantizeTreeDepth ( const size_t treeDepth_ ); 1104eaedf06777741da32408da72c1e512975c600c48cristy size_t quantizeTreeDepth ( void ) const; 11053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The type of rendering intent 11073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void renderingIntent ( const RenderingIntent renderingIntent_ ); 11083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy RenderingIntent renderingIntent ( void ) const; 11093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Units of image resolution 11113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void resolutionUnits ( const ResolutionType resolutionUnits_ ); 11123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ResolutionType resolutionUnits ( void ) const; 11133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // The number of pixel rows in the image 1115eaedf06777741da32408da72c1e512975c600c48cristy size_t rows ( void ) const; 11163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image scene number 1118eaedf06777741da32408da72c1e512975c600c48cristy void scene ( const size_t scene_ ); 1119eaedf06777741da32408da72c1e512975c600c48cristy size_t scene ( void ) const; 11203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image signature. Set force_ to true in order to re-calculate 11223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the signature regardless of whether the image data has been 11233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // modified. 11243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string signature ( const bool force_ = false ) const; 11253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Width and height of a raw image 11273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void size ( const Geometry &geometry_ ); 11283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Geometry size ( void ) const; 11293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // enabled/disable stroke anti-aliasing 11313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokeAntiAlias( const bool flag_ ); 11323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool strokeAntiAlias( void ) const; 11333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Color to use when drawing object outlines 11353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokeColor ( const Color &strokeColor_ ); 11363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Color strokeColor ( void ) const; 11373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Specify the pattern of dashes and gaps used to stroke 11393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // paths. The strokeDashArray represents a zero-terminated array 11403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // of numbers that specify the lengths of alternating dashes and 11413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // gaps in pixels. If an odd number of values is provided, then 11423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the list of values is repeated to yield an even number of 11433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // values. A typical strokeDashArray_ array might contain the 11443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // members 5 3 2 0, where the zero value indicates the end of the 11453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // pattern array. 11463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokeDashArray ( const double* strokeDashArray_ ); 11473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const double* strokeDashArray ( void ) const; 11483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // While drawing using a dash pattern, specify distance into the 11503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // dash pattern to start the dash (default 0). 11513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokeDashOffset ( const double strokeDashOffset_ ); 11523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double strokeDashOffset ( void ) const; 11533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Specify the shape to be used at the end of open subpaths when 11553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // they are stroked. Values of LineCap are UndefinedCap, ButtCap, 11563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // RoundCap, and SquareCap. 11573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokeLineCap ( const LineCap lineCap_ ); 11583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy LineCap strokeLineCap ( void ) const; 11593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Specify the shape to be used at the corners of paths (or other 11613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // vector shapes) when they are stroked. Values of LineJoin are 11623ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin. 11633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokeLineJoin ( const LineJoin lineJoin_ ); 11643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy LineJoin strokeLineJoin ( void ) const; 11653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11663ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Specify miter limit. When two line segments meet at a sharp 11673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // angle and miter joins have been specified for 'lineJoin', it is 11683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // possible for the miter to extend far beyond the thickness of 11693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the line stroking the path. The miterLimit' imposes a limit on 11703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // the ratio of the miter length to the 'lineWidth'. The default 11713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // value of this parameter is 4. 1172eaedf06777741da32408da72c1e512975c600c48cristy void strokeMiterLimit ( const size_t miterLimit_ ); 1173eaedf06777741da32408da72c1e512975c600c48cristy size_t strokeMiterLimit ( void ) const; 11743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Pattern image to use while stroking object outlines. 11763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokePattern ( const Image &strokePattern_ ); 11773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image strokePattern ( void ) const; 11783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Stroke width for drawing vector objects (default one) 11803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void strokeWidth ( const double strokeWidth_ ); 11813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double strokeWidth ( void ) const; 11823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Subimage of an image sequence 1184eaedf06777741da32408da72c1e512975c600c48cristy void subImage ( const size_t subImage_ ); 1185eaedf06777741da32408da72c1e512975c600c48cristy size_t subImage ( void ) const; 11863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Number of images relative to the base image 1188eaedf06777741da32408da72c1e512975c600c48cristy void subRange ( const size_t subRange_ ); 1189eaedf06777741da32408da72c1e512975c600c48cristy size_t subRange ( void ) const; 11903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Annotation text encoding (e.g. "UTF-16") 11923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void textEncoding ( const std::string &encoding_ ); 11933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string textEncoding ( void ) const; 11943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Number of colors in the image 1196bb50337b2a8a16ca7e903cc04ab195ff0fd47ae6cristy size_t totalColors ( void ); 11973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 11983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Origin of coordinate system to use when annotating with text or drawing 11993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transformOrigin ( const double x_,const double y_ ); 12003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Rotation to use when annotating with text or drawing 12023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transformRotation ( const double angle_ ); 12033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Reset transformation parameters to default 12053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transformReset ( void ); 12063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Scale to use when annotating with text or drawing 12083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transformScale ( const double sx_, const double sy_ ); 12093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Skew to use in X axis when annotating with text or drawing 12113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transformSkewX ( const double skewx_ ); 12123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Skew to use in Y axis when annotating with text or drawing 12143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void transformSkewY ( const double skewy_ ); 12153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Image representation type (also see type operation) 12173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Available types: 12183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Bilevel Grayscale GrayscaleMatte 12193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Palette PaletteMatte TrueColor 12203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // TrueColorMatte ColorSeparation ColorSeparationMatte 12213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ImageType type ( void ) const; 12223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Print detailed information about the image 12243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void verbose ( const bool verboseFlag_ ); 12253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy bool verbose ( void ) const; 12263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // FlashPix viewing parameters 12283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void view ( const std::string &view_ ); 12293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string view ( void ) const; 12303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Virtual pixel method 12323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void virtualPixelMethod ( const VirtualPixelMethod virtual_pixel_method_ ); 12333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy VirtualPixelMethod virtualPixelMethod ( void ) const; 12343ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // X11 display to display to, obtain fonts from, or to capture 12363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // image from 12373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void x11Display ( const std::string &display_ ); 12383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy std::string x11Display ( void ) const; 12393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // x resolution of the image 12413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double xResolution ( void ) const; 12423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // y resolution of the image 12443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy double yResolution ( void ) const; 12453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 12473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 12483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Low-level Pixel Access Routines 12493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 12503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Also see the Pixels class, which provides support for multiple 12513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // cache views. 12523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 12533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 12543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12563ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transfers read-only pixels from the image to the pixel cache as 12573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // defined by the specified region 12584c08aed51c5899665ade97263692328eea4af106cristy const Quantum* getConstPixels ( const ::ssize_t x_, const ::ssize_t y_, 1259eaedf06777741da32408da72c1e512975c600c48cristy const size_t columns_, 1260eaedf06777741da32408da72c1e512975c600c48cristy const size_t rows_ ) const; 12613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12624c08aed51c5899665ade97263692328eea4af106cristy // Obtain mutable image pixel metacontent (valid for PseudoClass images) 12634c08aed51c5899665ade97263692328eea4af106cristy void* getMetacontent ( void ); 12643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12654c08aed51c5899665ade97263692328eea4af106cristy // Obtain immutable image pixel metacontent (valid for PseudoClass images) 12664c08aed51c5899665ade97263692328eea4af106cristy const void* getConstMetacontent ( void ) const; 12673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transfers pixels from the image to the pixel cache as defined 12693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // by the specified region. Modified pixels may be subsequently 12703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // transferred back to the image via syncPixels. This method is 12713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // valid for DirectClass images. 12724c08aed51c5899665ade97263692328eea4af106cristy Quantum* getPixels ( const ::ssize_t x_, const ::ssize_t y_, 1273eaedf06777741da32408da72c1e512975c600c48cristy const size_t columns_, 1274eaedf06777741da32408da72c1e512975c600c48cristy const size_t rows_ ); 12753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Allocates a pixel cache region to store image pixels as defined 12773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // by the region rectangle. This area is subsequently transferred 12783ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // from the pixel cache to the image via syncPixels. 12794c08aed51c5899665ade97263692328eea4af106cristy Quantum* setPixels ( const ::ssize_t x_, const ::ssize_t y_, 1280eaedf06777741da32408da72c1e512975c600c48cristy const size_t columns_, 1281eaedf06777741da32408da72c1e512975c600c48cristy const size_t rows_ ); 12823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transfers the image cache pixels to the image. 12843ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void syncPixels ( void ); 12853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transfers one or more pixel components from a buffer or file 12873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // into the image pixel cache of an image. 12883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Used to support image decoders. 12893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void readPixels ( const QuantumType quantum_, 12903ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const unsigned char *source_ ); 12913ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12923ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Transfers one or more pixel components from the image pixel 12933ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // cache to a buffer or file. 12943ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Used to support image encoders. 12953ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void writePixels ( const QuantumType quantum_, 12963ed852eea50f9d4cd633efb8c2b054b8e33c253cristy unsigned char *destination_ ); 12973ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 12983ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 12993ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 13003ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // No user-serviceable parts beyond this point 13013ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // 13023ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ////////////////////////////////////////////////////////////////////// 13033ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13043ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13053ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Construct with MagickCore::Image and default options 13063ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Image ( MagickCore::Image* image_ ); 13073ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13083ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve Image* 13093ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickCore::Image*& image( void ); 13103ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const MagickCore::Image* constImage( void ) const; 13113ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13123ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve Options* 13133ed852eea50f9d4cd633efb8c2b054b8e33c253cristy Options* options( void ); 13143ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const Options* constOptions( void ) const; 13153ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13163ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve ImageInfo* 13173ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickCore::ImageInfo * imageInfo( void ); 13183ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const MagickCore::ImageInfo * constImageInfo( void ) const; 13193ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13203ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Retrieve QuantizeInfo* 13213ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickCore::QuantizeInfo * quantizeInfo( void ); 13223ed852eea50f9d4cd633efb8c2b054b8e33c253cristy const MagickCore::QuantizeInfo * constQuantizeInfo( void ) const; 13233ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13243ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Replace current image (reference counted) 13253ed852eea50f9d4cd633efb8c2b054b8e33c253cristy MagickCore::Image* replaceImage ( MagickCore::Image* replacement_ ); 13263ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13273ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Prepare to update image (copy if reference > 1) 13283ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void modifyImage ( void ); 13293ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13303ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Test for ImageMagick error and throw exception if error 13313ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void throwImageException( void ) const; 13323ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13333ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Register image with image registry or obtain registration id 1334b3e3ad01f4f400dd56e6d4e241f9a7b12fb93305cristy ::ssize_t registerId( void ); 13353ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13363ed852eea50f9d4cd633efb8c2b054b8e33c253cristy // Unregister image from image registry 13373ed852eea50f9d4cd633efb8c2b054b8e33c253cristy void unregisterId( void) ; 13383ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13393ed852eea50f9d4cd633efb8c2b054b8e33c253cristy private: 13403ed852eea50f9d4cd633efb8c2b054b8e33c253cristy ImageRef * _imgRef; 13413ed852eea50f9d4cd633efb8c2b054b8e33c253cristy }; 13423ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13433ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} // end of namespace Magick 13443ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13453ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// 13463ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Inlines 13473ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// 13483ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13493ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13503ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// 13513ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Image 13523ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// 13533ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13543ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13553ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Reduce noise in image using a noise peak elimination filter 13563ed852eea50f9d4cd633efb8c2b054b8e33c253cristyinline void Magick::Image::reduceNoise ( void ) 13573ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 13583ed852eea50f9d4cd633efb8c2b054b8e33c253cristy reduceNoise( 3.0 ); 13593ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 13603ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13613ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Stroke width for drawing vector objects (default one) 13623ed852eea50f9d4cd633efb8c2b054b8e33c253cristyinline void Magick::Image::lineWidth ( const double lineWidth_ ) 13633ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 13643ed852eea50f9d4cd633efb8c2b054b8e33c253cristy strokeWidth( lineWidth_ ); 13653ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 13663ed852eea50f9d4cd633efb8c2b054b8e33c253cristyinline double Magick::Image::lineWidth ( void ) const 13673ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 13683ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return strokeWidth( ); 13693ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 13703ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13713ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Get image storage class 13723ed852eea50f9d4cd633efb8c2b054b8e33c253cristyinline Magick::ClassType Magick::Image::classType ( void ) const 13733ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 13743ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return static_cast<Magick::ClassType>(constImage()->storage_class); 13753ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 13763ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13773ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Get number of image columns 1378eaedf06777741da32408da72c1e512975c600c48cristyinline size_t Magick::Image::columns ( void ) const 13793ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 13803ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return constImage()->columns; 13813ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 13823ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13833ed852eea50f9d4cd633efb8c2b054b8e33c253cristy// Get number of image rows 1384eaedf06777741da32408da72c1e512975c600c48cristyinline size_t Magick::Image::rows ( void ) const 13853ed852eea50f9d4cd633efb8c2b054b8e33c253cristy{ 13863ed852eea50f9d4cd633efb8c2b054b8e33c253cristy return constImage()->rows; 13873ed852eea50f9d4cd633efb8c2b054b8e33c253cristy} 13883ed852eea50f9d4cd633efb8c2b054b8e33c253cristy 13893ed852eea50f9d4cd633efb8c2b054b8e33c253cristy#endif // Magick_Image_header 1390