BitmapFactory

1.说明:
public class BitmapFactory

extends Object//继承

java.lang.Object

↳android.graphics.BitmapFactory

Creates Bitmap objects from various sources, including files, streams, and byte-arrays.//从各种源创建位图对象,包括文件,流和字节数组。

2.嵌套类:BitmapFactory.Options
3.构造函数:Public constructors:BitmapFactory()
4.公用方法:Public methods:
static Bitmap decodeByteArray(byte[] data, int offset, int length,BitmapFactory.Options opts)

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

从指定的字节数组解码一个不可变的位图。

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

static Bitmap decodeFile(String pathName)

将文件路径解码为位图。

static Bitmap decodeFileDescriptor(FileDescriptor fd)

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

从文件描述符解码位图。

static Bitmap decodeResource(Recources res, int id)

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

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

从InputStream解码一个新的Bitmap。

static Bitmap decodeStream(InputStream is)

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

将输入流解码为位图。

posted @ 2021-09-05 17:09  -Rocky-  阅读(101)  评论(0编辑  收藏  举报