Back to Fresco

AnimatedImageResult

docs/javadoc/reference/com/facebook/imagepipeline/animated/base/AnimatedImageResult.html

3.6.016.8 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Enums

Packages | Classes

Summary: Methods | Inherited Methods | [Expand All]

public class

AnimatedImageResult

extends Object

| java.lang.Object | | ↳ | com.facebook.imagepipeline.animated.base.AnimatedImageResult |

Class Overview

The result of decoding an animated image. Contains the AnimatedImage as well as additional data.

Summary

Public Methods
synchronized void
Disposes the result, which releases the reference to any bitmaps.
static AnimatedImageResult
Creates an AnimatedImageResult with no additional options.
BitmapTransformation
Gets the transformation that is to be applied to the image, or null if none.
synchronized CloseableReference<Bitmap>
Gets a decoded frame.
int
Gets the frame that should be used for the preview image.
AnimatedImage
Gets the underlying image.
synchronized CloseableReference<Bitmap>
Gets the bitmap for the preview frame.
synchronized boolean
Gets whether it has the decoded frame.
static AnimatedImageResultBuilder
Creates an AnimatedImageResultBuilder for creating an AnimatedImageResult.

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Methods

public synchronized void dispose()

Disposes the result, which releases the reference to any bitmaps.

public static AnimatedImageResult forAnimatedImage(AnimatedImage image)

Creates an AnimatedImageResult with no additional options.

Parameters

| image | the image |

Returns
  • the result

public BitmapTransformation getBitmapTransformation()

Gets the transformation that is to be applied to the image, or null if none.

Returns
  • the transformation that is to be applied to the image, or null if none

public synchronized CloseableReference<Bitmap> getDecodedFrame(int index)

Gets a decoded frame. This will only return non-null if the ImageDecodeOptions were configured to decode all frames at decode time.

Parameters

| index | the index of the frame to get |

Returns
  • a reference to the preview bitmap which must be released by the caller when done or null if there is no preview bitmap set

public int getFrameForPreview()

Gets the frame that should be used for the preview image. If the preview bitmap was fetched, this is the frame that it's for.

Returns
  • the frame that should be used for the preview image

public AnimatedImage getImage()

Gets the underlying image.

Returns
  • the underlying image

public synchronized CloseableReference<Bitmap> getPreviewBitmap()

Gets the bitmap for the preview frame. This will only return non-null if the ImageDecodeOptions were configured to decode the preview frame.

Returns
  • a reference to the preview bitmap which must be released by the caller when done or null if there is no preview bitmap set

public synchronized boolean hasDecodedFrame(int index)

Gets whether it has the decoded frame. This will only return true if the ImageDecodeOptions were configured to decode all frames at decode time.

Parameters

| index | the index of the frame to get |

Returns
  • true if the result has the decoded frame

public static AnimatedImageResultBuilder newBuilder(AnimatedImage image)

Creates an AnimatedImageResultBuilder for creating an AnimatedImageResult.

Parameters

| image | the image |

Returns
  • the builder

+Generated by Doclava. +