]> granicus.if.org Git - imagemagick/commitdiff
Added method to retrieve profile names to STL.h
authordirk <dirk@git.imagemagick.org>
Tue, 22 Oct 2013 14:47:12 +0000 (14:47 +0000)
committerdirk <dirk@git.imagemagick.org>
Tue, 22 Oct 2013 14:47:12 +0000 (14:47 +0000)
Magick++/lib/Magick++/STL.h

index 8c00d5431529c52271a0f86da441bd131066c85b..95ef0e1719c56515442f96602323025e964db8dd 100644 (file)
@@ -2504,6 +2504,24 @@ namespace Magick
     (void) MagickCore::DestroyExceptionInfo( &exceptionInfo );
   }
 
+  // Adds the names of the profiles from the image to the container.
+  template <class Container>
+  void profileNames( Container *names_, const Image* image_ )
+  {
+    const char*
+      name;
+
+    names_->clear();
+
+    MagickCore::ResetImageProfileIterator( image_->constImage() );\r
+    name=MagickCore::GetNextImageProfile( image_->constImage() );\r
+    while (name != (const char *) NULL)\r
+    {\r
+      names_->push_back( std::string(name) );\r
+      name=MagickCore::GetNextImageProfile( image_->constImage() );\r
+    }\r
+  }
+
   // Quantize colors in images using current quantization settings
   // Set measureError_ to true in order to measure quantization error
   template <class InputIterator>