From: dirk Date: Thu, 13 Mar 2014 19:05:04 +0000 (+0000) Subject: Added quantizeDitherMethod to Magick++. X-Git-Tag: 7.0.1-0~2586 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d64b3658c2fa7218fbc309b9c85e3ec4441310e;p=imagemagick Added quantizeDitherMethod to Magick++. --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index d42c63f89..d2358c1d1 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -1250,6 +1250,17 @@ bool Magick::Image::quantizeDither(void) const return(constOptions()->quantizeDither()); } +void Magick::Image::quantizeDitherMethod(const DitherMethod ditherMethod_) +{ + modifyImage(); + options()->quantizeDitherMethod(ditherMethod_); +} + +MagickCore::DitherMethod Magick::Image::quantizeDitherMethod(void) const +{ + return(constOptions()->quantizeDitherMethod()); +} + void Magick::Image::quantizeTreeDepth(const size_t treeDepth_) { modifyImage(); diff --git a/Magick++/lib/Magick++/Image.h b/Magick++/lib/Magick++/Image.h index 05a3757c5..e9739dc50 100644 --- a/Magick++/lib/Magick++/Image.h +++ b/Magick++/lib/Magick++/Image.h @@ -377,6 +377,10 @@ namespace Magick void quantizeDither(const bool ditherFlag_); bool quantizeDither(void) const; + // Dither method + void quantizeDitherMethod(const DitherMethod ditherMethod_); + DitherMethod quantizeDitherMethod(void) const; + // Quantization tree-depth void quantizeTreeDepth(const size_t treeDepth_); size_t quantizeTreeDepth(void) const; diff --git a/Magick++/lib/Magick++/Options.h b/Magick++/lib/Magick++/Options.h index 4af26bb06..93f346bc5 100644 --- a/Magick++/lib/Magick++/Options.h +++ b/Magick++/lib/Magick++/Options.h @@ -158,6 +158,10 @@ namespace Magick void quantizeDither(bool ditherFlag_); bool quantizeDither(void) const; + // Dither method + void quantizeDitherMethod(DitherMethod ditherMethod_); + DitherMethod quantizeDitherMethod(void) const; + // Quantization tree-depth void quantizeTreeDepth(size_t treeDepth_); size_t quantizeTreeDepth(void) const; diff --git a/Magick++/lib/Options.cpp b/Magick++/lib/Options.cpp index 3d916430f..a1328d631 100644 --- a/Magick++/lib/Options.cpp +++ b/Magick++/lib/Options.cpp @@ -439,6 +439,16 @@ bool Magick::Options::quantizeDither(void) const return(static_cast(_imageInfo->dither)); } +void Magick::Options::quantizeDitherMethod(DitherMethod ditherMethod_) +{ + _quantizeInfo->dither_method=ditherMethod_; +} + +MagickCore::DitherMethod Magick::Options::quantizeDitherMethod(void) const +{ + return(_quantizeInfo->dither_method); +} + void Magick::Options::quantizeTreeDepth(size_t treeDepth_) { _quantizeInfo->tree_depth=treeDepth_;