cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | // This may look like C code, but it is really -*- C++ -*- |
| 2 | // |
| 3 | // Copyright Bob Friesenhahn, 1999, 2002 |
| 4 | // |
| 5 | // Implementation of STL classes and functions |
| 6 | // |
| 7 | |
| 8 | #define MAGICKCORE_IMPLEMENTATION 1 |
| 9 | #define MAGICK_PLUSPLUS_IMPLEMENTATION 1 |
| 10 | |
| 11 | #include <Magick++/Image.h> |
| 12 | #include <Magick++/STL.h> |
| 13 | |
| 14 | // Adaptive-blur image with specified blur factor |
| 15 | Magick::adaptiveBlurImage::adaptiveBlurImage( const double radius_, |
| 16 | const double sigma_ ) |
| 17 | : _radius( radius_ ), |
| 18 | _sigma( sigma_ ) |
| 19 | { |
| 20 | } |
| 21 | void Magick::adaptiveBlurImage::operator()( Magick::Image &image_ ) const |
| 22 | { |
| 23 | image_.adaptiveBlur( _radius, _sigma ); |
| 24 | } |
| 25 | |
| 26 | // Local adaptive threshold image |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 27 | Magick::adaptiveThresholdImage::adaptiveThresholdImage( const size_t width_, |
| 28 | const size_t height_, |
cristy | 4e0eef0 | 2010-05-30 21:52:21 +0000 | [diff] [blame] | 29 | const ssize_t offset_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 30 | : _width(width_), |
| 31 | _height(height_), |
| 32 | _offset(offset_) |
| 33 | { |
| 34 | } |
| 35 | void Magick::adaptiveThresholdImage::operator()( Magick::Image &image_ ) const |
| 36 | { |
| 37 | image_.adaptiveThreshold( _width, _height, _offset ); |
| 38 | } |
| 39 | |
| 40 | // Add noise to image with specified noise type |
| 41 | Magick::addNoiseImage::addNoiseImage( Magick::NoiseType noiseType_ ) |
| 42 | : _noiseType( noiseType_ ) |
| 43 | { |
| 44 | } |
| 45 | void Magick::addNoiseImage::operator()( Magick::Image &image_ ) const |
| 46 | { |
| 47 | image_.addNoise( _noiseType ); |
| 48 | } |
| 49 | |
| 50 | // Transform image by specified affine (or free transform) matrix. |
| 51 | Magick::affineTransformImage::affineTransformImage( const DrawableAffine &affine_ ) |
| 52 | : _affine( affine_ ) |
| 53 | { |
| 54 | } |
| 55 | void Magick::affineTransformImage::operator()( Magick::Image &image_ ) const |
| 56 | { |
| 57 | image_.affineTransform( _affine ); |
| 58 | } |
| 59 | |
| 60 | // Annotate image (draw text on image) |
| 61 | |
| 62 | // Annotate using specified text, and placement location |
| 63 | Magick::annotateImage::annotateImage ( const std::string &text_, |
| 64 | const Magick::Geometry &geometry_ ) |
| 65 | : _text( text_ ), |
| 66 | _geometry( geometry_ ), |
| 67 | _gravity( Magick::NorthWestGravity ), |
| 68 | _degrees( 0 ) |
| 69 | { |
| 70 | } |
| 71 | // Annotate using specified text, bounding area, and placement gravity |
| 72 | Magick::annotateImage::annotateImage ( const std::string &text_, |
| 73 | const Magick::Geometry &geometry_, |
| 74 | const Magick::GravityType gravity_ ) |
| 75 | : _text( text_ ), |
| 76 | _geometry( geometry_ ), |
| 77 | _gravity( gravity_ ), |
| 78 | _degrees( 0 ) |
| 79 | { |
| 80 | } |
| 81 | // Annotate with text using specified text, bounding area, placement |
| 82 | // gravity, and rotation. |
| 83 | Magick::annotateImage::annotateImage ( const std::string &text_, |
| 84 | const Magick::Geometry &geometry_, |
| 85 | const Magick::GravityType gravity_, |
| 86 | const double degrees_ ) |
| 87 | : _text( text_ ), |
| 88 | _geometry( geometry_ ), |
| 89 | _gravity( gravity_ ), |
| 90 | _degrees( degrees_ ) |
| 91 | { |
| 92 | } |
| 93 | // Annotate with text (bounding area is entire image) and placement |
| 94 | // gravity. |
| 95 | Magick::annotateImage::annotateImage ( const std::string &text_, |
| 96 | const Magick::GravityType gravity_ ) |
| 97 | : _text( text_ ), |
| 98 | _geometry( ), |
| 99 | _gravity( gravity_ ), |
| 100 | _degrees( 0 ) |
| 101 | { |
| 102 | } |
| 103 | void Magick::annotateImage::operator()( Magick::Image &image_ ) const |
| 104 | { |
| 105 | image_.annotate( _text, _geometry, _gravity, _degrees ); |
| 106 | } |
| 107 | |
| 108 | // Blur image with specified blur factor |
| 109 | Magick::blurImage::blurImage( const double radius_, const double sigma_ ) |
| 110 | : _radius( radius_ ), |
| 111 | _sigma( sigma_ ) |
| 112 | { |
| 113 | } |
| 114 | void Magick::blurImage::operator()( Magick::Image &image_ ) const |
| 115 | { |
| 116 | image_.blur( _radius, _sigma ); |
| 117 | } |
| 118 | |
| 119 | // Border image (add border to image) |
| 120 | Magick::borderImage::borderImage( const Magick::Geometry &geometry_ ) |
| 121 | : _geometry( geometry_ ) |
| 122 | { |
| 123 | } |
| 124 | void Magick::borderImage::operator()( Magick::Image &image_ ) const |
| 125 | { |
| 126 | image_.border( _geometry ); |
| 127 | } |
| 128 | |
| 129 | // Extract channel from image |
| 130 | Magick::channelImage::channelImage( const Magick::ChannelType channel_ ) |
| 131 | : _channel( channel_ ) |
| 132 | { |
| 133 | } |
| 134 | void Magick::channelImage::operator()( Magick::Image &image_ ) const |
| 135 | { |
| 136 | image_.channel( _channel ); |
| 137 | } |
| 138 | |
| 139 | // Charcoal effect image (looks like charcoal sketch) |
| 140 | Magick::charcoalImage::charcoalImage( const double radius_, const double sigma_ ) |
| 141 | : _radius( radius_ ), |
| 142 | _sigma( sigma_ ) |
| 143 | { |
| 144 | } |
| 145 | void Magick::charcoalImage::operator()( Magick::Image &image_ ) const |
| 146 | { |
| 147 | image_.charcoal( _radius, _sigma ); |
| 148 | } |
| 149 | |
| 150 | // Chop image (remove vertical or horizontal subregion of image) |
| 151 | Magick::chopImage::chopImage( const Magick::Geometry &geometry_ ) |
| 152 | : _geometry( geometry_ ) |
| 153 | { |
| 154 | } |
| 155 | void Magick::chopImage::operator()( Magick::Image &image_ ) const |
| 156 | { |
| 157 | image_.chop( _geometry ); |
| 158 | } |
| 159 | |
cristy | b32b90a | 2009-09-07 21:45:48 +0000 | [diff] [blame] | 160 | // accepts a lightweight Color Correction Collection (CCC) file which solely |
| 161 | // contains one or more color corrections and applies the correction to the |
| 162 | // image. |
| 163 | Magick::cdlImage::cdlImage( const std::string &cdl_ ) |
| 164 | : _cdl ( cdl_ ) |
| 165 | { |
| 166 | } |
| 167 | void Magick::cdlImage::operator()( Image &image_ ) const |
| 168 | { |
| 169 | image_.cdl( _cdl.c_str() ); |
| 170 | } |
| 171 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 172 | // Colorize image using pen color at specified percent alpha |
| 173 | Magick::colorizeImage::colorizeImage( const unsigned int alphaRed_, |
| 174 | const unsigned int alphaGreen_, |
| 175 | const unsigned int alphaBlue_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 176 | const Magick::Color &penColor_ ) |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 177 | : _alphaRed ( alphaRed_ ), |
| 178 | _alphaGreen ( alphaGreen_ ), |
| 179 | _alphaBlue ( alphaBlue_ ), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 180 | _penColor( penColor_ ) |
| 181 | { |
| 182 | } |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 183 | Magick::colorizeImage::colorizeImage( const unsigned int alpha_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 184 | const Magick::Color &penColor_ ) |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 185 | : _alphaRed ( alpha_ ), |
| 186 | _alphaGreen ( alpha_ ), |
| 187 | _alphaBlue ( alpha_ ), |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 188 | _penColor( penColor_ ) |
| 189 | { |
| 190 | } |
| 191 | void Magick::colorizeImage::operator()( Magick::Image &image_ ) const |
| 192 | { |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 193 | image_.colorize( _alphaRed, _alphaGreen, _alphaBlue, _penColor ); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 194 | } |
| 195 | |
cristy | 5e959b6 | 2010-04-02 20:59:26 +0000 | [diff] [blame] | 196 | // Apply a color matrix to the image channels. The user supplied |
cristy | c8918bb | 2010-04-03 01:57:27 +0000 | [diff] [blame] | 197 | // matrix may be of order 1 to 5 (1x1 through 5x5). |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 198 | Magick::colorMatrixImage::colorMatrixImage( const size_t order_, |
cristy | c8918bb | 2010-04-03 01:57:27 +0000 | [diff] [blame] | 199 | const double *color_matrix_ ) |
| 200 | : _order( order_ ), |
| 201 | _color_matrix( color_matrix_ ) |
cristy | 5e959b6 | 2010-04-02 20:59:26 +0000 | [diff] [blame] | 202 | { |
| 203 | } |
| 204 | void Magick::colorMatrixImage::operator()( Image &image_ ) const |
| 205 | { |
cristy | c8918bb | 2010-04-03 01:57:27 +0000 | [diff] [blame] | 206 | image_.colorMatrix( _order, _color_matrix ); |
cristy | 5e959b6 | 2010-04-02 20:59:26 +0000 | [diff] [blame] | 207 | } |
| 208 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 209 | // Convert the image colorspace representation |
| 210 | Magick::colorSpaceImage::colorSpaceImage( Magick::ColorspaceType colorSpace_ ) |
| 211 | : _colorSpace( colorSpace_ ) |
| 212 | { |
| 213 | } |
| 214 | void Magick::colorSpaceImage::operator()( Magick::Image &image_ ) const |
| 215 | { |
| 216 | image_.colorSpace( _colorSpace ); |
| 217 | } |
| 218 | |
| 219 | // Comment image (add comment string to image) |
| 220 | Magick::commentImage::commentImage( const std::string &comment_ ) |
| 221 | : _comment( comment_ ) |
| 222 | { |
| 223 | } |
| 224 | void Magick::commentImage::operator()( Magick::Image &image_ ) const |
| 225 | { |
| 226 | image_.comment( _comment ); |
| 227 | } |
| 228 | |
| 229 | // Compose an image onto another at specified offset and using |
| 230 | // specified algorithm |
| 231 | Magick::compositeImage::compositeImage( const Magick::Image &compositeImage_, |
cristy | d99b096 | 2010-05-29 23:14:26 +0000 | [diff] [blame] | 232 | ssize_t xOffset_, |
| 233 | ssize_t yOffset_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 234 | Magick::CompositeOperator compose_ ) |
| 235 | : _compositeImage( compositeImage_ ), |
| 236 | _xOffset ( xOffset_ ), |
| 237 | _yOffset ( yOffset_ ), |
| 238 | _compose ( compose_ ) |
| 239 | { |
| 240 | } |
| 241 | Magick::compositeImage::compositeImage( const Magick::Image &compositeImage_, |
| 242 | const Magick::Geometry &offset_, |
| 243 | Magick::CompositeOperator compose_ ) |
| 244 | : _compositeImage( compositeImage_ ), |
| 245 | _xOffset ( offset_.xOff() ), |
| 246 | _yOffset ( offset_.yOff() ), |
| 247 | _compose ( compose_ ) |
| 248 | { |
| 249 | } |
| 250 | void Magick::compositeImage::operator()( Image &image_ ) const |
| 251 | { |
| 252 | image_.composite( _compositeImage, _xOffset, _yOffset, _compose ); |
| 253 | } |
| 254 | |
| 255 | // Contrast image (enhance intensity differences in image) |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 256 | Magick::contrastImage::contrastImage( const size_t sharpen_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 257 | : _sharpen( sharpen_ ) |
| 258 | { |
| 259 | } |
| 260 | void Magick::contrastImage::operator()( Magick::Image &image_ ) const |
| 261 | { |
| 262 | image_.contrast( _sharpen ); |
| 263 | } |
| 264 | |
| 265 | // Crop image (subregion of original image) |
| 266 | Magick::cropImage::cropImage( const Magick::Geometry &geometry_ ) |
| 267 | : _geometry( geometry_ ) |
| 268 | { |
| 269 | } |
| 270 | void Magick::cropImage::operator()( Magick::Image &image_ ) const |
| 271 | { |
| 272 | image_.crop( _geometry ); |
| 273 | } |
| 274 | |
| 275 | // Cycle image colormap |
cristy | d99b096 | 2010-05-29 23:14:26 +0000 | [diff] [blame] | 276 | Magick::cycleColormapImage::cycleColormapImage( const ssize_t amount_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 277 | : _amount( amount_ ) |
| 278 | { |
| 279 | } |
| 280 | void Magick::cycleColormapImage::operator()( Magick::Image &image_ ) const |
| 281 | { |
| 282 | image_.cycleColormap( _amount ); |
| 283 | } |
| 284 | |
| 285 | // Despeckle image (reduce speckle noise) |
| 286 | Magick::despeckleImage::despeckleImage( void ) |
| 287 | { |
| 288 | } |
| 289 | void Magick::despeckleImage::operator()( Magick::Image &image_ ) const |
| 290 | { |
| 291 | image_.despeckle( ); |
| 292 | } |
| 293 | |
cristy | b32b90a | 2009-09-07 21:45:48 +0000 | [diff] [blame] | 294 | // Distort image. distorts an image using various distortion methods, by |
| 295 | // mapping color lookups of the source image to a new destination image |
| 296 | // usally of the same size as the source image, unless 'bestfit' is set to |
| 297 | // true. |
| 298 | Magick::distortImage::distortImage( const Magick::DistortImageMethod method_, |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 299 | const size_t number_arguments_, |
cristy | b32b90a | 2009-09-07 21:45:48 +0000 | [diff] [blame] | 300 | const double *arguments_, |
| 301 | const bool bestfit_ ) |
| 302 | : _method ( method_ ), |
| 303 | _number_arguments ( number_arguments_ ), |
| 304 | _arguments ( arguments_ ), |
| 305 | _bestfit( bestfit_ ) |
| 306 | { |
| 307 | } |
| 308 | Magick::distortImage::distortImage( const Magick::DistortImageMethod method_, |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 309 | const size_t number_arguments_, |
cristy | b32b90a | 2009-09-07 21:45:48 +0000 | [diff] [blame] | 310 | const double *arguments_ ) |
| 311 | : _method ( method_ ), |
| 312 | _number_arguments ( number_arguments_ ), |
| 313 | _arguments ( arguments_ ), |
| 314 | _bestfit( false ) |
| 315 | { |
| 316 | } |
| 317 | void Magick::distortImage::operator()( Magick::Image &image_ ) const |
| 318 | { |
| 319 | image_.distort( _method, _number_arguments, _arguments, _bestfit ); |
| 320 | } |
| 321 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 322 | // Draw on image |
| 323 | Magick::drawImage::drawImage( const Magick::Drawable &drawable_ ) |
| 324 | : _drawableList() |
| 325 | { |
| 326 | _drawableList.push_back( drawable_ ); |
| 327 | } |
| 328 | Magick::drawImage::drawImage( const std::list<Magick::Drawable> &drawable_ ) |
| 329 | : _drawableList( drawable_ ) |
| 330 | { |
| 331 | } |
| 332 | void Magick::drawImage::operator()( Magick::Image &image_ ) const |
| 333 | { |
| 334 | image_.draw( _drawableList ); |
| 335 | } |
| 336 | |
| 337 | // Edge image (hilight edges in image) |
| 338 | Magick::edgeImage::edgeImage( const double radius_ ) |
| 339 | : _radius( radius_ ) |
| 340 | { |
| 341 | } |
| 342 | void Magick::edgeImage::operator()( Magick::Image &image_ ) const |
| 343 | { |
| 344 | image_.edge( _radius ); |
| 345 | } |
| 346 | |
| 347 | // Emboss image (hilight edges with 3D effect) |
| 348 | Magick::embossImage::embossImage( void ) |
| 349 | : _radius( 1 ), |
| 350 | _sigma( 0.5 ) |
| 351 | { |
| 352 | } |
| 353 | Magick::embossImage::embossImage( const double radius_, const double sigma_ ) |
| 354 | : _radius( radius_ ), |
| 355 | _sigma( sigma_ ) |
| 356 | { |
| 357 | } |
| 358 | void Magick::embossImage::operator()( Magick::Image &image_ ) const |
| 359 | { |
| 360 | image_.emboss( _radius, _sigma ); |
| 361 | } |
| 362 | |
| 363 | // Enhance image (minimize noise) |
| 364 | Magick::enhanceImage::enhanceImage( void ) |
| 365 | { |
| 366 | } |
| 367 | void Magick::enhanceImage::operator()( Magick::Image &image_ ) const |
| 368 | { |
| 369 | image_.enhance( ); |
| 370 | } |
| 371 | |
| 372 | // Equalize image (histogram equalization) |
| 373 | Magick::equalizeImage::equalizeImage( void ) |
| 374 | { |
| 375 | } |
| 376 | void Magick::equalizeImage::operator()( Magick::Image &image_ ) const |
| 377 | { |
| 378 | image_.equalize( ); |
| 379 | } |
| 380 | |
| 381 | // Color to use when filling drawn objects |
| 382 | Magick::fillColorImage::fillColorImage( const Magick::Color &fillColor_ ) |
| 383 | : _fillColor( fillColor_ ) |
| 384 | { |
| 385 | } |
| 386 | void Magick::fillColorImage::operator()( Magick::Image &image_ ) const |
| 387 | { |
| 388 | image_.fillColor( _fillColor ); |
| 389 | } |
| 390 | |
| 391 | // Flip image (reflect each scanline in the vertical direction) |
| 392 | Magick::flipImage::flipImage( void ) |
| 393 | { |
| 394 | } |
| 395 | void Magick::flipImage::operator()( Magick::Image &image_ ) const |
| 396 | { |
| 397 | image_.flip( ); |
| 398 | } |
| 399 | |
| 400 | // Flood-fill image with color |
| 401 | // Flood-fill color across pixels starting at target-pixel and |
| 402 | // stopping at pixels matching specified border color. Uses current |
| 403 | // fuzz setting when determining color match. |
cristy | 4e0eef0 | 2010-05-30 21:52:21 +0000 | [diff] [blame] | 404 | Magick::floodFillColorImage::floodFillColorImage( const ssize_t x_, |
| 405 | const ssize_t y_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 406 | const Magick::Color &fillColor_ ) |
| 407 | : _x(x_), |
| 408 | _y(y_), |
| 409 | _fillColor(fillColor_), |
| 410 | _borderColor() |
| 411 | { |
| 412 | } |
| 413 | Magick::floodFillColorImage::floodFillColorImage( const Magick::Geometry &point_, |
| 414 | const Magick::Color &fillColor_ ) |
| 415 | : _x(point_.xOff()), |
| 416 | _y(point_.yOff()), |
| 417 | _fillColor(fillColor_), |
| 418 | _borderColor() |
| 419 | { |
| 420 | } |
| 421 | // Flood-fill color across pixels starting at target-pixel and |
| 422 | // stopping at pixels matching specified border color. Uses current |
| 423 | // fuzz setting when determining color match. |
cristy | 4e0eef0 | 2010-05-30 21:52:21 +0000 | [diff] [blame] | 424 | Magick::floodFillColorImage::floodFillColorImage( const ssize_t x_, |
| 425 | const ssize_t y_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 426 | const Magick::Color &fillColor_, |
| 427 | const Magick::Color &borderColor_ ) |
| 428 | : _x(x_), |
| 429 | _y(y_), |
| 430 | _fillColor(fillColor_), |
| 431 | _borderColor(borderColor_) |
| 432 | { |
| 433 | } |
| 434 | Magick::floodFillColorImage::floodFillColorImage( const Geometry &point_, |
| 435 | const Color &fillColor_, |
| 436 | const Color &borderColor_ ) |
| 437 | : _x(point_.xOff()), |
| 438 | _y(point_.yOff()), |
| 439 | _fillColor(fillColor_), |
| 440 | _borderColor(borderColor_) |
| 441 | { |
| 442 | } |
| 443 | void Magick::floodFillColorImage::operator()( Magick::Image &image_ ) const |
| 444 | { |
| 445 | if ( _borderColor.isValid() ) |
| 446 | { |
| 447 | image_.floodFillColor( _x, _y, _fillColor, _borderColor ); |
| 448 | } |
| 449 | else |
| 450 | { |
| 451 | image_.floodFillColor( _x, _y, _fillColor ); |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | // Flood-fill image with texture |
| 456 | |
| 457 | // Flood-fill texture across pixels that match the color of the target |
| 458 | // pixel and are neighbors of the target pixel. Uses current fuzz |
| 459 | // setting when determining color match. |
cristy | 4e0eef0 | 2010-05-30 21:52:21 +0000 | [diff] [blame] | 460 | Magick::floodFillTextureImage::floodFillTextureImage( const ssize_t x_, |
| 461 | const ssize_t y_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 462 | const Magick::Image &texture_ ) |
| 463 | : _x(x_), |
| 464 | _y(y_), |
| 465 | _texture(texture_), |
| 466 | _borderColor() |
| 467 | { |
| 468 | } |
| 469 | Magick::floodFillTextureImage::floodFillTextureImage( const Magick::Geometry &point_, |
| 470 | const Magick::Image &texture_ ) |
| 471 | : _x(point_.xOff()), |
| 472 | _y(point_.yOff()), |
| 473 | _texture(texture_), |
| 474 | _borderColor() |
| 475 | { |
| 476 | } |
| 477 | // Flood-fill texture across pixels starting at target-pixel and |
| 478 | // stopping at pixels matching specified border color. Uses current |
| 479 | // fuzz setting when determining color match. |
cristy | 4e0eef0 | 2010-05-30 21:52:21 +0000 | [diff] [blame] | 480 | Magick::floodFillTextureImage::floodFillTextureImage( const ssize_t x_, |
| 481 | const ssize_t y_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 482 | const Magick::Image &texture_, |
| 483 | const Magick::Color &borderColor_ ) |
| 484 | : _x(x_), |
| 485 | _y(y_), |
| 486 | _texture(texture_), |
| 487 | _borderColor(borderColor_) |
| 488 | { |
| 489 | } |
| 490 | Magick::floodFillTextureImage::floodFillTextureImage( const Magick::Geometry &point_, |
| 491 | const Magick::Image &texture_, |
| 492 | const Magick::Color &borderColor_ ) |
| 493 | : _x(point_.xOff()), |
| 494 | _y(point_.yOff()), |
| 495 | _texture(texture_), |
| 496 | _borderColor(borderColor_) |
| 497 | { |
| 498 | } |
| 499 | void Magick::floodFillTextureImage::operator()( Magick::Image &image_ ) const |
| 500 | { |
| 501 | if ( _borderColor.isValid() ) |
| 502 | { |
| 503 | image_.floodFillTexture( _x, _y, _texture, _borderColor ); |
| 504 | } |
| 505 | else |
| 506 | { |
| 507 | image_.floodFillTexture( _x, _y, _texture ); |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | // Flop image (reflect each scanline in the horizontal direction) |
| 512 | Magick::flopImage::flopImage( void ) |
| 513 | { |
| 514 | } |
| 515 | void Magick::flopImage::operator()( Magick::Image &image_ ) const |
| 516 | { |
| 517 | image_.flop( ); |
| 518 | } |
| 519 | |
| 520 | // Frame image |
| 521 | Magick::frameImage::frameImage( const Magick::Geometry &geometry_ ) |
| 522 | : _width( geometry_.width() ), |
| 523 | _height( geometry_.height() ), |
| 524 | _outerBevel( geometry_.xOff() ), |
| 525 | _innerBevel( geometry_.yOff() ) |
| 526 | { |
| 527 | } |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 528 | Magick::frameImage::frameImage( const size_t width_, const size_t height_, |
cristy | d99b096 | 2010-05-29 23:14:26 +0000 | [diff] [blame] | 529 | const ssize_t innerBevel_, const ssize_t outerBevel_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 530 | : _width( width_ ), |
| 531 | _height( height_ ), |
| 532 | _outerBevel( outerBevel_ ), |
| 533 | _innerBevel( innerBevel_ ) |
| 534 | { |
| 535 | } |
| 536 | void Magick::frameImage::operator()( Magick::Image &image_ ) const |
| 537 | { |
| 538 | image_.frame( _width, _height, _innerBevel, _outerBevel ); |
| 539 | } |
| 540 | |
| 541 | // Gamma correct image |
| 542 | Magick::gammaImage::gammaImage( const double gamma_ ) |
| 543 | : _gammaRed( gamma_ ), |
| 544 | _gammaGreen( gamma_ ), |
| 545 | _gammaBlue( gamma_ ) |
| 546 | { |
| 547 | } |
| 548 | Magick::gammaImage::gammaImage ( const double gammaRed_, |
| 549 | const double gammaGreen_, |
| 550 | const double gammaBlue_ ) |
| 551 | : _gammaRed( gammaRed_ ), |
| 552 | _gammaGreen( gammaGreen_ ), |
| 553 | _gammaBlue( gammaBlue_ ) |
| 554 | { |
| 555 | } |
| 556 | void Magick::gammaImage::operator()( Magick::Image &image_ ) const |
| 557 | { |
| 558 | image_.gamma( _gammaRed, _gammaGreen, _gammaBlue ); |
| 559 | } |
| 560 | |
| 561 | // Gaussian blur image |
| 562 | // The number of neighbor pixels to be included in the convolution |
| 563 | // mask is specified by 'width_'. The standard deviation of the |
| 564 | // gaussian bell curve is specified by 'sigma_'. |
| 565 | Magick::gaussianBlurImage::gaussianBlurImage( const double width_, |
| 566 | const double sigma_ ) |
| 567 | : _width( width_ ), |
| 568 | _sigma( sigma_ ) |
| 569 | { |
| 570 | } |
| 571 | void Magick::gaussianBlurImage::operator()( Magick::Image &image_ ) const |
| 572 | { |
| 573 | image_.gaussianBlur( _width, _sigma ); |
| 574 | } |
| 575 | |
cristy | b32b90a | 2009-09-07 21:45:48 +0000 | [diff] [blame] | 576 | // Apply a color lookup table (Hald CLUT) to the image. |
| 577 | Magick::haldClutImage::haldClutImage( const Image &haldClutImage_ ) |
| 578 | : _haldClutImage ( haldClutImage_ ) |
| 579 | { |
| 580 | } |
| 581 | void Magick::haldClutImage::operator()( Image &image_ ) const |
| 582 | { |
| 583 | image_.haldClut( _haldClutImage ); |
| 584 | } |
| 585 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 586 | // Implode image (special effect) |
| 587 | Magick::implodeImage::implodeImage( const double factor_ ) |
| 588 | : _factor( factor_ ) |
| 589 | { |
| 590 | } |
| 591 | void Magick::implodeImage::operator()( Magick::Image &image_ ) const |
| 592 | { |
| 593 | image_.implode( _factor ); |
| 594 | } |
| 595 | |
cristy | 529fcc2 | 2009-11-14 18:15:08 +0000 | [diff] [blame] | 596 | // Implements the inverse discrete Fourier transform (IFT) of the image |
| 597 | // either as a magnitude / phase or real / imaginary image pair. |
| 598 | Magick::inverseFourierTransformImage::inverseFourierTransformImage( const Magick::Image &phaseImage_ ) |
| 599 | : _phaseImage( phaseImage_ ) |
| 600 | { |
| 601 | } |
| 602 | void Magick::inverseFourierTransformImage::operator()( Magick::Image &image_ ) const |
| 603 | { |
| 604 | image_.inverseFourierTransform( _phaseImage ); |
| 605 | } |
| 606 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 607 | // Set image validity. Valid images become empty (inValid) if argument |
| 608 | // is false. |
| 609 | Magick::isValidImage::isValidImage( const bool isValid_ ) |
| 610 | : _isValid( isValid_ ) |
| 611 | { |
| 612 | } |
| 613 | void Magick::isValidImage::operator()( Magick::Image &image_ ) const |
| 614 | { |
| 615 | image_.isValid( _isValid ); |
| 616 | } |
| 617 | |
| 618 | // Label image |
| 619 | Magick::labelImage::labelImage( const std::string &label_ ) |
| 620 | : _label( label_ ) |
| 621 | { |
| 622 | } |
| 623 | void Magick::labelImage::operator()( Magick::Image &image_ ) const |
| 624 | { |
| 625 | image_.label( _label ); |
| 626 | } |
| 627 | |
| 628 | // Level image |
| 629 | Magick::levelImage::levelImage( const double black_point, |
| 630 | const double white_point, |
| 631 | const double mid_point ) |
| 632 | : _black_point(black_point), |
| 633 | _white_point(white_point), |
| 634 | _mid_point(mid_point) |
| 635 | { |
| 636 | } |
| 637 | void Magick::levelImage::operator()( Magick::Image &image_ ) const |
| 638 | { |
| 639 | image_.level( _black_point, _white_point, _mid_point ); |
| 640 | } |
| 641 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 642 | // Magnify image by integral size |
| 643 | Magick::magnifyImage::magnifyImage( void ) |
| 644 | { |
| 645 | } |
| 646 | void Magick::magnifyImage::operator()( Magick::Image &image_ ) const |
| 647 | { |
| 648 | image_.magnify( ); |
| 649 | } |
| 650 | |
| 651 | // Remap image colors with closest color from reference image |
| 652 | Magick::mapImage::mapImage( const Magick::Image &mapImage_ , |
| 653 | const bool dither_ ) |
| 654 | : _mapImage( mapImage_ ), |
| 655 | _dither( dither_ ) |
| 656 | { |
| 657 | } |
| 658 | void Magick::mapImage::operator()( Magick::Image &image_ ) const |
| 659 | { |
| 660 | image_.map( _mapImage, _dither ); |
| 661 | } |
| 662 | |
| 663 | // Floodfill designated area with a matte value |
| 664 | Magick::matteFloodfillImage::matteFloodfillImage( const Color &target_ , |
cristy | 4d63032 | 2010-06-03 18:52:04 +0000 | [diff] [blame] | 665 | const unsigned int matte_, |
cristy | d99b096 | 2010-05-29 23:14:26 +0000 | [diff] [blame] | 666 | const ssize_t x_, const ssize_t y_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 667 | const PaintMethod method_ ) |
| 668 | : _target( target_ ), |
| 669 | _matte( matte_ ), |
| 670 | _x( x_ ), |
| 671 | _y( y_ ), |
| 672 | _method( method_ ) |
| 673 | { |
| 674 | } |
| 675 | void Magick::matteFloodfillImage::operator()( Magick::Image &image_ ) const |
| 676 | { |
| 677 | image_.matteFloodfill( _target, _matte, _x, _y, _method ); |
| 678 | } |
| 679 | |
| 680 | // Filter image by replacing each pixel component with the median |
| 681 | // color in a circular neighborhood |
cristy | 5e6be1e | 2011-07-16 01:23:39 +0000 | [diff] [blame^] | 682 | Magick::medianConvolveImage::medianConvolveImage( const double radius_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 683 | : _radius( radius_ ) |
| 684 | { |
| 685 | } |
cristy | 5e6be1e | 2011-07-16 01:23:39 +0000 | [diff] [blame^] | 686 | void Magick::medianConvolveImage::operator()( Magick::Image &image_ ) const |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 687 | { |
| 688 | image_.medianFilter( _radius ); |
| 689 | } |
| 690 | |
| 691 | // Reduce image by integral size |
| 692 | Magick::minifyImage::minifyImage( void ) |
| 693 | { |
| 694 | } |
| 695 | void Magick::minifyImage::operator()( Magick::Image &image_ ) const |
| 696 | { |
| 697 | image_.minify( ); |
| 698 | } |
| 699 | |
| 700 | // Modulate percent hue, saturation, and brightness of an image |
| 701 | Magick::modulateImage::modulateImage( const double brightness_, |
| 702 | const double saturation_, |
| 703 | const double hue_ ) |
| 704 | : _brightness( brightness_ ), |
| 705 | _saturation( saturation_ ), |
| 706 | _hue( hue_ ) |
| 707 | { |
| 708 | } |
| 709 | void Magick::modulateImage::operator()( Magick::Image &image_ ) const |
| 710 | { |
| 711 | image_.modulate( _brightness, _saturation, _hue ); |
| 712 | } |
| 713 | |
| 714 | // Negate colors in image. Set grayscale to only negate grayscale |
| 715 | // values in image. |
| 716 | Magick::negateImage::negateImage( const bool grayscale_ ) |
| 717 | : _grayscale( grayscale_ ) |
| 718 | { |
| 719 | } |
| 720 | void Magick::negateImage::operator()( Magick::Image &image_ ) const |
| 721 | { |
| 722 | image_.negate( _grayscale ); |
| 723 | } |
| 724 | |
| 725 | // Normalize image (increase contrast by normalizing the pixel values |
| 726 | // to span the full range of color values) |
| 727 | Magick::normalizeImage::normalizeImage( void ) |
| 728 | { |
| 729 | } |
| 730 | void Magick::normalizeImage::operator()( Magick::Image &image_ ) const |
| 731 | { |
| 732 | image_.normalize( ); |
| 733 | } |
| 734 | |
| 735 | // Oilpaint image (image looks like oil painting) |
| 736 | Magick::oilPaintImage::oilPaintImage( const double radius_ ) |
| 737 | : _radius( radius_ ) |
| 738 | { |
| 739 | } |
| 740 | void Magick::oilPaintImage::operator()( Magick::Image &image_ ) const |
| 741 | { |
| 742 | image_.oilPaint( _radius ); |
| 743 | } |
| 744 | |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 745 | // Set or attenuate the image alpha channel. If the image pixels are |
| 746 | // opaque then they are set to the specified alpha value, otherwise |
| 747 | // they are blended with the supplied alpha value. The value of |
| 748 | // alpha_ ranges from 0 (completely opaque) to QuantumRange. The defines |
| 749 | // OpaqueAlpha and TransparentAlpha are available to specify |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 750 | // completely opaque or completely transparent, respectively. |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 751 | Magick::alphaImage::alphaImage( const unsigned int alpha_ ) |
| 752 | : _alpha( alpha_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 753 | { |
| 754 | } |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 755 | void Magick::alphaImage::operator()( Magick::Image &image_ ) const |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 756 | { |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 757 | image_.alpha( _alpha ); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 758 | } |
| 759 | |
| 760 | // Change color of opaque pixel to specified pen color. |
| 761 | Magick::opaqueImage::opaqueImage( const Magick::Color &opaqueColor_, |
| 762 | const Magick::Color &penColor_ ) |
| 763 | : _opaqueColor( opaqueColor_ ), |
| 764 | _penColor( penColor_ ) |
| 765 | { |
| 766 | } |
| 767 | void Magick::opaqueImage::operator()( Magick::Image &image_ ) const |
| 768 | { |
| 769 | image_.opaque( _opaqueColor, _penColor ); |
| 770 | } |
| 771 | |
| 772 | // Quantize image (reduce number of colors) |
| 773 | Magick::quantizeImage::quantizeImage( const bool measureError_ ) |
| 774 | : _measureError( measureError_ ) |
| 775 | { |
| 776 | } |
| 777 | void Magick::quantizeImage::operator()( Image &image_ ) const |
| 778 | { |
| 779 | image_.quantize( _measureError ); |
| 780 | } |
| 781 | |
| 782 | // Raise image (lighten or darken the edges of an image to give a 3-D |
| 783 | // raised or lowered effect) |
| 784 | Magick::raiseImage::raiseImage( const Magick::Geometry &geometry_ , |
| 785 | const bool raisedFlag_ ) |
| 786 | : _geometry( geometry_ ), |
| 787 | _raisedFlag( raisedFlag_ ) |
| 788 | { |
| 789 | } |
| 790 | void Magick::raiseImage::operator()( Magick::Image &image_ ) const |
| 791 | { |
| 792 | image_.raise( _geometry, _raisedFlag ); |
| 793 | } |
| 794 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 795 | // Reduce noise in image using a noise peak elimination filter |
| 796 | Magick::reduceNoiseImage::reduceNoiseImage( void ) |
| 797 | : _order(3) |
| 798 | { |
| 799 | } |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 800 | Magick::reduceNoiseImage::reduceNoiseImage ( const size_t order_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 801 | : _order(order_) |
| 802 | { |
| 803 | } |
| 804 | void Magick::reduceNoiseImage::operator()( Image &image_ ) const |
| 805 | { |
| 806 | image_.reduceNoise( _order ); |
| 807 | } |
| 808 | |
| 809 | // Roll image (rolls image vertically and horizontally) by specified |
| 810 | // number of columnms and rows) |
| 811 | Magick::rollImage::rollImage( const Magick::Geometry &roll_ ) |
| 812 | : _columns( roll_.width() ), |
| 813 | _rows( roll_.height() ) |
| 814 | { |
| 815 | } |
cristy | d99b096 | 2010-05-29 23:14:26 +0000 | [diff] [blame] | 816 | Magick::rollImage::rollImage( const ssize_t columns_, |
| 817 | const ssize_t rows_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 818 | : _columns( columns_ ), |
| 819 | _rows( rows_ ) |
| 820 | { |
| 821 | } |
| 822 | void Magick::rollImage::operator()( Magick::Image &image_ ) const |
| 823 | { |
| 824 | image_.roll( _columns, _rows ); |
| 825 | } |
| 826 | |
| 827 | // Rotate image counter-clockwise by specified number of degrees. |
| 828 | Magick::rotateImage::rotateImage( const double degrees_ ) |
| 829 | : _degrees( degrees_ ) |
| 830 | { |
| 831 | } |
| 832 | void Magick::rotateImage::operator()( Magick::Image &image_ ) const |
| 833 | { |
| 834 | image_.rotate( _degrees ); |
| 835 | } |
| 836 | |
| 837 | // Resize image by using pixel sampling algorithm |
| 838 | Magick::sampleImage::sampleImage( const Magick::Geometry &geometry_ ) |
| 839 | : _geometry( geometry_ ) |
| 840 | { |
| 841 | } |
| 842 | void Magick::sampleImage::operator()( Magick::Image &image_ ) const |
| 843 | { |
| 844 | image_.sample( _geometry ); |
| 845 | } |
| 846 | |
| 847 | // Resize image by using simple ratio algorithm |
| 848 | Magick::scaleImage::scaleImage( const Magick::Geometry &geometry_ ) |
| 849 | : _geometry( geometry_ ) |
| 850 | { |
| 851 | } |
| 852 | void Magick::scaleImage::operator()( Magick::Image &image_ ) const |
| 853 | { |
| 854 | image_.scale( _geometry ); |
| 855 | } |
| 856 | |
| 857 | // Segment (coalesce similar image components) by analyzing the |
| 858 | // histograms of the color components and identifying units that are |
| 859 | // homogeneous with the fuzzy c-means technique. Also uses |
| 860 | // QuantizeColorSpace and Verbose image attributes |
| 861 | Magick::segmentImage::segmentImage( const double clusterThreshold_ , |
| 862 | const double smoothingThreshold_ ) |
| 863 | : _clusterThreshold( clusterThreshold_ ), |
| 864 | _smoothingThreshold( smoothingThreshold_ ) |
| 865 | { |
| 866 | } |
| 867 | void Magick::segmentImage::operator()( Magick::Image &image_ ) const |
| 868 | { |
| 869 | image_.segment( _clusterThreshold, _smoothingThreshold ); |
| 870 | } |
| 871 | |
| 872 | // Shade image using distant light source |
cristy | a0242ab | 2009-10-15 19:17:14 +0000 | [diff] [blame] | 873 | Magick::shadeImage::shadeImage( const double azimuth_, |
| 874 | const double elevation_, |
| 875 | const bool colorShading_) |
| 876 | : _azimuth( azimuth_ ), |
| 877 | _elevation( elevation_ ), |
| 878 | _colorShading (colorShading_) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 879 | { |
| 880 | } |
| 881 | void Magick::shadeImage::operator()( Magick::Image &image_ ) const |
| 882 | { |
cristy | c8dd3c8 | 2009-10-15 19:40:55 +0000 | [diff] [blame] | 883 | image_.shade( _azimuth, _elevation, _colorShading ); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 884 | } |
| 885 | |
| 886 | // Sharpen pixels in image |
| 887 | Magick::sharpenImage::sharpenImage( const double radius_, const double sigma_ ) |
| 888 | : _radius( radius_ ), |
| 889 | _sigma( sigma_ ) |
| 890 | { |
| 891 | } |
| 892 | void Magick::sharpenImage::operator()( Magick::Image &image_ ) const |
| 893 | { |
| 894 | image_.sharpen( _radius, _sigma ); |
| 895 | } |
| 896 | |
| 897 | // Shave pixels from image edges. |
| 898 | Magick::shaveImage::shaveImage( const Magick::Geometry &geometry_ ) |
| 899 | : _geometry( geometry_ ) |
| 900 | { |
| 901 | } |
| 902 | void Magick::shaveImage::operator()( Magick::Image &image_ ) const |
| 903 | { |
| 904 | image_.shave( _geometry ); |
| 905 | } |
| 906 | |
| 907 | // Shear image (create parallelogram by sliding image by X or Y axis) |
| 908 | Magick::shearImage::shearImage( const double xShearAngle_, |
| 909 | const double yShearAngle_ ) |
| 910 | : _xShearAngle( xShearAngle_ ), |
| 911 | _yShearAngle( yShearAngle_ ) |
| 912 | { |
| 913 | } |
| 914 | void Magick::shearImage::operator()( Magick::Image &image_ ) const |
| 915 | { |
| 916 | image_.shear( _xShearAngle, _yShearAngle ); |
| 917 | } |
| 918 | |
| 919 | // Solarize image (similar to effect seen when exposing a photographic |
| 920 | // film to light during the development process) |
| 921 | Magick::solarizeImage::solarizeImage( const double factor_ ) |
| 922 | : _factor( factor_ ) |
| 923 | { |
| 924 | } |
| 925 | void Magick::solarizeImage::operator()( Magick::Image &image_ ) const |
| 926 | { |
| 927 | image_.solarize( _factor ); |
| 928 | } |
| 929 | |
| 930 | // Spread pixels randomly within image by specified ammount |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 931 | Magick::spreadImage::spreadImage( const size_t amount_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 932 | : _amount( amount_ ) |
| 933 | { |
| 934 | } |
| 935 | void Magick::spreadImage::operator()( Magick::Image &image_ ) const |
| 936 | { |
| 937 | image_.spread( _amount ); |
| 938 | } |
| 939 | |
| 940 | // Add a digital watermark to the image (based on second image) |
| 941 | Magick::steganoImage::steganoImage( const Magick::Image &waterMark_ ) |
| 942 | : _waterMark( waterMark_ ) |
| 943 | { |
| 944 | } |
| 945 | void Magick::steganoImage::operator()( Magick::Image &image_ ) const |
| 946 | { |
| 947 | image_.stegano( _waterMark ); |
| 948 | } |
| 949 | |
| 950 | // Create an image which appears in stereo when viewed with red-blue |
| 951 | // glasses (Red image on left, blue on right) |
| 952 | Magick::stereoImage::stereoImage( const Magick::Image &rightImage_ ) |
| 953 | : _rightImage( rightImage_ ) |
| 954 | { |
| 955 | } |
| 956 | void Magick::stereoImage::operator()( Magick::Image &image_ ) const |
| 957 | { |
| 958 | image_.stereo( _rightImage ); |
| 959 | } |
| 960 | |
| 961 | // Color to use when drawing object outlines |
| 962 | Magick::strokeColorImage::strokeColorImage( const Magick::Color &strokeColor_ ) |
| 963 | : _strokeColor( strokeColor_ ) |
| 964 | { |
| 965 | } |
| 966 | void Magick::strokeColorImage::operator()( Magick::Image &image_ ) const |
| 967 | { |
| 968 | image_.strokeColor( _strokeColor ); |
| 969 | } |
| 970 | |
| 971 | // Swirl image (image pixels are rotated by degrees) |
| 972 | Magick::swirlImage::swirlImage( const double degrees_ ) |
| 973 | : _degrees( degrees_ ) |
| 974 | { |
| 975 | } |
| 976 | void Magick::swirlImage::operator()( Magick::Image &image_ ) const |
| 977 | { |
| 978 | image_.swirl( _degrees ); |
| 979 | } |
| 980 | |
| 981 | // Channel a texture on image background |
| 982 | Magick::textureImage::textureImage( const Magick::Image &texture_ ) |
| 983 | : _texture( texture_ ) |
| 984 | { |
| 985 | } |
| 986 | void Magick::textureImage::operator()( Magick::Image &image_ ) const |
| 987 | { |
| 988 | image_.texture( _texture ); |
| 989 | } |
| 990 | |
| 991 | // Threshold image |
| 992 | Magick::thresholdImage::thresholdImage( const double threshold_ ) |
| 993 | : _threshold( threshold_ ) |
| 994 | { |
| 995 | } |
| 996 | void Magick::thresholdImage::operator()( Magick::Image &image_ ) const |
| 997 | { |
| 998 | image_.threshold( _threshold ); |
| 999 | } |
| 1000 | |
| 1001 | // Transform image based on image and crop geometries |
| 1002 | Magick::transformImage::transformImage( const Magick::Geometry &imageGeometry_ ) |
| 1003 | : _imageGeometry( imageGeometry_ ), |
| 1004 | _cropGeometry( ) |
| 1005 | { |
| 1006 | } |
| 1007 | Magick::transformImage::transformImage( const Magick::Geometry &imageGeometry_, |
| 1008 | const Geometry &cropGeometry_ ) |
| 1009 | : _imageGeometry( imageGeometry_ ), |
| 1010 | _cropGeometry( cropGeometry_ ) |
| 1011 | { |
| 1012 | } |
| 1013 | void Magick::transformImage::operator()( Magick::Image &image_ ) const |
| 1014 | { |
| 1015 | if ( _cropGeometry.isValid() ) |
| 1016 | image_.transform( _imageGeometry, _cropGeometry ); |
| 1017 | else |
| 1018 | image_.transform( _imageGeometry ); |
| 1019 | } |
| 1020 | |
| 1021 | // Set image color to transparent |
| 1022 | Magick::transparentImage::transparentImage( const Magick::Color& color_ ) |
| 1023 | : _color( color_ ) |
| 1024 | { |
| 1025 | } |
| 1026 | void Magick::transparentImage::operator()( Magick::Image &image_ ) const |
| 1027 | { |
| 1028 | image_.transparent( _color ); |
| 1029 | } |
| 1030 | |
| 1031 | // Trim edges that are the background color from the image |
| 1032 | Magick::trimImage::trimImage( void ) |
| 1033 | { |
| 1034 | } |
| 1035 | void Magick::trimImage::operator()( Magick::Image &image_ ) const |
| 1036 | { |
| 1037 | image_.trim( ); |
| 1038 | } |
| 1039 | |
| 1040 | // Map image pixels to a sine wave |
| 1041 | Magick::waveImage::waveImage( const double amplitude_, |
| 1042 | const double wavelength_ ) |
| 1043 | : _amplitude( amplitude_ ), |
| 1044 | _wavelength( wavelength_ ) |
| 1045 | { |
| 1046 | } |
| 1047 | void Magick::waveImage::operator()( Magick::Image &image_ ) const |
| 1048 | { |
| 1049 | image_.wave( _amplitude, _wavelength ); |
| 1050 | } |
| 1051 | |
| 1052 | // resize image to specified size. |
| 1053 | Magick::resizeImage::resizeImage( const Magick::Geometry &geometry_ ) |
| 1054 | : _geometry( geometry_ ) |
| 1055 | { |
| 1056 | } |
| 1057 | void Magick::resizeImage::operator()( Magick::Image &image_ ) const |
| 1058 | { |
| 1059 | image_.resize( _geometry ); |
| 1060 | } |
| 1061 | |
| 1062 | // Zoom image to specified size. |
| 1063 | Magick::zoomImage::zoomImage( const Magick::Geometry &geometry_ ) |
| 1064 | : _geometry( geometry_ ) |
| 1065 | { |
| 1066 | } |
| 1067 | void Magick::zoomImage::operator()( Magick::Image &image_ ) const |
| 1068 | { |
| 1069 | image_.zoom( _geometry ); |
| 1070 | } |
| 1071 | |
| 1072 | // |
| 1073 | // Function object image attribute accessors |
| 1074 | // |
| 1075 | |
| 1076 | // Anti-alias Postscript and TrueType fonts (default true) |
| 1077 | Magick::antiAliasImage::antiAliasImage( const bool flag_ ) |
| 1078 | : _flag( flag_ ) |
| 1079 | { |
| 1080 | } |
| 1081 | void Magick::antiAliasImage::operator()( Magick::Image &image_ ) const |
| 1082 | { |
| 1083 | image_.antiAlias( _flag ); |
| 1084 | } |
| 1085 | |
| 1086 | // Join images into a single multi-image file |
| 1087 | Magick::adjoinImage::adjoinImage( const bool flag_ ) |
| 1088 | : _flag( flag_ ) |
| 1089 | { |
| 1090 | } |
| 1091 | void Magick::adjoinImage::operator()( Magick::Image &image_ ) const |
| 1092 | { |
| 1093 | image_.adjoin( _flag ); |
| 1094 | } |
| 1095 | |
| 1096 | // Time in 1/100ths of a second which must expire before displaying |
| 1097 | // the next image in an animated sequence. |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1098 | Magick::animationDelayImage::animationDelayImage( const size_t delay_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1099 | : _delay( delay_ ) |
| 1100 | { |
| 1101 | } |
| 1102 | void Magick::animationDelayImage::operator()( Magick::Image &image_ ) const |
| 1103 | { |
| 1104 | image_.animationDelay( _delay ); |
| 1105 | } |
| 1106 | |
| 1107 | // Number of iterations to loop an animation (e.g. Netscape loop |
| 1108 | // extension) for. |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1109 | Magick::animationIterationsImage::animationIterationsImage( const size_t iterations_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1110 | : _iterations( iterations_ ) |
| 1111 | { |
| 1112 | } |
| 1113 | void Magick::animationIterationsImage::operator()( Magick::Image &image_ ) const |
| 1114 | { |
| 1115 | image_.animationIterations( _iterations ); |
| 1116 | } |
| 1117 | |
| 1118 | // Image background color |
| 1119 | Magick::backgroundColorImage::backgroundColorImage( const Magick::Color &color_ ) |
| 1120 | : _color( color_ ) |
| 1121 | { |
| 1122 | } |
| 1123 | void Magick::backgroundColorImage::operator()( Magick::Image &image_ ) const |
| 1124 | { |
| 1125 | image_.backgroundColor( _color ); |
| 1126 | } |
| 1127 | |
| 1128 | // Name of texture image to tile onto the image background |
| 1129 | Magick::backgroundTextureImage::backgroundTextureImage( const std::string &backgroundTexture_ ) |
| 1130 | : _backgroundTexture( backgroundTexture_ ) |
| 1131 | { |
| 1132 | } |
| 1133 | void Magick::backgroundTextureImage::operator()( Magick::Image &image_ ) const |
| 1134 | { |
| 1135 | image_.backgroundTexture( _backgroundTexture ); |
| 1136 | } |
| 1137 | |
| 1138 | // Image border color |
| 1139 | Magick::borderColorImage::borderColorImage( const Magick::Color &color_ ) |
| 1140 | : _color( color_ ) |
| 1141 | { |
| 1142 | } |
| 1143 | void Magick::borderColorImage::operator()( Magick::Image &image_ ) const |
| 1144 | { |
| 1145 | image_.borderColor( _color ); |
| 1146 | } |
| 1147 | |
| 1148 | // Text bounding-box base color (default none) |
| 1149 | Magick::boxColorImage::boxColorImage( const Magick::Color &boxColor_ ) |
| 1150 | : _boxColor( boxColor_ ) { } |
| 1151 | |
| 1152 | void Magick::boxColorImage::operator()( Magick::Image &image_ ) const |
| 1153 | { |
| 1154 | image_.boxColor( _boxColor ); |
| 1155 | } |
| 1156 | |
| 1157 | // Chromaticity blue primary point (e.g. x=0.15, y=0.06) |
| 1158 | Magick::chromaBluePrimaryImage::chromaBluePrimaryImage( const double x_, |
| 1159 | const double y_ ) |
| 1160 | : _x( x_ ), |
| 1161 | _y( y_ ) |
| 1162 | { |
| 1163 | } |
| 1164 | void Magick::chromaBluePrimaryImage::operator()( Magick::Image &image_ ) const |
| 1165 | { |
| 1166 | image_.chromaBluePrimary( _x, _y ); |
| 1167 | } |
| 1168 | |
| 1169 | // Chromaticity green primary point (e.g. x=0.3, y=0.6) |
| 1170 | Magick::chromaGreenPrimaryImage::chromaGreenPrimaryImage( const double x_, |
| 1171 | const double y_ ) |
| 1172 | : _x( x_ ), |
| 1173 | _y( y_ ) |
| 1174 | { |
| 1175 | } |
| 1176 | void Magick::chromaGreenPrimaryImage::operator()( Magick::Image &image_ ) const |
| 1177 | { |
| 1178 | image_.chromaGreenPrimary( _x, _y ); |
| 1179 | } |
| 1180 | |
| 1181 | // Chromaticity red primary point (e.g. x=0.64, y=0.33) |
| 1182 | Magick::chromaRedPrimaryImage::chromaRedPrimaryImage( const double x_, |
| 1183 | const double y_ ) |
| 1184 | : _x( x_ ), |
| 1185 | _y( y_ ) |
| 1186 | { |
| 1187 | } |
| 1188 | void Magick::chromaRedPrimaryImage::operator()( Magick::Image &image_ ) const |
| 1189 | { |
| 1190 | image_.chromaRedPrimary( _x, _y ); |
| 1191 | } |
| 1192 | |
| 1193 | // Chromaticity white point (e.g. x=0.3127, y=0.329) |
| 1194 | Magick::chromaWhitePointImage::chromaWhitePointImage( const double x_, |
| 1195 | const double y_ ) |
| 1196 | : _x( x_ ), |
| 1197 | _y( y_ ) |
| 1198 | { |
| 1199 | } |
| 1200 | void Magick::chromaWhitePointImage::operator()( Magick::Image &image_ ) const |
| 1201 | { |
| 1202 | image_.chromaWhitePoint( _x, _y ); |
| 1203 | } |
| 1204 | |
| 1205 | // Colors within this distance are considered equal |
| 1206 | Magick::colorFuzzImage::colorFuzzImage( const double fuzz_ ) |
| 1207 | : _fuzz( fuzz_ ) |
| 1208 | { |
| 1209 | } |
| 1210 | void Magick::colorFuzzImage::operator()( Magick::Image &image_ ) const |
| 1211 | { |
| 1212 | image_.colorFuzz( _fuzz ); |
| 1213 | } |
| 1214 | |
| 1215 | // Color at colormap position index_ |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1216 | Magick::colorMapImage::colorMapImage( const size_t index_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1217 | const Color &color_ ) |
| 1218 | : _index( index_ ), |
| 1219 | _color( color_ ) |
| 1220 | { |
| 1221 | } |
| 1222 | void Magick::colorMapImage::operator()( Magick::Image &image_ ) const |
| 1223 | { |
| 1224 | image_.colorMap( _index, _color ); |
| 1225 | } |
| 1226 | |
| 1227 | // Composition operator to be used when composition is implicitly used |
| 1228 | // (such as for image flattening). |
| 1229 | Magick::composeImage::composeImage( const CompositeOperator compose_ ) |
| 1230 | : _compose( compose_ ) |
| 1231 | { |
| 1232 | } |
| 1233 | void Magick::composeImage::operator()( Magick::Image &image_ ) const |
| 1234 | { |
| 1235 | image_.compose( _compose ); |
| 1236 | } |
| 1237 | |
| 1238 | // Compression type |
| 1239 | Magick::compressTypeImage::compressTypeImage( const CompressionType compressType_ ) |
| 1240 | : _compressType( compressType_ ) |
| 1241 | { |
| 1242 | } |
| 1243 | void Magick::compressTypeImage::operator()( Magick::Image &image_ ) const |
| 1244 | { |
| 1245 | image_.compressType( _compressType ); |
| 1246 | } |
| 1247 | |
| 1248 | // Vertical and horizontal resolution in pixels of the image |
| 1249 | Magick::densityImage::densityImage( const Geometry &geomery_ ) |
| 1250 | : _geomery( geomery_ ) |
| 1251 | { |
| 1252 | } |
| 1253 | void Magick::densityImage::operator()( Magick::Image &image_ ) const |
| 1254 | { |
| 1255 | image_.density( _geomery ); |
| 1256 | } |
| 1257 | |
| 1258 | // Image depth (bits allocated to red/green/blue components) |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1259 | Magick::depthImage::depthImage( const size_t depth_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1260 | : _depth( depth_ ) |
| 1261 | { |
| 1262 | } |
| 1263 | void Magick::depthImage::operator()( Magick::Image &image_ ) const |
| 1264 | { |
| 1265 | image_.depth( _depth ); |
| 1266 | } |
| 1267 | |
| 1268 | // Endianness (LSBEndian like Intel or MSBEndian like SPARC) for image |
| 1269 | // formats which support endian-specific options. |
| 1270 | Magick::endianImage::endianImage( const Magick::EndianType endian_ ) |
| 1271 | : _endian( endian_ ) |
| 1272 | { |
| 1273 | } |
| 1274 | void Magick::endianImage::operator()( Magick::Image &image_ ) const |
| 1275 | { |
| 1276 | image_.endian( _endian ); |
| 1277 | } |
| 1278 | |
| 1279 | // Image file name |
| 1280 | Magick::fileNameImage::fileNameImage( const std::string &fileName_ ) |
| 1281 | : _fileName( fileName_ ) |
| 1282 | { |
| 1283 | } |
| 1284 | void Magick::fileNameImage::operator()( Magick::Image &image_ ) const |
| 1285 | { |
| 1286 | image_.fileName( _fileName ); |
| 1287 | } |
| 1288 | |
| 1289 | // Filter to use when resizing image |
| 1290 | Magick::filterTypeImage::filterTypeImage( const FilterTypes filterType_ ) |
| 1291 | : _filterType( filterType_ ) |
| 1292 | { |
| 1293 | } |
| 1294 | void Magick::filterTypeImage::operator()( Magick::Image &image_ ) const |
| 1295 | { |
| 1296 | image_.filterType( _filterType ); |
| 1297 | } |
| 1298 | |
| 1299 | // Text rendering font |
| 1300 | Magick::fontImage::fontImage( const std::string &font_ ) |
| 1301 | : _font( font_ ) |
| 1302 | { |
| 1303 | } |
| 1304 | void Magick::fontImage::operator()( Magick::Image &image_ ) const |
| 1305 | { |
| 1306 | image_.font( _font ); |
| 1307 | } |
| 1308 | |
| 1309 | // Font point size |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1310 | Magick::fontPointsizeImage::fontPointsizeImage( const size_t pointsize_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1311 | : _pointsize( pointsize_ ) |
| 1312 | { |
| 1313 | } |
| 1314 | void Magick::fontPointsizeImage::operator()( Magick::Image &image_ ) const |
| 1315 | { |
| 1316 | image_.fontPointsize( _pointsize ); |
| 1317 | } |
| 1318 | |
| 1319 | // GIF disposal method |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1320 | Magick::gifDisposeMethodImage::gifDisposeMethodImage( const size_t disposeMethod_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1321 | : _disposeMethod( disposeMethod_ ) |
| 1322 | { |
| 1323 | } |
| 1324 | void Magick::gifDisposeMethodImage::operator()( Magick::Image &image_ ) const |
| 1325 | { |
| 1326 | image_.gifDisposeMethod( _disposeMethod ); |
| 1327 | } |
| 1328 | |
| 1329 | // Type of interlacing to use |
| 1330 | Magick::interlaceTypeImage::interlaceTypeImage( const InterlaceType interlace_ ) |
| 1331 | : _interlace( interlace_ ) |
| 1332 | { |
| 1333 | } |
| 1334 | void Magick::interlaceTypeImage::operator()( Magick::Image &image_ ) const |
| 1335 | { |
| 1336 | image_.interlaceType( _interlace ); |
| 1337 | } |
| 1338 | |
| 1339 | // Linewidth for drawing vector objects (default one) |
| 1340 | Magick::lineWidthImage::lineWidthImage( const double lineWidth_ ) |
| 1341 | : _lineWidth( lineWidth_ ) |
| 1342 | { |
| 1343 | } |
| 1344 | void Magick::lineWidthImage::operator()( Magick::Image &image_ ) const |
| 1345 | { |
| 1346 | image_.lineWidth( _lineWidth ); |
| 1347 | } |
| 1348 | |
| 1349 | // File type magick identifier (.e.g "GIF") |
| 1350 | Magick::magickImage::magickImage( const std::string &magick_ ) |
| 1351 | : _magick( magick_ ) |
| 1352 | { |
| 1353 | } |
| 1354 | void Magick::magickImage::operator()( Magick::Image &image_ ) const |
| 1355 | { |
| 1356 | image_.magick( _magick ); |
| 1357 | } |
| 1358 | |
| 1359 | // Image supports transparent color |
| 1360 | Magick::matteImage::matteImage( const bool matteFlag_ ) |
| 1361 | : _matteFlag( matteFlag_ ) |
| 1362 | { |
| 1363 | } |
| 1364 | void Magick::matteImage::operator()( Magick::Image &image_ ) const |
| 1365 | { |
| 1366 | image_.matte( _matteFlag ); |
| 1367 | } |
| 1368 | |
| 1369 | // Transparent color |
| 1370 | Magick::matteColorImage::matteColorImage( const Color &matteColor_ ) |
| 1371 | : _matteColor( matteColor_ ) |
| 1372 | { |
| 1373 | } |
| 1374 | void Magick::matteColorImage::operator()( Magick::Image &image_ ) const |
| 1375 | { |
| 1376 | image_.matteColor( _matteColor ); |
| 1377 | } |
| 1378 | |
| 1379 | // Indicate that image is black and white |
| 1380 | Magick::monochromeImage::monochromeImage( const bool monochromeFlag_ ) |
| 1381 | : _monochromeFlag( monochromeFlag_ ) |
| 1382 | { |
| 1383 | } |
| 1384 | void Magick::monochromeImage::operator()( Magick::Image &image_ ) const |
| 1385 | { |
| 1386 | image_.monochrome( _monochromeFlag ); |
| 1387 | } |
| 1388 | |
| 1389 | // Pen color |
| 1390 | Magick::penColorImage::penColorImage( const Color &penColor_ ) |
| 1391 | : _penColor( penColor_ ) |
| 1392 | { |
| 1393 | } |
| 1394 | void Magick::penColorImage::operator()( Magick::Image &image_ ) const |
| 1395 | { |
| 1396 | image_.penColor( _penColor ); |
| 1397 | } |
| 1398 | |
| 1399 | // Pen texture image. |
| 1400 | Magick::penTextureImage::penTextureImage( const Image &penTexture_ ) |
| 1401 | : _penTexture( penTexture_ ) |
| 1402 | { |
| 1403 | } |
| 1404 | void Magick::penTextureImage::operator()( Magick::Image &image_ ) const |
| 1405 | { |
| 1406 | image_.penTexture( _penTexture ); |
| 1407 | } |
| 1408 | |
| 1409 | // Set pixel color at location x & y. |
cristy | 4e0eef0 | 2010-05-30 21:52:21 +0000 | [diff] [blame] | 1410 | Magick::pixelColorImage::pixelColorImage( const ssize_t x_, |
| 1411 | const ssize_t y_, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1412 | const Color &color_) |
| 1413 | : _x( x_ ), |
| 1414 | _y( y_ ), |
| 1415 | _color( color_ ) { } |
| 1416 | |
| 1417 | void Magick::pixelColorImage::operator()( Magick::Image &image_ ) const |
| 1418 | { |
| 1419 | image_.pixelColor( _x, _y, _color ); |
| 1420 | } |
| 1421 | |
| 1422 | // Postscript page size. |
| 1423 | Magick::pageImage::pageImage( const Geometry &pageSize_ ) |
| 1424 | : _pageSize( pageSize_ ) |
| 1425 | { |
| 1426 | } |
| 1427 | void Magick::pageImage::operator()( Magick::Image &image_ ) const |
| 1428 | { |
| 1429 | image_.page( _pageSize ); |
| 1430 | } |
| 1431 | |
| 1432 | // JPEG/MIFF/PNG compression level (default 75). |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1433 | Magick::qualityImage::qualityImage( const size_t quality_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1434 | : _quality( quality_ ) |
| 1435 | { |
| 1436 | } |
| 1437 | void Magick::qualityImage::operator()( Magick::Image &image_ ) const |
| 1438 | { |
| 1439 | image_.quality( _quality ); |
| 1440 | } |
| 1441 | |
| 1442 | // Maximum number of colors to quantize to |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1443 | Magick::quantizeColorsImage::quantizeColorsImage( const size_t colors_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1444 | : _colors( colors_ ) |
| 1445 | { |
| 1446 | } |
| 1447 | void Magick::quantizeColorsImage::operator()( Magick::Image &image_ ) const |
| 1448 | { |
| 1449 | image_.quantizeColors( _colors ); |
| 1450 | } |
| 1451 | |
| 1452 | // Colorspace to quantize in. |
| 1453 | Magick::quantizeColorSpaceImage::quantizeColorSpaceImage( const ColorspaceType colorSpace_ ) |
| 1454 | : _colorSpace( colorSpace_ ) |
| 1455 | { |
| 1456 | } |
| 1457 | void Magick::quantizeColorSpaceImage::operator()( Magick::Image &image_ ) const |
| 1458 | { |
| 1459 | image_.quantizeColorSpace( _colorSpace ); |
| 1460 | } |
| 1461 | |
| 1462 | // Dither image during quantization (default true). |
| 1463 | Magick::quantizeDitherImage::quantizeDitherImage( const bool ditherFlag_ ) |
| 1464 | : _ditherFlag( ditherFlag_ ) |
| 1465 | { |
| 1466 | } |
| 1467 | void Magick::quantizeDitherImage::operator()( Magick::Image &image_ ) const |
| 1468 | { |
| 1469 | image_.quantizeDither( _ditherFlag ); |
| 1470 | } |
| 1471 | |
| 1472 | // Quantization tree-depth |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1473 | Magick::quantizeTreeDepthImage::quantizeTreeDepthImage( const size_t treeDepth_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1474 | : _treeDepth( treeDepth_ ) { } |
| 1475 | |
| 1476 | void Magick::quantizeTreeDepthImage::operator()( Magick::Image &image_ ) const |
| 1477 | { |
| 1478 | image_.quantizeTreeDepth( _treeDepth ); |
| 1479 | } |
| 1480 | |
| 1481 | // The type of rendering intent |
| 1482 | Magick::renderingIntentImage::renderingIntentImage( const Magick::RenderingIntent renderingIntent_ ) |
| 1483 | : _renderingIntent( renderingIntent_ ) |
| 1484 | { |
| 1485 | } |
| 1486 | void Magick::renderingIntentImage::operator()( Magick::Image &image_ ) const |
| 1487 | { |
| 1488 | image_.renderingIntent( _renderingIntent ); |
| 1489 | } |
| 1490 | |
| 1491 | // Units of image resolution |
| 1492 | Magick::resolutionUnitsImage::resolutionUnitsImage( const Magick::ResolutionType resolutionUnits_ ) |
| 1493 | : _resolutionUnits( resolutionUnits_ ) |
| 1494 | { |
| 1495 | } |
| 1496 | void Magick::resolutionUnitsImage::operator()( Magick::Image &image_ ) const |
| 1497 | { |
| 1498 | image_.resolutionUnits( _resolutionUnits ); |
| 1499 | } |
| 1500 | |
| 1501 | // Image scene number |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1502 | Magick::sceneImage::sceneImage( const size_t scene_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1503 | : _scene( scene_ ) |
| 1504 | { |
| 1505 | } |
| 1506 | void Magick::sceneImage::operator()( Magick::Image &image_ ) const |
| 1507 | { |
| 1508 | image_.scene( _scene ); |
| 1509 | } |
| 1510 | |
| 1511 | // Width and height of a raw image |
| 1512 | Magick::sizeImage::sizeImage( const Magick::Geometry &geometry_ ) |
| 1513 | : _geometry( geometry_ ) |
| 1514 | { |
| 1515 | } |
| 1516 | void Magick::sizeImage::operator()( Magick::Image &image_ ) const |
| 1517 | { |
| 1518 | image_.size( _geometry ); |
| 1519 | } |
| 1520 | |
cristy | 8198a75 | 2009-09-28 23:59:24 +0000 | [diff] [blame] | 1521 | // Splice the background color into the image. |
| 1522 | Magick::spliceImage::spliceImage( const Magick::Geometry &geometry_ ) |
| 1523 | : _geometry( geometry_ ) |
| 1524 | { |
| 1525 | } |
| 1526 | void Magick::spliceImage::operator()( Magick::Image &image_ ) const |
| 1527 | { |
| 1528 | image_.splice( _geometry ); |
| 1529 | } |
| 1530 | |
cristy | 9f89a3f | 2011-02-12 17:02:35 +0000 | [diff] [blame] | 1531 | // stripImage strips an image of all profiles and comments. |
| 1532 | Magick::stripImage::stripImage( void ) |
| 1533 | { |
| 1534 | } |
| 1535 | void Magick::stripImage::operator()( Magick::Image &image_ ) const |
| 1536 | { |
| 1537 | image_.strip( ); |
| 1538 | } |
| 1539 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1540 | // Subimage of an image sequence |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1541 | Magick::subImageImage::subImageImage( const size_t subImage_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1542 | : _subImage( subImage_ ) |
| 1543 | { |
| 1544 | } |
| 1545 | void Magick::subImageImage::operator()( Magick::Image &image_ ) const |
| 1546 | { |
| 1547 | image_.subImage( _subImage ); |
| 1548 | } |
| 1549 | |
| 1550 | // Number of images relative to the base image |
cristy | eaedf06 | 2010-05-29 22:36:02 +0000 | [diff] [blame] | 1551 | Magick::subRangeImage::subRangeImage( const size_t subRange_ ) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1552 | : _subRange( subRange_ ) |
| 1553 | { |
| 1554 | } |
| 1555 | void Magick::subRangeImage::operator()( Magick::Image &image_ ) const |
| 1556 | { |
| 1557 | image_.subRange( _subRange ); |
| 1558 | } |
| 1559 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1560 | // Image storage type |
| 1561 | Magick::typeImage::typeImage( const Magick::ImageType type_ ) |
| 1562 | : _type( type_ ) |
| 1563 | { |
| 1564 | } |
| 1565 | void Magick::typeImage::operator()( Magick::Image &image_ ) const |
| 1566 | { |
| 1567 | image_.type( _type ); |
| 1568 | } |
| 1569 | |
| 1570 | // Print detailed information about the image |
| 1571 | Magick::verboseImage::verboseImage( const bool verbose_ ) |
| 1572 | : _verbose( verbose_ ) |
| 1573 | { |
| 1574 | } |
| 1575 | void Magick::verboseImage::operator()( Magick::Image &image_ ) const |
| 1576 | { |
| 1577 | image_.verbose( _verbose ); |
| 1578 | } |
| 1579 | |
| 1580 | // FlashPix viewing parameters |
| 1581 | Magick::viewImage::viewImage( const std::string &view_ ) |
| 1582 | : _view( view_ ) { } |
| 1583 | |
| 1584 | void Magick::viewImage::operator()( Magick::Image &image_ ) const |
| 1585 | { |
| 1586 | image_.view( _view ); |
| 1587 | } |
| 1588 | |
| 1589 | // X11 display to display to, obtain fonts from, or to capture image |
| 1590 | // from |
| 1591 | Magick::x11DisplayImage::x11DisplayImage( const std::string &display_ ) |
| 1592 | : _display( display_ ) |
| 1593 | { |
| 1594 | } |
| 1595 | void Magick::x11DisplayImage::operator()( Magick::Image &image_ ) const |
| 1596 | { |
| 1597 | image_.x11Display( _display ); |
| 1598 | } |