Package org.robolectric.nativeruntime
Class ImageDecoderNatives
java.lang.Object
org.robolectric.nativeruntime.ImageDecoderNatives
Native methods for
ImageDecoder JNI registration.
Native method signatures are derived from https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/graphics/java/android/graphics/ImageDecoder.java
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidnClose(long nativePtr) static ImageDecodernCreate(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src) static ImageDecodernCreate(long asset, boolean preferAnimation, ImageDecoder.Source src) static ImageDecodernCreate(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src) static ImageDecodernCreate(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src) static ImageDecodernCreate(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src) static BitmapnDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, long desiredColorSpace, boolean extended) static ColorSpacenGetColorSpace(long nativePtr) static StringnGetMimeType(long nativePtr) static voidnGetPadding(long nativePtr, Rect outRect) static SizenGetSampledSize(long nativePtr, int sampleSize)
-
Method Details
-
nCreate
public static ImageDecoder nCreate(long asset, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
public static ImageDecoder nCreate(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
public static ImageDecoder nCreate(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
public static ImageDecoder nCreate(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
public static ImageDecoder nCreate(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nDecodeBitmap
public static Bitmap nDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, long desiredColorSpace, boolean extended) throws IOException - Throws:
IOException
-
nGetSampledSize
-
nGetPadding
-
nClose
public static void nClose(long nativePtr) -
nGetMimeType
-
nGetColorSpace
-