1package com.bumptech.glide.load;
2
3import android.graphics.Bitmap;
4import com.bumptech.glide.load.resource.bitmap.BitmapDecoder;
5
6/**
7 * Options for setting the value of {@link Bitmap#getConfig()} for {@link Bitmap}s returned by a {@link BitmapDecoder}.
8 *
9 * <p>
10 *     Note - In some cases it may not be possible to obey the requested setting, not all {@link BitmapDecoder}s support
11 *     setting formats and certain images may not be able to be loaded as certain configurations. Therefore this class
12 *     represents a preference rather than a requirement.
13 * </p>
14 */
15public enum DecodeFormat {
16    /**
17     * All bitmaps returned by the {@link BitmapDecoder} should return {@link Bitmap.Config#ARGB_8888} for
18     * {@link Bitmap#getConfig()}.
19     */
20    ALWAYS_ARGB_8888,
21
22    /**
23     * Bitmaps decoded from image formats that support and/or use alpha (some types of PNGs, GIFs etc) should
24     * return {@link Bitmap.Config#ARGB_8888} for {@link Bitmap#getConfig()}. Bitmaps decoded from formats that don't
25     * support or use alpha should return {@link Bitmap.Config#RGB_565} for {@link Bitmap#getConfig()}.
26     *
27     */
28    PREFER_RGB_565,
29}
30