]> granicus.if.org Git - imagemagick/commitdiff
Fixed/added properties that should set artifacts.
authordirk <dirk@git.imagemagick.org>
Wed, 14 May 2014 05:13:39 +0000 (05:13 +0000)
committerdirk <dirk@git.imagemagick.org>
Wed, 14 May 2014 05:13:39 +0000 (05:13 +0000)
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Image.h

index 70690504cd1c919b8adffcc718932db1e527e09b..251c1184982d0dd3f0b0cd4c2a7efec2c08cf634 100644 (file)
@@ -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
index c10344b00dc073925d260ace93305ef30e1ed367..edb70e995ac11b3bf6cae6734abe1bb146a857da 100644 (file)
@@ -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;