add swig interface

Currently only supports a subset of decode functions and likely only
works fully for java.

For java bindings:
The generated java source can be compiled and the class files added to
libwebp.jar.
The generated jni source can be compiled to, e.g., libwebp_jni.so, which
can then be loaded via System.loadLibrary("webp_jni").

Change-Id: I8225933cbaf85c9cfa4b78c2e5f167cee8b62408
This commit is contained in:
James Zern
2011-05-06 13:09:56 -07:00
parent e9273902f1
commit f6fb3877ed
2 changed files with 135 additions and 0 deletions

20
README
View File

@ -76,6 +76,26 @@ Note: The encoding and decoding libraries are compiled separately
can be installed independently using a minor modifications in the
corresponding Makefile.am configure files (see comments there).
SWIG bindings:
--------------
To generate language bindings from swig/libwebp.i swig-1.3
(http://www.swig.org) is required. 2.0 may work, but has not been tested.
Currently from the decode interface the following functions are mapped:
WebPGetDecoderVersion
WebPGetInfo
WebPDecodeRGB
WebPDecodeRGBA
WebPDecodeBGR
WebPDecodeBGRA
Java bindings:
To build the swig-generated JNI wrapper code at least JDK-1.5 (or equivalent)
is necessary for enum support. The output is intended to be a shared object /
DLL that can be loaded via System.loadLibrary("webp_jni").
Encoding tool:
==============