From: cristy Date: Thu, 25 Jul 2013 22:27:40 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3481 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5e877bd8701bc3f0ac1e9a3679a6cee64c69674;p=imagemagick --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 53ff07605..bd8b8ad05 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -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_ ) { diff --git a/Magick++/lib/Magick++/Image.h b/Magick++/lib/Magick++/Image.h index 3b15175eb..a134307ee 100644 --- a/Magick++/lib/Magick++/Image.h +++ b/Magick++/lib/Magick++/Image.h @@ -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