-
public class AnimatedImageResultThe result of decoding an animated image. Contains the AnimatedImage as well as additional data.
-
-
Method Summary
Modifier and Type Method Description static AnimatedImageResultforAnimatedImage(AnimatedImage image)Creates an AnimatedImageResult with no additional options. static AnimatedImageResultBuildernewBuilder(AnimatedImage image)Creates an AnimatedImageResultBuilder for creating an AnimatedImageResult. AnimatedImagegetImage()Gets the underlying image. StringgetSource()Gets the animated result source uri intgetFrameForPreview()Gets the frame that should be used for the preview image. synchronized CloseableReference<Bitmap>getDecodedFrame(int index)Gets a decoded frame. synchronized booleanhasDecodedFrame(int index)Gets whether it has the decoded frame. BitmapTransformationgetBitmapTransformation()Gets the transformation that is to be applied to the image, or null if none. synchronized CloseableReference<Bitmap>getPreviewBitmap()Gets the bitmap for the preview frame. synchronized voiddispose()Disposes the result, which releases the reference to any bitmaps. -
-
Method Detail
-
forAnimatedImage
static AnimatedImageResult forAnimatedImage(AnimatedImage image)
Creates an AnimatedImageResult with no additional options.
- Parameters:
image- the image
-
newBuilder
static AnimatedImageResultBuilder newBuilder(AnimatedImage image)
Creates an AnimatedImageResultBuilder for creating an AnimatedImageResult.
- Parameters:
image- the image
-
getImage
AnimatedImage getImage()
Gets the underlying image.
-
getFrameForPreview
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.
-
getDecodedFrame
@Nullable() synchronized CloseableReference<Bitmap> getDecodedFrame(int index)
Gets a decoded frame. This will only return non-null if the
{@code ImageDecodeOptions}wereconfigured to decode all frames at decode time.- Parameters:
index- the index of the frame to get
-
hasDecodedFrame
synchronized boolean hasDecodedFrame(int index)
Gets whether it has the decoded frame. This will only return true if the
{@code * ImageDecodeOptions}were configured to decode all frames at decode time.- Parameters:
index- the index of the frame to get
-
getBitmapTransformation
@Nullable() BitmapTransformation getBitmapTransformation()
Gets the transformation that is to be applied to the image, or null if none.
-
getPreviewBitmap
@Nullable() synchronized CloseableReference<Bitmap> getPreviewBitmap()
Gets the bitmap for the preview frame. This will only return non-null if the
{@code * ImageDecodeOptions}were configured to decode the preview frame.
-
dispose
synchronized void dispose()
Disposes the result, which releases the reference to any bitmaps.
-
-
-
-