Import 'javax.media' in Python mode

Hi,

Just a quick question –

I would like to import the PerspectiveTransform and WarpPerspective classes from javax.media.jai in Python mode.

Simply writing from javax.media.jai import PerspectiveTransform, WarpPerspective returns an error:

ImportError: No module named media

What should I do to access / install / load this ‘media’ module in Python mode ?

For the moment I’m getting around this issue by first importing the Keystone library but it would be nice if I could directly access this “media” module.

1 Like

Hi @solub!

I have not tried on Java mode but maybe javax.media.jai could be missing from the Processing standard libraries, according to this:

I’m no expert on it (I hope someone can correct me if I’m wrong), but If you can find a .jar file of the library, you can add it to your sketchbook under libraries/lib_name/library/lib_name.jar and then use add_library("lib_name")on your sketch.

HTH

1 Like

I’ve found these related links: :link:

Oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-client-419417.html

Download.Java.net/media/jai/javadoc/1.1.3/jai-apidocs/index.html

3 Likes