blob: 5558f12b828c3d2d5c2f65d4181e1ba8fe9e52c7 [file] [log] [blame]
DRCf8e00552011-02-04 11:06:36 +00001TurboJPEG/OSS JNI Wrapper
2=========================
3
4TurboJPEG/OSS can optionally be built with a Java Native Interface wrapper,
5which allows the TurboJPEG/OSS dynamic library to be loaded and used directly
6from Java applications. The Java front end for this is defined in
7turbojpeg.java, which should be located in the same directory as this README
8file. turbojpeg.java is licensed under a BSD-style license, so it can be
9incorporated directly into both open source and proprietary projects without
10restriction.
11
12tjexample.java, which should also be located in the same directory as this
13README file, demonstrates how to use the TurboJPEG/OSS Java front end to
14compress and decompress JPEG images in memory.
15
16 javac *.java
17
18builds .class files for both the front end and example code.
19
20
21Note for OS X users
22-------------------
23
24/usr/lib, the directory under which libturbojpeg.dylib is installed on Mac
25systems, is not part of the normal Java library path. Thus, when running a
26Java application that uses TurboJPEG/OSS on Mac systems, you will need to pass
27an argument of -Djava.library.path=/usr/lib to java.
DRCed6526f2011-02-05 05:41:18 +000028
29
30Note for Solaris users
31----------------------
32
33/opt/libjpeg-turbo/lib, the directory under which libturbojpeg.so is installed
34on Solaris systems, is not part of the normal Java library path. Thus, when
35running a Java application that uses TurboJPEG/OSS on Solaris systems, you will
36need to pass an argument of -Djava.library.path=/opt/libjpeg-turbo/lib to java.
37If using a 64-bit data model, then instead pass an argument of
38-Djava.library.path=/opt/libjpeg-turbo/lib/amd64 to use the 64-bit version of
39libturbojpeg.so.