You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
764 B
27 lines
764 B
import com.google.webp.libwebp; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
public class libwebp_jni_example { |
|
static { |
|
try { |
|
System.load("/usr/lib64/libwebp-java/libwebp_jni.so"); |
|
} catch (UnsatisfiedLinkError e) { |
|
System.load("/usr/lib/libwebp-java/libwebp_jni.so"); |
|
} |
|
} |
|
|
|
/** |
|
* 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]); |
|
} |
|
} |
|
}
|
|
|