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