From: dirk Date: Wed, 14 May 2014 05:13:39 +0000 (+0000) Subject: Fixed/added properties that should set artifacts. X-Git-Tag: 7.0.1-0~2347 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=019efc8c2270c29096a4c8975cde80a84da06ba0;p=imagemagick Fixed/added properties that should set artifacts. --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 70690504c..251c11849 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -398,6 +398,16 @@ size_t Magick::Image::animationIterations(void) const return(constImage()->iterations); } +void Magick::Image::attenuate(const double attenuate_) +{ + char + value[MaxTextExtent]; + + modifyImage(); + FormatLocaleString(value,MaxTextExtent,"%.20g",attenuate_); + (void) SetImageArtifact(image(),"attenuate",value); +} + void Magick::Image::backgroundColor(const Color &backgroundColor_) { modifyImage(); @@ -828,8 +838,13 @@ MagickCore::MagickSizeType Magick::Image::fileSize(void) const void Magick::Image::fillColor(const Magick::Color &fillColor_) { + std::string + value; + modifyImage(); options()->fillColor(fillColor_); + value=fillColor_; + artifact("fill",value); } Magick::Color Magick::Image::fillColor(void) const @@ -977,6 +992,15 @@ MagickCore::DisposeType Magick::Image::gifDisposeMethod(void) const return(constImage()->dispose); } +void Magick::Image::highlightColor(const Color color_) +{ + std::string + value; + + value=color_; + artifact("highlight-color",value); +} + void Magick::Image::iccColorProfile(const Magick::Blob &colorProfile_) { profile("icm",colorProfile_); @@ -1071,9 +1095,9 @@ void Magick::Image::label(const std::string &label_) { modifyImage(); GetPPException; - SetImageProperty(image(),"Label",NULL,&exceptionInfo); + (void) SetImageProperty(image(),"Label",NULL,&exceptionInfo); if (label_.length() > 0) - SetImageProperty(image(),"Label",label_.c_str(),&exceptionInfo); + (void) SetImageProperty(image(),"Label",label_.c_str(),&exceptionInfo); ThrowPPException; } @@ -1092,6 +1116,15 @@ std::string Magick::Image::label(void) const return(std::string()); } +void Magick::Image::lowlightColor(const Color color_) +{ + std::string + value; + + value=color_; + artifact("lowlight-color",value); +} + void Magick::Image::magick(const std::string &magick_) { modifyImage(); @@ -1328,8 +1361,13 @@ bool Magick::Image::strokeAntiAlias(void) const void Magick::Image::strokeColor(const Magick::Color &strokeColor_) { + std::string + value; + modifyImage(); options()->strokeColor(strokeColor_); + value=strokeColor_; + artifact("stroke",value); } Magick::Color Magick::Image::strokeColor(void) const @@ -1427,8 +1465,13 @@ Magick::Image Magick::Image::strokePattern(void) const void Magick::Image::strokeWidth(const double strokeWidth_) { + char + value[MaxTextExtent]; + modifyImage(); options()->strokeWidth(strokeWidth_); + FormatLocaleString(value,MaxTextExtent,"%.20g",strokeWidth_); + (void) SetImageArtifact(image(),"strokewidth",value); } double Magick::Image::strokeWidth(void) const diff --git a/Magick++/lib/Magick++/Image.h b/Magick++/lib/Magick++/Image.h index c10344b00..edb70e995 100644 --- a/Magick++/lib/Magick++/Image.h +++ b/Magick++/lib/Magick++/Image.h @@ -143,6 +143,9 @@ namespace Magick void animationDelay(const size_t delay_); size_t animationDelay(void) const; + // Lessen (or intensify) when adding noise to an image. + void attenuate(const double attenuate_); + // Number of iterations to loop an animation (e.g. Netscape loop // extension) for. void animationIterations(const size_t iterations_); @@ -307,6 +310,9 @@ namespace Magick void gifDisposeMethod(const DisposeType disposeMethod_); DisposeType gifDisposeMethod(void) const; + // When comparing images, emphasize pixel differences with this color. + void highlightColor(const Color color_); + // ICC color profile (BLOB) void iccColorProfile(const Blob &colorProfile_); Blob iccColorProfile(void) const; @@ -331,6 +337,9 @@ namespace Magick void label(const std::string &label_); std::string label(void) const; + // When comparing images, de-emphasize pixel differences with this color. + void lowlightColor(const Color color_); + // File type magick identifier (.e.g "GIF") void magick(const std::string &magick_); std::string magick(void) const;