BitmapFactory


public class BitmapFactory
extends Object

java.lang.Object
   ↳ android.graphics.BitmapFactory


Creates Bitmap objects from various sources, including files, streams, and byte-arrays.

Summary

Nested classes

class BitmapFactory.Options

 

Public constructors

BitmapFactory()

Public methods

static Bitmap decodeByteArray(byte[] data, int offset, int length, BitmapFactory.Options opts)

Decode an immutable bitmap from the specified byte array.

static Bitmap decodeByteArray(byte[] data, int offset, int length)

Decode an immutable bitmap from the specified byte array.

static Bitmap decodeFile(String pathName, BitmapFactory.Options opts)

Decode a file path into a bitmap.

static Bitmap decodeFile(String pathName)

Decode a file path into a bitmap.

static Bitmap decodeFileDescriptor(FileDescriptor fd)

Decode a bitmap from the file descriptor.

static Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, BitmapFactory.Options opts)

Decode a bitmap from the file descriptor.

static Bitmap decodeResource(Resources res, int id)

Synonym for decodeResource(Resources,int,android.graphics.BitmapFactory.Options) with null Options.

static Bitmap decodeResource(Resources res, int id, BitmapFactory.Options opts)

Synonym for opening the given resource and calling decodeResourceStream(Resources, TypedValue, InputStream, Rect, Options).

static Bitmap decodeResourceStream(Resources res, TypedValue value, InputStream is, Rect pad, BitmapFactory.Options opts)

Decode a new Bitmap from an InputStream.

static Bitmap decodeStream(InputStream is)

Decode an input stream into a bitmap.

static Bitmap decodeStream(InputStream is, Rect outPadding, BitmapFactory.Options opts)

Decode an input stream into a bitmap.

Inherited methods