public class BaseImageDecoder extends Object implements ImageDecoder
Bitmap, scales them to needed sizeImageDecodingInfo| 限定符和类型 | 类和说明 |
|---|---|
protected static class |
BaseImageDecoder.ExifInfo |
protected static class |
BaseImageDecoder.ImageFileInfo |
| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
ERROR_CANT_DECODE_IMAGE |
protected static String |
ERROR_NO_IMAGE_STREAM |
protected static String |
LOG_FLIP_IMAGE |
protected static String |
LOG_ROTATE_IMAGE |
protected static String |
LOG_SCALE_IMAGE |
protected static String |
LOG_SUBSAMPLE_IMAGE |
protected boolean |
loggingEnabled |
| 构造器和说明 |
|---|
BaseImageDecoder(boolean loggingEnabled) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected android.graphics.Bitmap |
considerExactScaleAndOrientatiton(android.graphics.Bitmap subsampledBitmap,
ImageDecodingInfo decodingInfo,
int rotation,
boolean flipHorizontal) |
android.graphics.Bitmap |
decode(ImageDecodingInfo decodingInfo)
Decodes image from URI into
Bitmap. |
protected BaseImageDecoder.ExifInfo |
defineExifOrientation(String imageUri) |
protected BaseImageDecoder.ImageFileInfo |
defineImageSizeAndRotation(InputStream imageStream,
ImageDecodingInfo decodingInfo) |
protected InputStream |
getImageStream(ImageDecodingInfo decodingInfo) |
protected android.graphics.BitmapFactory.Options |
prepareDecodingOptions(ImageSize imageSize,
ImageDecodingInfo decodingInfo) |
protected InputStream |
resetStream(InputStream imageStream,
ImageDecodingInfo decodingInfo) |
public BaseImageDecoder(boolean loggingEnabled)
loggingEnabled - Whether debug logs will be written to LogCat. Usually should match ImageLoaderConfiguration.writeDebugLogs()public android.graphics.Bitmap decode(ImageDecodingInfo decodingInfo) throws IOException
Bitmap. Image is scaled close to incoming target size
during decoding (depend on incoming parameters).decode 在接口中 ImageDecoderdecodingInfo - Needed data for decoding imageIOException - if some I/O exception occurs during image readingUnsupportedOperationException - if image URI has unsupported scheme(protocol)protected InputStream getImageStream(ImageDecodingInfo decodingInfo) throws IOException
IOExceptionprotected BaseImageDecoder.ImageFileInfo defineImageSizeAndRotation(InputStream imageStream, ImageDecodingInfo decodingInfo) throws IOException
IOExceptionprotected BaseImageDecoder.ExifInfo defineExifOrientation(String imageUri)
protected android.graphics.BitmapFactory.Options prepareDecodingOptions(ImageSize imageSize, ImageDecodingInfo decodingInfo)
protected InputStream resetStream(InputStream imageStream, ImageDecodingInfo decodingInfo) throws IOException
IOExceptionprotected android.graphics.Bitmap considerExactScaleAndOrientatiton(android.graphics.Bitmap subsampledBitmap,
ImageDecodingInfo decodingInfo,
int rotation,
boolean flipHorizontal)