Package org.robolectric.nativeruntime
Class ImageDecoderNatives
- java.lang.Object
-
- org.robolectric.nativeruntime.ImageDecoderNatives
-
public final class ImageDecoderNatives extends Object
Native methods forImageDecoderJNI 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
All Methods Static Methods Concrete Methods Modifier 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 Detail
-
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
public static Size nGetSampledSize(long nativePtr, int sampleSize)
-
nGetPadding
public static void nGetPadding(long nativePtr, Rect outRect)
-
nClose
public static void nClose(long nativePtr)
-
nGetMimeType
public static String nGetMimeType(long nativePtr)
-
nGetColorSpace
public static ColorSpace nGetColorSpace(long nativePtr)
-
-