Package org.robolectric.nativeruntime
Class ImageDecoderNatives
java.lang.Object
org.robolectric.nativeruntime.ImageDecoderNatives
public final class ImageDecoderNatives extends Object
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 SummaryModifier and Type Method Description static 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- 
nCreatepublic static ImageDecoder nCreate(long asset, boolean preferAnimation, ImageDecoder.Source src) throws IOException- Throws:
- IOException
 
- 
nCreatepublic static ImageDecoder nCreate(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src) throws IOException- Throws:
- IOException
 
- 
nCreatepublic static ImageDecoder nCreate(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src) throws IOException- Throws:
- IOException
 
- 
nCreatepublic static ImageDecoder nCreate(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src) throws IOException- Throws:
- IOException
 
- 
nCreatepublic static ImageDecoder nCreate(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src) throws IOException- Throws:
- IOException
 
- 
nDecodeBitmappublic 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
- 
nClosepublic static void nClose(long nativePtr)
- 
nGetMimeType
- 
nGetColorSpace
 
-