ImageDecoder

Class of android.graphics · ImageDecoder.java · Android's reference

public final class ImageDecoder implements AutoCloseable

Decodes images into bitmaps and drawables, through BitmapFactory and the runtime's codec.

Nested types

Fields

public static final int ALLOCATOR_DEFAULT = 0 source
public static final int ALLOCATOR_SOFTWARE = 1 source
public static final int ALLOCATOR_SHARED_MEMORY = 2 source
public static final int ALLOCATOR_HARDWARE = 3 source
public static final int MEMORY_POLICY_DEFAULT = 1 source
public static final int MEMORY_POLICY_LOW_RAM = 0 source

Methods

public static Source createSource(ContentResolver cr, Uri uri) source
public static Source createSource(Resources res, int resId) source
public static Source createSource(File file) source
public static Source createSource(byte[] data) source
public static Source createSource(byte[] data, int offset, int length) source
public void setTargetSize(int width, int height) source
public void setTargetSampleSize(int sampleSize) source
public void setAllocator(int allocator) source
public int getAllocator() source
public void setMutableRequired(boolean mutable) source
public boolean isMutableRequired() source
public void close() empty body source
public static Bitmap decodeBitmap(Source src) throws IOException source
public static Bitmap decodeBitmap(Source src, OnHeaderDecodedListener listener) throws IOException source
public static Drawable decodeDrawable(Source src) throws IOException source
public static Drawable decodeDrawable(Source src, OnHeaderDecodedListener listener) throws IOException source

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.