public class ImageSource
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ImageSource.NonStaticResourceException |
static class |
ImageSource.UnsupportedFormatException |
static class |
ImageSource.UnsupportedSourceException |
Modifier and Type | Field and Description |
---|---|
static <any> |
CREATOR |
Modifier | Constructor and Description |
---|---|
protected |
ImageSource(Parcel in) |
Modifier and Type | Method and Description |
---|---|
static ImageSource |
create(java.io.File file) |
static ImageSource |
create(int resourceId) |
static ImageSource |
create(StateSource... stateSources) |
static ImageSource |
create(Uri uri) |
int |
describeContents() |
Bitmap |
getBitmap() |
Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds) |
Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds,
DrawableState state) |
Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds,
int[] state) |
Bitmap |
getBitmap(RectF bounds,
Rect chunk) |
Bitmap |
getBitmap(RectF bounds,
RectF chunk) |
Bitmap |
getBitmap(Rect bounds,
Rect chunk) |
Bitmap |
getBitmap(Rect bounds,
RectF chunk) |
protected Decoder |
getDecoder() |
Drawable |
getDrawable() |
ImageFileFormat |
getImageFormat() |
int |
getResourceId() |
ImageSize |
getSize() |
protected Decoder |
getStateDecoder(DrawableState state) |
protected Decoder |
getStateDecoder(StateSource stateSource) |
boolean |
hasResourceId() |
boolean |
isStateful() |
boolean |
isStaticImage() |
boolean |
isVector() |
void |
logErrorIfScaledResource() |
static ImageFileFormat |
readFormat(java.io.InputStream inputStream) |
static ImageFileFormat |
readFormat(int resourceId) |
void |
recycle() |
void |
writeToParcel(Parcel dest,
int flags) |
@AnyThread public static ImageSource create(java.io.File file)
@AnyThread public static ImageSource create(int resourceId)
@AnyThread public static ImageSource create(@NonNull StateSource... stateSources)
@AnyThread public static ImageSource create(Uri uri)
public int describeContents()
@Nullable @WorkerThread public Bitmap getBitmap()
@Nullable @WorkerThread public Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds)
@Nullable @WorkerThread public Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds, @Nullable DrawableState state)
@Nullable @WorkerThread public Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds, int[] state)
@Nullable @WorkerThread public Bitmap getBitmap(@NonNull RectF bounds, @NonNull Rect chunk)
@Nullable @WorkerThread public Bitmap getBitmap(@NonNull RectF bounds, @NonNull RectF chunk)
@Nullable @WorkerThread public Bitmap getBitmap(@NonNull Rect bounds, @NonNull Rect chunk)
@Nullable @WorkerThread public Bitmap getBitmap(@NonNull Rect bounds, @NonNull RectF chunk)
@NonNull @WorkerThread protected Decoder getDecoder()
@NonNull @WorkerThread public Drawable getDrawable()
@WorkerThread public ImageFileFormat getImageFormat()
@AnyThread public int getResourceId()
@NonNull @WorkerThread public ImageSize getSize()
@NonNull @WorkerThread protected Decoder getStateDecoder(DrawableState state)
@NonNull @WorkerThread protected Decoder getStateDecoder(@NonNull StateSource stateSource)
@AnyThread public boolean hasResourceId()
public boolean isStateful()
@AnyThread public boolean isStaticImage()
@WorkerThread public boolean isVector()
public void logErrorIfScaledResource()
@WorkerThread public static ImageFileFormat readFormat(java.io.InputStream inputStream) throws java.io.IOException
java.io.IOException
@WorkerThread public static ImageFileFormat readFormat(int resourceId) throws java.io.IOException
java.io.IOException
public void recycle()
public void writeToParcel(Parcel dest, int flags)