public class

ImageDecodeOptions

extends Object
java.lang.Object
   ↳ com.facebook.imagepipeline.common.ImageDecodeOptions

Class Overview

Options for changing the behavior of the ImageDecoder.

Summary

Fields
public final Bitmap.Config bitmapConfig StaticImage and JPEG will decode with this config;
public final BitmapTransformation bitmapTransformation Bitmap transformation override
public final ColorSpace colorSpace Allow explicit color management, must be one of the named color space in ColorSpace.Named.
public final ImageDecoder customImageDecoder Custom image decoder override.
public final boolean decodeAllFrames Whether to decode all the frames and store them in memory.
public final boolean decodePreviewFrame Whether to decode a preview frame for animated images.
public final boolean forceStaticImage Force image to be rendered as a static image, even if it is an animated format.
public final int maxDimensionPx Maximum image dimension to decode
public final int minDecodeIntervalMs Decoding of intermediate results for an image won't happen more often that minDecodeIntervalMs.
public final boolean useLastFrameForPreview Indicates that the last frame should be used as the preview frame instead of the first.
Public Constructors
ImageDecodeOptions(ImageDecodeOptionsBuilder b)
Public Methods
static ImageDecodeOptions defaults()
Gets the default options.
boolean equals(Object o)
int hashCode()
static ImageDecodeOptionsBuilder newBuilder()
Creates a new builder.
String toString()
Protected Methods
Objects.ToStringHelper toStringHelper()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public final Bitmap.Config bitmapConfig

StaticImage and JPEG will decode with this config;

public final BitmapTransformation bitmapTransformation

Bitmap transformation override

public final ColorSpace colorSpace

Allow explicit color management, must be one of the named color space in ColorSpace.Named. This flag might affect performance, if null, then SRGB color space is assumed if the SDK version >= 26.

public final ImageDecoder customImageDecoder

Custom image decoder override.

public final boolean decodeAllFrames

Whether to decode all the frames and store them in memory. This should only ever be used for animations that are known to be small (e.g. stickers). Caching dozens of large Bitmaps in memory for general GIFs or WebP's will not fit in memory.

public final boolean decodePreviewFrame

Whether to decode a preview frame for animated images.

public final boolean forceStaticImage

Force image to be rendered as a static image, even if it is an animated format.

This flag will force animated GIFs to be rendered as static images

public final int maxDimensionPx

Maximum image dimension to decode

public final int minDecodeIntervalMs

Decoding of intermediate results for an image won't happen more often that minDecodeIntervalMs.

public final boolean useLastFrameForPreview

Indicates that the last frame should be used as the preview frame instead of the first.

Public Constructors

public ImageDecodeOptions (ImageDecodeOptionsBuilder b)

Public Methods

public static ImageDecodeOptions defaults ()

Gets the default options.

Returns
  • the default options

public boolean equals (Object o)

public int hashCode ()

public static ImageDecodeOptionsBuilder newBuilder ()

Creates a new builder.

Returns
  • a new builder

public String toString ()

Protected Methods

protected Objects.ToStringHelper toStringHelper ()