format

open fun format(format: DecodeFormat): T

Sets the DecodeFormat to use when decoding Bitmap objects using and Glide's default GIF decoders.

DecodeFormat is a request, not a requirement. It's possible the resource will be decoded using a decoder that cannot control the format ( for example), or that the decoder may choose to ignore the requested format if it can't display the image (i.e. RGB_565 is requested, but the image has alpha).

This is a component option specific to Downsampler and Glide's GIF decoders. If the default Bitmap decoders are replaced or skipped because of your configuration, this option may be ignored.

To set only the format used when decoding Bitmaps, use set} and DECODE_FORMAT. To set only the format used when decoding GIF frames, use set and DECODE_FORMAT.

See also