DRC | f8e0055 | 2011-02-04 11:06:36 +0000 | [diff] [blame^] | 1 | TurboJPEG/OSS JNI Wrapper |
| 2 | ========================= |
| 3 | |
| 4 | TurboJPEG/OSS can optionally be built with a Java Native Interface wrapper, |
| 5 | which allows the TurboJPEG/OSS dynamic library to be loaded and used directly |
| 6 | from Java applications. The Java front end for this is defined in |
| 7 | turbojpeg.java, which should be located in the same directory as this README |
| 8 | file. turbojpeg.java is licensed under a BSD-style license, so it can be |
| 9 | incorporated directly into both open source and proprietary projects without |
| 10 | restriction. |
| 11 | |
| 12 | tjexample.java, which should also be located in the same directory as this |
| 13 | README file, demonstrates how to use the TurboJPEG/OSS Java front end to |
| 14 | compress and decompress JPEG images in memory. |
| 15 | |
| 16 | javac *.java |
| 17 | |
| 18 | builds .class files for both the front end and example code. |
| 19 | |
| 20 | |
| 21 | Note for OS X users |
| 22 | ------------------- |
| 23 | |
| 24 | /usr/lib, the directory under which libturbojpeg.dylib is installed on Mac |
| 25 | systems, is not part of the normal Java library path. Thus, when running a |
| 26 | Java application that uses TurboJPEG/OSS on Mac systems, you will need to pass |
| 27 | an argument of -Djava.library.path=/usr/lib to java. |