|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<DecodeFormat> com.bumptech.glide.load.DecodeFormat
public enum DecodeFormat
Options for setting the value of Bitmap.getConfig()
for Bitmap
s
returned by a BitmapDecoder
.
Note - In some cases it may not be possible to obey the requested setting, not all
BitmapDecoder
s support setting formats and certain images may
not be able to be loaded as certain configurations. Therefore this class represents a preference rather than a
requirement.
Enum Constant Summary | |
---|---|
ALWAYS_ARGB_8888
Deprecated. Use the equivalent but less misleadingly named PREFER_ARGB_8888 . Scheduled to be removed
in Glide 4.0 |
|
PREFER_ARGB_8888
Bitmaps decoded from most image formats (other than GIFs with hidden configs), will be decoded with the ARGB_8888 config. |
|
PREFER_RGB_565
Bitmaps decoded from image formats that support and/or use alpha (some types of PNGs, GIFs etc) should return Bitmap.Config.ARGB_8888 for Bitmap.getConfig() . |
Field Summary | |
---|---|
static DecodeFormat |
DEFAULT
The default value for DecodeFormat. |
Method Summary | |
---|---|
static DecodeFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static DecodeFormat[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
@Deprecated public static final DecodeFormat ALWAYS_ARGB_8888
PREFER_ARGB_8888
. Scheduled to be removed
in Glide 4.0BitmapDecoder
should return
Bitmap.Config.ARGB_8888
for Bitmap.getConfig()
.
public static final DecodeFormat PREFER_ARGB_8888
BitmapFactory
does not allow us to guarantee that all returned Bitmaps will
be of a requested config without resorting to expensive copying. As a result, this is a preference only.
Most GIFs, for example, will still produce Bitmap
s with null
Bitmap.Config
s.
public static final DecodeFormat PREFER_RGB_565
Bitmap.Config.ARGB_8888
for Bitmap.getConfig()
. Bitmaps
decoded from formats that don't support or use alpha should return
Bitmap.Config.RGB_565
for Bitmap.getConfig()
.
Field Detail |
---|
public static final DecodeFormat DEFAULT
Method Detail |
---|
public static DecodeFormat[] values()
for (DecodeFormat c : DecodeFormat.values()) System.out.println(c);
public static DecodeFormat valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |