I'm coding an application using Java and I need to resize some images, so I've been learning about ImageMagick. The command I need to use for my purposes is:
convert -resize 500x500\> -quality 85% -strip -interlace Plane -define jpeg:dot-method=float source.jpg destination.jpg
Using Java, I think I could use:
Runtime.getRuntime().exec(command);
Isn't it?
But, if I rather user an API like JMagick... how could I proceed to compose what I want to do?
Thank you very much! Regards.
After investigate and read a lot from IM4J API, I did this:
And that's all! :)
If you want to use mogrify command, you can re-use the IMOperation object and just have to do this:
But remember that mogrify command doesn't have a second pic input parameter.