Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Senos
Post
by Senos » 2010-12-06T02:48:13-07:00
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.
anthony
Posts: 8883 Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia
Post
by anthony » 2010-12-06T20:45:52-07:00
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.
Senos
Post
by Senos » 2010-12-07T11:21:11-07:00
How can such a thing implemented in c++ ?
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
Post
by anthony » 2010-12-07T17:09:56-07:00
In C++ and other API's you should be checking the error returned from the image read process and act accordingly!