libwebp

package
v0.0.0-...-0149753 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2022 License: MIT, BSD-3-Clause Imports: 2 Imported by: 0

README

Building:
=========

JNI SWIG bindings:
------------------
 $ 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
import com.google.webp.libwebp;

import java.lang.reflect.Method;

public class libwebp_jni_example {
  static {
    System.loadLibrary("webp_jni");
  }

  /**
   * usage: java -cp libwebp.jar:. libwebp_jni_example
   */
  public static void main(String argv[]) {
    final int version = libwebp.WebPGetDecoderVersion();
    System.out.println("libwebp version: " + Integer.toHexString(version));

    System.out.println("libwebp methods:");
    final Method[] libwebpMethods = libwebp.class.getDeclaredMethods();
    for (int i = 0; i < libwebpMethods.length; i++) {
      System.out.println(libwebpMethods[i]);
    }
  }
}
-------------------------------------- END PSEUDO 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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SwigCgocall

func SwigCgocall()

func SwigCgocallBack

func SwigCgocallBack()

func SwigCgocallBackDone

func SwigCgocallBackDone()

func SwigCgocallDone

func SwigCgocallDone()

func WebPGetDecoderVersion

func WebPGetDecoderVersion() int

func WebPGetInfo

func WebPGetInfo(webp []byte) (ok bool, width int, height int)

WebPGetInfo has 2 output parameters, provide a version in the more natural go idiom:

func Wrapped_WebPGetInfo

func Wrapped_WebPGetInfo(string, []int, []int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL