{
annotate ( text_, location_, NorthWestGravity, 0.0 );
}
+
// Annotate using specified text, bounding area, and placement gravity
void Magick::Image::annotate ( const std::string &text_,
const Geometry &boundingArea_,
{
annotate ( text_, boundingArea_, gravity_, 0.0 );
}
+
// Annotate with text using specified text, bounding area, placement
// gravity, and rotation.
void Magick::Image::annotate ( const std::string &text_,
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
+
// Annotate with text (bounding area is entire image) and placement gravity.
void Magick::Image::annotate ( const std::string &text_,
const GravityType gravity_ )
(void) DestroyExceptionInfo( &exceptionInfo );
}
+void Magick::Image::blueShift ( const double factor_ )
+{
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ MagickCore::Image* newImage =
+ BlueShiftImage( constImage(), factor_, &exceptionInfo );
+ replaceImage( newImage );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
// Blur image
void Magick::Image::blur ( const double radius_, const double sigma_ )
{
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
MagickCore::Image* newImage =
- BorderImage( image(), &borderInfo, image()->compose, &exceptionInfo);
+ BorderImage( image(), &borderInfo, image()->compose, &exceptionInfo );
replaceImage( newImage );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
+void Magick::Image::brightnessContrast ( const double brightness_,
+ const double contrast_ )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ BrightnessContrastImage( image(), brightness_, contrast_, &exceptionInfo );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
+void Magick::Image::brightnessContrastChannel ( const ChannelType channel_,
+ const double brightness_,
+ const double contrast_ )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ ChannelType channel_mask = SetImageChannelMask( image(), channel_ );
+ BrightnessContrastImage( image(), brightness_, contrast_, &exceptionInfo );
+ (void) SetPixelChannelMask( image(), channel_mask );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
// Extract channel from image
void Magick::Image::channel ( const ChannelType channel_ )
{
- modifyImage();
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
MagickCore::Image* newImage =
- SeparateImage( image(), channel_, &exceptionInfo);
+ SeparateImage( image(), channel_, &exceptionInfo );
replaceImage( newImage );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
modifyImage();
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
- SetImageDepth( image(), depth_, &exceptionInfo);
+ SetImageDepth( image(), depth_, &exceptionInfo );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
+
size_t Magick::Image::channelDepth ( )
{
size_t channel_depth;
return channel_depth;
}
-
// Charcoal-effect image
-void Magick::Image::charcoal( const double radius_, const double sigma_ )
+void Magick::Image::charcoal ( const double radius_, const double sigma_ )
{
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
}
// Chop image
-void Magick::Image::chop( const Geometry &geometry_ )
+void Magick::Image::chop ( const Geometry &geometry_ )
{
RectangleInfo chopInfo = geometry_;
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
MagickCore::Image* newImage =
- ChopImage( image(), &chopInfo, &exceptionInfo);
+ ChopImage( image(), &chopInfo, &exceptionInfo );
replaceImage( newImage );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
+void Magick::Image::clamp ( void )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ ClampImage( image(), &exceptionInfo );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
+void Magick::Image::clampChannel ( const ChannelType channel_ )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ ChannelType channel_mask = SetImageChannelMask( image(), channel_ );
+ ClampImage( image(), &exceptionInfo );
+ (void) SetPixelChannelMask( image(), channel_mask );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
+void Magick::Image::clut ( const Image &clutImage_,
+ const PixelInterpolateMethod method )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ ClutImage( image(), clutImage_.constImage(), method, &exceptionInfo );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
+void Magick::Image::clutChannel ( const Image &clutImage_,
+ const PixelInterpolateMethod method,
+ const ChannelType channel_ )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ ChannelType channel_mask = SetImageChannelMask( image(), channel_ );
+ ClutImage( image(), clutImage_.constImage(), method, &exceptionInfo );
+ (void) SetPixelChannelMask( image(), channel_mask );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
// Colorize
void Magick::Image::colorize ( const unsigned int alphaRed_,
const unsigned int alphaGreen_,
const unsigned int alphaBlue_,
- const Color &penColor_ )
+ const Color &penColor_ )
{
if ( !penColor_.isValid() )
- {
- throwExceptionExplicit( OptionError,
- "Pen color argument is invalid");
- }
+ throwExceptionExplicit( OptionError, "Pen color argument is invalid" );
char blend[MaxTextExtent];
- FormatLocaleString(blend,MaxTextExtent,"%u/%u/%u",alphaRed_,alphaGreen_,alphaBlue_);
+ FormatLocaleString( blend, MaxTextExtent, "%u/%u/%u",
+ alphaRed_, alphaGreen_, alphaBlue_ );
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
+
void Magick::Image::colorize ( const unsigned int alpha_,
- const Color &penColor_ )
+ const Color &penColor_ )
{
colorize( alpha_, alpha_, alpha_, penColor_ );
}
// Apply a color matrix to the image channels. The user supplied
// matrix may be of order 1 to 6 (1x1 through 6x6).
-void Magick::Image::colorMatrix (const size_t order_,
- const double *color_matrix_)
+void Magick::Image::colorMatrix ( const size_t order_,
+ const double *color_matrix_ )
{
KernelInfo
*kernel_info;
// Composite two images
void Magick::Image::composite ( const Image &compositeImage_,
- const ssize_t xOffset_,
- const ssize_t yOffset_,
- const CompositeOperator compose_ )
+ const ssize_t xOffset_,
+ const ssize_t yOffset_,
+ const CompositeOperator compose_ )
{
// Image supplied as compositeImage is composited with current image and
// results in updating current image.
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
- CompositeImage( image(),
- compositeImage_.constImage(),
- compose_, MagickFalse,
- xOffset_,
- yOffset_, &exceptionInfo );
+ CompositeImage( image(), compositeImage_.constImage(), compose_, MagickFalse,
+ xOffset_, yOffset_, &exceptionInfo );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
+
void Magick::Image::composite ( const Image &compositeImage_,
- const Geometry &offset_,
- const CompositeOperator compose_ )
+ const Geometry &offset_,
+ const CompositeOperator compose_ )
{
modifyImage();
size_t width = columns();
size_t height = rows();
- ParseMetaGeometry (static_cast<std::string>(offset_).c_str(),
- &x, &y,
- &width, &height );
+ ParseMetaGeometry ( static_cast<std::string>(offset_).c_str(),
+ &x, &y,
+ &width, &height );
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
- CompositeImage( image(),
- compositeImage_.constImage(),
- compose_, MagickFalse,
- x, y, &exceptionInfo );
+ CompositeImage( image(), compositeImage_.constImage(), compose_, MagickFalse,
+ x, y, &exceptionInfo );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
+
void Magick::Image::composite ( const Image &compositeImage_,
- const GravityType gravity_,
- const CompositeOperator compose_ )
+ const GravityType gravity_,
+ const CompositeOperator compose_ )
{
modifyImage();
ExceptionInfo exceptionInfo;
GetExceptionInfo( &exceptionInfo );
- CompositeImage( image(),
- compositeImage_.constImage(),
- compose_, MagickFalse,
- geometry.x, geometry.y, &exceptionInfo );
+ CompositeImage( image(), compositeImage_.constImage(), compose_, MagickFalse,
+ geometry.x, geometry.y, &exceptionInfo );
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
(void) DestroyExceptionInfo( &exceptionInfo );
}
+void Magick::Image::contrastStretch ( const double black_point_,
+ const double white_point_ )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ ContrastStretchImage ( image(), black_point_, white_point_, &exceptionInfo );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
+void Magick::Image::contrastStretchChannel ( const ChannelType channel_,
+ const double black_point_,
+ const double white_point_ )
+{
+ modifyImage();
+ ExceptionInfo exceptionInfo;
+ GetExceptionInfo( &exceptionInfo );
+ ChannelType channel_mask = SetImageChannelMask( image(), channel_ );
+ ContrastStretchImage ( image(), black_point_, white_point_, &exceptionInfo );
+ (void) SetPixelChannelMask( image(), channel_mask );
+ throwException( exceptionInfo );
+ (void) DestroyExceptionInfo( &exceptionInfo );
+}
+
// Convolve image. Applies a general image convolution kernel to the image.
// order_ represents the number of columns and rows in the filter kernel.
// kernel_ is an array of doubles representing the convolution kernel.
void blackThresholdChannel ( const ChannelType channel_,
const std::string &threshold_ );
+ // Simulate a scene at nighttime in the moonlight.
+ void blueShift ( const double factor_ = 1.5 );
+
// Blur image with specified blur factor
// The radius_ parameter specifies the radius of the Gaussian, in
// pixels, not counting the center pixel. The sigma_ parameter
void border ( const Geometry &geometry_
= borderGeometryDefault );
+ // Changes the brightness and/or contrast of an image. It converts the
+ // brightness and contrast parameters into slope and intercept and calls
+ // a polynomical function to apply to the image.
+ void brightnessContrast ( const double brightness_ = 0.0,
+ const double contrast_ = 0.0);
+ void brightnessContrastChannel ( const ChannelType channel_,
+ const double brightness_ = 0.0,
+ const double contrast_ = 0.0 );
+
// Extract channel from image
void channel ( const ChannelType channel_ );
// Set or obtain modulus channel depth
void channelDepth ( const size_t depth_ );
- size_t channelDepth ( );
+ size_t channelDepth ( );
// Charcoal effect image (looks like charcoal sketch)
// The radius_ parameter specifies the radius of the Gaussian, in
// (CCC) file which solely contains one or more color corrections and
// applies the correction to the image.
void cdl ( const std::string &cdl_ );
-
+
+ // Set each pixel whose value is below zero to zero and any the
+ // pixel whose value is above the quantum range to the quantum range (e.g.
+ // 65535) otherwise the pixel value remains unchanged.
+ void clamp ( void );
+ void clampChannel ( const ChannelType channel_ );
+
+ // Apply a color lookup table (CLUT) to the image.
+ void clut ( const Image &clutImage_,
+ const PixelInterpolateMethod method );
+ void clutChannel ( const Image &clutImage_,
+ const PixelInterpolateMethod method,
+ const ChannelType channel_ );
+
// Colorize image with pen color, using specified percent alpha
// for red, green, and blue quantums
void colorize ( const unsigned int alphaRed_,
const unsigned int alphaGreen_,
const unsigned int alphaBlue_,
- const Color &penColor_ );
+ const Color &penColor_ );
// Colorize image with pen color, using specified percent alpha.
void colorize ( const unsigned int alpha_,
- const Color &penColor_ );
+ const Color &penColor_ );
// Apply a color matrix to the image channels. The user supplied
// matrix may be of order 1 to 5 (1x1 through 5x5).
- void colorMatrix (const size_t order_,
- const double *color_matrix_);
-
- // Comment image (add comment string to image)
- void comment ( const std::string &comment_ );
-
- // Composition operator to be used when composition is implicitly
- // used (such as for image flattening).
- void compose (const CompositeOperator compose_);
- CompositeOperator compose ( void ) const;
+ void colorMatrix ( const size_t order_,
+ const double *color_matrix_);
// Compare current image with another image
// Sets meanErrorPerPixel, normalizedMaxError, and normalizedMeanError
// Compose an image onto another at specified offset and using
// specified algorithm
void composite ( const Image &compositeImage_,
- const ::ssize_t xOffset_,
- const ::ssize_t yOffset_,
- const CompositeOperator compose_
- = InCompositeOp );
+ const ::ssize_t xOffset_,
+ const ::ssize_t yOffset_,
+ const CompositeOperator compose_
+ = InCompositeOp );
void composite ( const Image &compositeImage_,
- const Geometry &offset_,
- const CompositeOperator compose_
- = InCompositeOp );
+ const Geometry &offset_,
+ const CompositeOperator compose_
+ = InCompositeOp );
void composite ( const Image &compositeImage_,
- const GravityType gravity_,
- const CompositeOperator compose_
- = InCompositeOp );
-
+ const GravityType gravity_,
+ const CompositeOperator compose_
+ = InCompositeOp );
+
// Contrast image (enhance intensity differences in image)
void contrast ( const size_t sharpen_ );
+ // A simple image enhancement technique that attempts to improve the
+ // contrast in an image by 'stretching' the range of intensity values
+ // it contains to span a desired range of values. It differs from the
+ // more sophisticated histogram equalization in that it can only apply a
+ // linear scaling function to the image pixel values. As a result the
+ // 'enhancement' is less harsh.
+ void contrastStretch ( const double black_point_,
+ const double white_point_ );
+ void contrastStretchChannel ( const ChannelType channel_,
+ const double black_point_,
+ const double white_point_ );
+
// Convolve image. Applies a user-specified convolution to the image.
// order_ represents the number of columns and rows in the filter kernel.
// kernel_ is an array of doubles representing the convolution kernel.
ColorspaceType colorspaceType ( void ) const;
// Image width
- size_t columns ( void ) const;
-
- // Image comment
+ size_t columns ( void ) const;
+
+ // Comment image (add comment string to image)
+ void comment ( const std::string &comment_ );
std::string comment ( void ) const;
-
+
+ // Composition operator to be used when composition is implicitly
+ // used (such as for image flattening).
+ void compose ( const CompositeOperator compose_ );
+ CompositeOperator compose ( void ) const;
+
// Compression type
void compressType ( const CompressionType compressType_ );
CompressionType compressType ( void ) const;