mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
swig: add python (decode) support
similar to Java, simple interface only Change-Id: I8a3d344e5d89f73627e4e0cb2067512260d46fdd
This commit is contained in:
17
swig/README
17
swig/README
@ -37,3 +37,20 @@ public class libwebp_jni_example {
|
||||
|
||||
$ javac -cp libwebp.jar libwebp_jni_example.java
|
||||
$ java -Djava.library.path=. -cp libwebp.jar:. libwebp_jni_example
|
||||
|
||||
Python SWIG bindings:
|
||||
---------------------
|
||||
$ python setup.py build_ext
|
||||
$ python setup.py install --prefix=pylocal
|
||||
|
||||
-------------------------------------- BEGIN PSEUDO EXAMPLE
|
||||
import glob
|
||||
import sys
|
||||
sys.path.append(glob.glob('pylocal/lib/python*/site-packages')[0])
|
||||
|
||||
from com.google.webp import libwebp
|
||||
print "libwebp decoder version: %x" % libwebp.WebPGetDecoderVersion()
|
||||
|
||||
print "libwebp attributes:"
|
||||
for attr in dir(libwebp): print attr
|
||||
-------------------------------------- END PSEUDO EXAMPLE
|
||||
|
Reference in New Issue
Block a user