Class of snx.android.hwui · Image.java
public final class Image
The image codec of BitmapFactory and Bitmap.compress, the HLE of Skia's codecs over FFmpeg (src/android/hwui/image.c). Pixels are Android's int colors, 0xAARRGGBB, not premultiplied.
public static final int PNG = 1 sourceThe formats, as info[2] gives them and encode takes them.
public static final int JPEG = 2 sourceThe formats, as info[2] gives them and encode takes them.
public static final int WEBP = 3 sourceThe formats, as info[2] gives them and encode takes them.
public static final int GIF = 4 sourceThe formats, as info[2] gives them and encode takes them.
public static final int BMP = 5 sourceThe formats, as info[2] gives them and encode takes them.
public static String mimeType(int format) sourceThe MIME type of a format, null for none.
public static native int[] decode(byte[] data, int offset, int length, int sample, float scale, int[] info) native sourceThe pixels of the image in data[offset, offset + length), its size divided by sample (rounded up), then scaled by scale (rounded to the nearest pixel), as Skia's sampled decode and BitmapFactory's density scale give it. info gets {width, height, format, has alpha} of those pixels. A sample of 0 gives only the size and format, and null. Null when the image does not decode.
public static native byte[] encode(int[] pixels, int width, int height, int format, int quality, boolean alpha) native sourceThe pixels (width * height) as a PNG (with an alpha channel when alpha) or a JPEG of quality 0 to 100, or null.
Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.