Skip to content

TurboJPEG Bindings 1.1

dromagnoli edited this page Jan 4, 2013 · 1 revision

Java Bindings

1.1

The TurboJpegLibrary.java class available in this module has been produced using JNAerator + bridj. Then it has been slightly refined to fix a few naming convention and imports.

The basic steps used to produce that was like this:

  • Build bridJ bindings with JNAerator.jar
available at http://nativelibs4java.sourceforge.net/maven/com/jnaerator/jnaerator/0.9.9-SNAPSHOT/jnaerator-0.9.9-SNAPSHOT-shaded.jar
java -jar jnaerator-0.9.9-SNAPSHOT-shaded.jar -I. -library turbojpeg turbojpeg.h 
       -o /path/where/to/produce bindings -beautifyNames -v -runtime BridJ -package
       it.geosolutions.imageio.plugins.turbojpeg -nocpp
  • Fix the java binding class:
    • Fix the CLong import into tjCompress method (switch from annotation to real class org.bridj.CLong)
    • Rename the tJBUFSIZE and tJBUFSIZEYUV methods to all UPPERcase chars and set long as return type
Clone this wiki locally