Warnings should not stop the image conversion
Posted: 2013-10-22T23:43:52-07:00
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
Above code gives the output as 0.
Thanks in advanace
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();
Thanks in advanace