0

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

Community
  • 1
  • 1

1 Answers1

3

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.

Sage
  • 15,290
  • 3
  • 33
  • 38
  • That sounds like it's what I'm looking for, but from the page you linked to I cannot find any library or anything to download. Do you know how I would actually use this? –  Oct 10 '13 at 12:58
  • I tried (with tortoise), it says it's downloaded rev.3, but there is nothing in the folder. Seems like the project is empty. All there is is an update from 2011 which created the initial folder structure.. –  Oct 10 '13 at 13:12
  • it seems the author stopped developing then. There is no more library known to me for java now. Edited the answer to put `JMagick` source link, if that helps – Sage Oct 10 '13 at 13:18
  • By the way, when you say that JMagick is a wrapper, does that mean that I still have to install Imagemagick? Or is it a standalone library with the same functionality? –  Oct 10 '13 at 14:15
  • I have updated the answer. check. JMagick is not a stand alone library rather it is a JNI layer of ImageMagick C-API. i hope you know how JNI works. – Sage Oct 10 '13 at 16:49
  • I've used both and now am sticking to im4java rather than jmagick. First jmagick takes a lot of effort to setup, then it does not have the wide array of options that im4java has. And I've personally faced issues with the converted images (one in a thousand, the image is filled with black spots ). But JMagick is much faster. – anfab Oct 10 '13 at 18:12
  • Hmm.. Sounds very complex. I don't know anything about JNI, I barely know java.. It's weird to me that the type of distortion I'm looking for (which is a very basic warp/morph) is only available from a niche library like imagemagick. Which has no links to processing.org (the language I'm used to). You'd think that there would be something more widely supported, as I doubt that I'm the only one who wants to do stuff like this. Pretty complicated to have to figure out how to combine something like this with a processing.org project for a noob like me. Anyway, thank you very much for the help!! –  Oct 10 '13 at 19:11
  • we all are learning and to me adn that makes all of us noob. At the very least we are trying something to do when others are just humping and bumping. isn't that great? – Sage Oct 10 '13 at 19:16
  • :) Yeah it is. And if I get it to work it'll be that much more satisfying. Thanks again! –  Oct 10 '13 at 19:17