java exec and /sur/bin/convert. exits status always 1

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?".
Post Reply
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

I am not a java programmer but it looks like you are lumping options and their arguments into a single command line argument. Separate them.

That is instead of

Code: Select all

"-quality 10"
use

Code: Select all

"-quality", "10"
Also you should read/create images in BEFORE operating on them, so place -flatten after the image file name. Also a -quality is an output setting you should do it just before the final argument to make this clear. Finally it is a good idea to specify the background color you want for the flattened image (before flattening).

Yes I know the documentation does not reflect this as it still have some old IM v5 methodology.

See IM examples 'Basics' for a general methodology of how IM processes images.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply