Commit c130e1c7 authored by dirk's avatar dirk

Added negateChannel to Magick++.

parent 46a51711
......@@ -1618,17 +1618,16 @@ void Magick::Image::magnify ( void )
}
// Remap image colors with closest color from reference image
void Magick::Image::map ( const Image &mapImage_ , const bool dither_ )
void Magick::Image::map ( const Image &mapImage_, const bool dither_ )
{
modifyImage();
options()->quantizeDither( dither_ );
RemapImage ( options()->quantizeInfo(), image(),
mapImage_.constImage());
RemapImage ( options()->quantizeInfo(), image(), mapImage_.constImage());
throwImageException();
}
// Floodfill designated area with replacement opacity value
void Magick::Image::matteFloodfill ( const Color &target_ ,
void Magick::Image::matteFloodfill ( const Color &target_,
const unsigned int opacity_,
const ssize_t x_, const ssize_t y_,
const Magick::PaintMethod method_ )
......@@ -1716,13 +1715,21 @@ void Magick::Image::motionBlur ( const double radius_,
throwException( exceptionInfo );
(void) DestroyExceptionInfo( &exceptionInfo );
}
// Negate image. Set grayscale_ to true to effect grayscale values
// only
void Magick::Image::negate ( const bool grayscale_ )
{
modifyImage();
NegateImage ( image(), grayscale_ == true ? MagickTrue : MagickFalse );
NegateImage( image(), (MagickBooleanType) grayscale_);
throwImageException();
}
void Magick::Image::negateChannel ( const ChannelType channel_,
const bool grayscale_)
{
modifyImage();
NegateImageChannel( image(), channel_, (MagickBooleanType) grayscale_);
throwImageException();
}
......
......@@ -547,11 +547,11 @@ namespace Magick
void magnify ( void );
// Remap image colors with closest color from reference image
void map ( const Image &mapImage_ ,
void map ( const Image &mapImage_,
const bool dither_ = false );
// Floodfill designated area with replacement opacity value
void matteFloodfill ( const Color &target_ ,
void matteFloodfill ( const Color &target_,
const unsigned int opacity_,
const ::ssize_t x_, const ::ssize_t y_,
const PaintMethod method_ );
......@@ -565,8 +565,8 @@ namespace Magick
// Modulate percent hue, saturation, and brightness of an image
void modulate ( const double brightness_,
const double saturation_,
const double hue_ );
const double saturation_,
const double hue_ );
// Motion blur image with specified blur factor
// The radius_ parameter specifies the radius of the Gaussian, in
......@@ -581,6 +581,8 @@ namespace Magick
// Negate colors in image. Set grayscale to only negate grayscale
// values in image.
void negate ( const bool grayscale_ = false );
void negateChannel ( const ChannelType channel_,
const bool grayscale_ = false );
// Normalize image (increase contrast by normalizing the pixel
// values to span the full range of color values)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment