public class ImageSource
extends java.lang.Object
implements android.os.Parcelable
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 android.os.Parcelable.Creator<ImageSource> |
CREATOR |
Modifier | Constructor and Description |
---|---|
protected |
ImageSource(android.os.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(android.net.Uri uri) |
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
android.graphics.Bitmap |
getBitmap() |
android.graphics.Bitmap |
getBitmap(DrawableState state) |
android.graphics.Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds) |
android.graphics.Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds,
DrawableState state) |
android.graphics.Bitmap |
getBitmap(int boundsWidth,
int boundsHeight,
boolean fitIntoBounds,
int[] state) |
android.graphics.Bitmap |
getBitmap(android.graphics.RectF bounds,
android.graphics.Rect chunk) |
android.graphics.Bitmap |
getBitmap(android.graphics.RectF bounds,
android.graphics.RectF chunk) |
android.graphics.Bitmap |
getBitmap(android.graphics.Rect bounds,
android.graphics.Rect chunk) |
android.graphics.Bitmap |
getBitmap(android.graphics.Rect bounds,
android.graphics.RectF chunk) |
protected Decoder |
getDecoder() |
android.graphics.drawable.Drawable |
getDrawable() |
ImageFileFormat |
getImageFormat() |
int |
getResourceId() |
ImageSize |
getSize() |
protected Decoder |
getStateDecoder(DrawableState state) |
protected Decoder |
getStateDecoder(StateSource stateSource) |
int |
hashCode() |
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(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<ImageSource> CREATOR
@AnyThread public static ImageSource create(java.io.File file)
@AnyThread public static ImageSource create(@DrawableRes int resourceId)
@AnyThread public static ImageSource create(@NonNull StateSource... stateSources)
@AnyThread public static ImageSource create(android.net.Uri uri)
public int describeContents()
describeContents
in interface android.os.Parcelable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap()
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(@Nullable DrawableState state)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds, @Nullable DrawableState state)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(int boundsWidth, int boundsHeight, boolean fitIntoBounds, int[] state)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(@NonNull android.graphics.RectF bounds, @NonNull android.graphics.Rect chunk)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(@NonNull android.graphics.RectF bounds, @NonNull android.graphics.RectF chunk)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(@NonNull android.graphics.Rect bounds, @NonNull android.graphics.Rect chunk)
@Nullable @WorkerThread public android.graphics.Bitmap getBitmap(@NonNull android.graphics.Rect bounds, @NonNull android.graphics.RectF chunk)
@NonNull @WorkerThread protected Decoder getDecoder()
@NonNull @WorkerThread public android.graphics.drawable.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)
public int hashCode()
hashCode
in class java.lang.Object
@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(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable