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