|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectnet.tsz.afinal.bitmap.core.BitmapDecoder
public class BitmapDecoder
| 方法摘要 | |
|---|---|
static int |
calculateInSampleSize(BitmapFactory.Options options,
int reqWidth,
int reqHeight)
Calculate an inSampleSize for use in a BitmapFactory.Options object when decoding
bitmaps using the decode* methods from BitmapFactory. |
static Bitmap |
decodeSampledBitmapFromDescriptor(java.io.FileDescriptor fileDescriptor,
int reqWidth,
int reqHeight)
Decode and sample down a bitmap from a file input stream to the requested width and height. |
static Bitmap |
decodeSampledBitmapFromFile(java.lang.String filename,
int reqWidth,
int reqHeight)
Decode and sample down a bitmap from a file to the requested width and height. |
static Bitmap |
decodeSampledBitmapFromResource(Resources res,
int resId,
int reqWidth,
int reqHeight)
Decode and sample down a bitmap from resources to the requested width and height. |
| 从类 java.lang.Object 继承的方法 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 方法详细信息 |
|---|
public static Bitmap decodeSampledBitmapFromResource(Resources res,
int resId,
int reqWidth,
int reqHeight)
res - The resources object containing the image dataresId - The resource id of the image datareqWidth - The requested width of the resulting bitmapreqHeight - The requested height of the resulting bitmap
public static Bitmap decodeSampledBitmapFromFile(java.lang.String filename,
int reqWidth,
int reqHeight)
filename - The full path of the file to decodereqWidth - The requested width of the resulting bitmapreqHeight - The requested height of the resulting bitmap
public static Bitmap decodeSampledBitmapFromDescriptor(java.io.FileDescriptor fileDescriptor,
int reqWidth,
int reqHeight)
fileDescriptor - The file descriptor to read fromreqWidth - The requested width of the resulting bitmapreqHeight - The requested height of the resulting bitmap
public static int calculateInSampleSize(BitmapFactory.Options options,
int reqWidth,
int reqHeight)
BitmapFactory.Options object when decoding
bitmaps using the decode* methods from BitmapFactory. This implementation calculates
the closest inSampleSize that will result in the final decoded bitmap having a width and
height equal to or larger than the requested width and height. This implementation does not
ensure a power of 2 is returned for inSampleSize which can be faster when decoding but
results in a larger bitmap which isn't as useful for caching purposes.
options - An options object with out* params already populated (run through a decode*
method with inJustDecodeBounds==truereqWidth - The requested width of the resulting bitmapreqHeight - The requested height of the resulting bitmap
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||