mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
Markdownify libwebp docs and reorganize them.
Break the main README into into multiple pages in the doc/ directory, except for the tests, swig and webp_js docs which are in the corresponding directories. The webp mux doc is merged into the API doc and the tools doc. Change-Id: Ia407617dd88094f4662841d37947cfef80799914
This commit is contained in:
committed by
Maryla Ustarroz-Calonge
parent
b4533debd9
commit
54e61a3864
@ -1,15 +1,20 @@
|
||||
Building:
|
||||
=========
|
||||
# SWIG bindings
|
||||
|
||||
JNI SWIG bindings:
|
||||
------------------
|
||||
## Building
|
||||
|
||||
### JNI SWIG bindings
|
||||
|
||||
```shell
|
||||
$ gcc -shared -fPIC -fno-strict-aliasing -O2 \
|
||||
-I/path/to/your/jdk/includes \
|
||||
libwebp_java_wrap.c \
|
||||
-lwebp \
|
||||
-o libwebp_jni.so
|
||||
```
|
||||
|
||||
-------------------------------------- BEGIN PSEUDO EXAMPLE
|
||||
Example usage:
|
||||
|
||||
```java
|
||||
import com.google.webp.libwebp;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
@ -33,17 +38,23 @@ public class libwebp_jni_example {
|
||||
}
|
||||
}
|
||||
}
|
||||
-------------------------------------- END PSEUDO EXAMPLE
|
||||
```
|
||||
|
||||
```shell
|
||||
$ javac -cp libwebp.jar libwebp_jni_example.java
|
||||
$ java -Djava.library.path=. -cp libwebp.jar:. libwebp_jni_example
|
||||
```
|
||||
|
||||
Python SWIG bindings:
|
||||
---------------------
|
||||
### Python SWIG bindings:
|
||||
|
||||
```shell
|
||||
$ python setup.py build_ext
|
||||
$ python setup.py install --prefix=pylocal
|
||||
```
|
||||
|
||||
-------------------------------------- BEGIN PSEUDO EXAMPLE
|
||||
Example usage:
|
||||
|
||||
```python
|
||||
import glob
|
||||
import sys
|
||||
sys.path.append(glob.glob('pylocal/lib/python*/site-packages')[0])
|
||||
@ -53,4 +64,4 @@ 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