How would I use the imagemagick library with proce

2019-09-08 09:57发布

问题:

I want to use the imagemagick library (more specifically: the shepards distortion part of it) with processing.org. Does anyone know how to do that? Or if that is not possible, does anyone know of another library that can do this type of distortion?

I've already found these related questions: one, two and three

回答1:

Try to Look into the JMagick, it is a wrapper of ImageMagick. However if you wish an interface to the ImageMagick commandline im4java API should be useful. I didn't use im4java myself. But the following portion is taken from the site:

JMagick is a thin JNI layer above the ImageMagick C-API. im4java in contrast just generates the commandline for the ImageMagick commands and passes the generated line to the selected IM-command (using the java.lang.ProcessBuilder.start()-method).

Disadvantages of the approach: your are limited to the capabilities of the IM commands. With JMagick, you have access to the low-level interface of IM and therefore you have a very detailed control of the processing of images. And you have better performance.