This commit is contained in:
tarsin committed 2022-07-24 21:41:53 +08:00
1 parent 89935b5639
commit 9d25376e1f
4 files changed
+45 -29

No files matched your search

@@ -57,6 +57,14 @@ public final class Image {
return nativeDecode(fd, partially);
}
/**
* Decode image from {@code InputStream}
*/
@Nullable
public static Image decode(Integer fd, boolean partially) {
return nativeDecodeFdInt(fd, partially);
}
/**
* Create a plain image from Bitmap
*/
@@ -75,6 +83,8 @@ public final class Image {
private static native Image nativeDecode(FileDescriptor fd, boolean partially);
private static native Image nativeDecodeFdInt(int fd, boolean partially);
private static native Image nativeCreate(Bitmap bitmap);
private static native int nativeGetByteCount(long nativePtr, int format);