I just started experimenting with ImageMagick.
I am curious if there is an easy way to programmatically discern if an operation worked properly or not.
Is these a status field available after an ImageMagick command is processed?
I have read a bit about logging and debug, but I don't quite understand things.
Thanks,
Brad
How to Discern Status of Operation
Re: How to Discern Status of Operation
How are you using Imagemagick?
At the end you either get a 1 or 0 for sucess or fail although I can not remember which is which; but a good indication is if you have a new image or not
At the end you either get a 1 or 0 for sucess or fail although I can not remember which is which; but a good indication is if you have a new image or not
Re: How to Discern Status of Operation
Bonzo,
I was hoping to use ImageMagick as part of an "unattended" process that runs at night. Part of this larger process will be to trim down serveral generated images to a better size.
In your post, you mention that you get either a 0 or a 1. This sounds like exactly what I am looking for. Where are these values stored? How can I access these values?
Thanks,
Brad
I was hoping to use ImageMagick as part of an "unattended" process that runs at night. Part of this larger process will be to trim down serveral generated images to a better size.
In your post, you mention that you get either a 0 or a 1. This sounds like exactly what I am looking for. Where are these values stored? How can I access these values?
Thanks,
Brad
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to Discern Status of Operation
Without knowing what you are using to call ImageMagick it is hard to help you.
You can also do various checks of results, as a 'sanity check'.
Typically if IM does fail it will raise an exception (A error of various levels from warning through to fatal).
If no exception is raised then you have a bug!
This is over and above valid return status of a operation, whcih either returnsa Boolean of true (good) or false (bad), when an operation is applied to the given image, OR a new image/NULL if that is what is needed.
Again it is hard to help without knowing your call environment.
You can also do various checks of results, as a 'sanity check'.
Typically if IM does fail it will raise an exception (A error of various levels from warning through to fatal).
If no exception is raised then you have a bug!
This is over and above valid return status of a operation, whcih either returnsa Boolean of true (good) or false (bad), when an operation is applied to the given image, OR a new image/NULL if that is what is needed.
Again it is hard to help without knowing your call environment.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: How to Discern Status of Operation
Anthony,
Sorry, I should have spelled things out better.
I am planning to call ImageMagick from a Microsoft Access application (VBA). The purpose of the call is to trim off excess white space from images.
I have the call from Access set up and working. This will be part of an unattended automated process. I am trying to figure out how to capture the "return code" from IM in the event that something does not work properly.
Thanks for your assistance.
Brad
Sorry, I should have spelled things out better.
I am planning to call ImageMagick from a Microsoft Access application (VBA). The purpose of the call is to trim off excess white space from images.
I have the call from Access set up and working. This will be part of an unattended automated process. I am trying to figure out how to capture the "return code" from IM in the event that something does not work properly.
Thanks for your assistance.
Brad
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to Discern Status of Operation
Capturing the exception probably makes the best sense.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to Discern Status of Operation
Possibly see -regard-warnings at http://www.imagemagick.org/Usage/basics/#controls