]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 25 Jul 2013 22:27:40 +0000 (22:27 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 25 Jul 2013 22:27:40 +0000 (22:27 +0000)
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Image.h

index 53ff076051b4e6d855cc18e3e910e072fbb27cba..bd8b8ad051f50f9972c0251e03deacb920e4fd87 100644 (file)
@@ -481,6 +481,21 @@ void Magick::Image::annotate ( const std::string &text_,
   (void) DestroyExceptionInfo( &exceptionInfo );
 }
 
+void Magick::Image::artifact ( const std::string &name_,
+                               const std::string &value_ )
+{
+  modifyImage();
+  (void) SetImageArtifact ( image(), name_.c_str(), value_.c_str() );
+}
+
+std::string Magick::Image::artifact ( const std::string &name_ )
+{
+  const char *value = GetImageArtifact ( image(), name_.c_str() );
+  if (value)
+    return std::string( value );
+  return std::string( );
+}
+
 // Blur image
 void Magick::Image::blur( const double radius_, const double sigma_ )
 {
index 3b15175eb2a99c0f9872866d5cb942eb404e0c04..a134307ee03ee30000ebb1cc6684c425a0046df0 100644 (file)
@@ -162,6 +162,13 @@ namespace Magick
     // gravity.
     void            annotate ( const std::string &text_,
              const GravityType gravity_ );
+
+    // Inserts the artifact with the specified name and value into
+    // the artifact tree of the image.
+    void            artifact ( const std::string &name_,
+                               const std::string &value_ );
+    // Returns the value of the artifact with the specified name.
+    std::string     artifact ( const std::string &name_ );
     
     // Blur image with specified blur factor
     // The radius_ parameter specifies the radius of the Gaussian, in