Warnings should not stop the image conversion

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
sireeshala
Posts: 38
Joined: 2013-09-27T04:00:05-07:00
Authentication code: 6789

Warnings should not stop the image conversion

Post by sireeshala »

Hi ,
One image, able to open in any other image viewer though Image::read ( const std::string &imageSpec_ ) throwing an Warning exception with out updating image object.
And after handling that exception also i am unable to get the information about the image (image.density,image.type etc are set to default values).
Perhaps There should be an option to ignore the warnings in Image::read to get the conversion succeed.

https://www.dropbox.com/s/bc5td1mufn94a5i/181459.JPG

Code: Select all

Image image;
        try {
	          image.read( "181459.JPG" ); 
         }
        catch( Warning &error_ )
	      {
		  cout << "Caught warning: " << error_.what() << endl;
	      }
        Geometry gImgDensity = image.density();
        cout<<"image density"<<gImgDensity.width()<<gImgDensity.height();
Above code gives the output as 0.

Thanks in advanace
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Warnings should not stop the image conversion

Post by dlemstra »

I can confirm this is a bug in Magick++, it will be fixed in a couple of days.

Edit: I have committed my changes, this will be fixed in the next version of ImageMagick.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
sireeshala
Posts: 38
Joined: 2013-09-27T04:00:05-07:00
Authentication code: 6789

Re: Warnings should not stop the image conversion

Post by sireeshala »

When the next version will be available?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Warnings should not stop the image conversion

Post by fmw42 »

Try the latest beta and see if that works.

http://www.imagemagick.org/download/beta/
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Warnings should not stop the image conversion

Post by dlemstra »

I apologize for not including the version number. It has been fixed since 6.8.7-3.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply