Hello Wonderful ImageMagick World
Is there any Magick++ method that reads image from a location (C:/images/test.jpg) and returns bool if the image is found ?
I have an if statement and I would like to know if the image can be read before I proceed.
How to check if image can be read
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to check if image can be read
Add -regard-warnings and check the status result of your image processing.
In a script this is typically to read the image into a temporary file while also extracting basic information such as image width and height.
In a script this is typically to read the image into a temporary file while also extracting basic information such as image width and height.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How to check if image can be read
How can such a thing implemented in c++ ?
I thought that was for command line only
Thanks for your kind reply
I thought that was for command line only
Thanks for your kind reply
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to check if image can be read
In C++ and other API's you should be checking the error returned from the image read process and act accordingly!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/