BitmapFactoryImageDecoder.Factory


public final class BitmapFactoryImageDecoder.Factory implements ImageDecoder.Factory


A factory for BitmapFactoryImageDecoder instances.

Summary

Public constructors

This method is deprecated.

Use Factory instead.

This method is deprecated.

Use ExternallyLoadedImageDecoder to control how images are decoded.

Factory(Context context)

Creates an instance.

Public methods

BitmapFactoryImageDecoder

Creates a new ImageDecoder.

BitmapFactoryImageDecoder.Factory

Sets the maximum size of Bitmap instances decoded by decoders produced by this factory.

int

Returns the highest Capabilities of the factory's decoders for the given .

Inherited Constants

From androidx.media3.exoplayer.image.ImageDecoder.Factory
static final ImageDecoder.Factory

This field is deprecated.

Instantiate a BitmapFactoryImageDecoder.Factory directly.

Public constructors

Factory

public Factory()

Factory

public Factory(BitmapFactoryImageDecoder.BitmapDecoder bitmapDecoder)

Factory

public Factory(Context context)

Creates an instance.

Public methods

createImageDecoder

public BitmapFactoryImageDecoder createImageDecoder()

Creates a new ImageDecoder.

setMaxOutputSize

@CanIgnoreReturnValue
public BitmapFactoryImageDecoder.Factory setMaxOutputSize(int maxOutputSize)

Sets the maximum size of Bitmap instances decoded by decoders produced by this factory.

This overrides any maximum size derived from the display via Context. Passing LENGTH_UNSET clears any max output size set.

Returns
BitmapFactoryImageDecoder.Factory

This factory, for convenience.

supportsFormat

@RendererCapabilities.Capabilities
public int supportsFormat(Format format)

Returns the highest Capabilities of the factory's decoders for the given .

Parameters
Format format

The Format.

Returns
int

The Capabilities of the decoders the factory can instantiate for this format.