]> granicus.if.org Git - imagemagick/commitdiff
Reverting changes due to problems with implicit typecast.
authordirk <dirk@git.imagemagick.org>
Fri, 19 Dec 2014 08:39:16 +0000 (08:39 +0000)
committerdirk <dirk@git.imagemagick.org>
Fri, 19 Dec 2014 08:39:16 +0000 (08:39 +0000)
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Image.h

index 54b6a84cbebe992d714a5d6905bed6eda5467ebd..10228d3367c0cb70f92ae444671a7b0ee6a2e0fd 100644 (file)
@@ -183,28 +183,17 @@ Magick::Image::Image(const Blob &blob_,const Geometry &size_,
 Magick::Image::Image(const Geometry &size_,const Color &color_)
   : _imgRef(new ImageRef)
 {
-  try
-  {
-    read(size_,color_);
-  }
-  catch(const Warning &/*warning_*/)
-  {
-    // FIXME: need a way to report warnings in constructor
-  }
-  catch(const Error & /*error_*/)
-  {
-    // Release resources
-    delete _imgRef;
-    throw;
-  }
-}
+  // xc: prefix specifies an X11 color string
+  std::string imageSpec("xc:");
+  imageSpec+=color_;
 
-Magick::Image::Image(const Geometry &size_,const std::string &imageSpec_)
-  : _imgRef(new ImageRef)
-{
   try
   {
-    read(size_,imageSpec_);
+    // Set image size
+    size(size_);
+
+    // Initialize, Allocate and Read images
+    read(imageSpec);
   }
   catch(const Warning &/*warning_*/)
   {
@@ -3898,14 +3887,6 @@ void Magick::Image::read(const Blob &blob_,const Geometry &size_,
   read(blob_);
 }
 
-void Magick::Image::read(const Geometry &size_,const Color &color_)
-{
-  // xc: prefix specifies an X11 color string
-  std::string imageSpec("xc:");
-  imageSpec+=color_;
-  read(size_,imageSpec);
-}
-
 void Magick::Image::read(const Geometry &size_,const std::string &imageSpec_)
 {
   size(size_);
index 33df7e70bf04fbd1c29c5c3719b443322e4c09d5..f0a23686d9f6e414b18d1a1f6acf0ddfa7249dee 100644 (file)
@@ -76,9 +76,6 @@ namespace Magick
     // Construct a blank image canvas of specified size and color
     Image(const Geometry &size_,const Color &color_);
 
-    // Construct image of specified size from image file or image specification
-    Image(const Geometry &size_,const std::string &imageSpec_);
-
     // Copy constructor
     Image(const Image &image_);
 
@@ -1174,9 +1171,6 @@ namespace Magick
     void read(const Blob &blob_,const Geometry &size_,
       const std::string &magick_);
 
-    // Read a blank image canvas of specified size and color
-    void read(const Geometry &size_,const Color &color_);
-
     // Read single image frame of specified size into current object
     void read(const Geometry &size_,const std::string &imageSpec_);