From: dirk Date: Fri, 19 Dec 2014 08:39:16 +0000 (+0000) Subject: Reverting changes due to problems with implicit typecast. X-Git-Tag: 7.0.1-0~1594 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c65c4f062b27f5c5f668e009716bdddf2adf947;p=imagemagick Reverting changes due to problems with implicit typecast. --- diff --git a/Magick++/lib/Image.cpp b/Magick++/lib/Image.cpp index 54b6a84cb..10228d336 100644 --- a/Magick++/lib/Image.cpp +++ b/Magick++/lib/Image.cpp @@ -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_); diff --git a/Magick++/lib/Magick++/Image.h b/Magick++/lib/Magick++/Image.h index 33df7e70b..f0a23686d 100644 --- a/Magick++/lib/Magick++/Image.h +++ b/Magick++/lib/Magick++/Image.h @@ -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_);