-
public class AnimatedImageResultBuilderBuilder for AnimatedImageResult.
-
-
Method Summary
Modifier and Type Method Description AnimatedImagegetImage()Gets the image for the result. CloseableReference<Bitmap>getPreviewBitmap()Gets the preview bitmap. AnimatedImageResultBuildersetPreviewBitmap(@Nullable() CloseableReference<Bitmap> previewBitmap)Sets a preview bitmap. intgetFrameForPreview()Gets the frame that should be used for the preview image. AnimatedImageResultBuildersetFrameForPreview(int frameForPreview)Sets the frame that should be used for the preview image. List<CloseableReference<Bitmap>>getDecodedFrames()Gets the decoded frames. StringgetSource()AnimatedImageResultBuildersetDecodedFrames(@Nullable() List<CloseableReference<Bitmap>> decodedFrames)Sets the decoded frames. BitmapTransformationgetBitmapTransformation()Gets the transformation that is to be applied to the image, or null if none. AnimatedImageResultBuildersetBitmapTransformation(@Nullable() BitmapTransformation bitmapTransformation)Sets the transformation that is to be applied to the image. AnimatedImageResultBuildersetSource(@Nullable() String source)Sets the source of the animated image AnimatedImageResultbuild()Builds the AnimatedImageResult. -
-
Method Detail
-
getImage
AnimatedImage getImage()
Gets the image for the result.
-
getPreviewBitmap
@Nullable() CloseableReference<Bitmap> getPreviewBitmap()
Gets the preview bitmap. This method returns a new reference. The caller must close it.
-
setPreviewBitmap
AnimatedImageResultBuilder setPreviewBitmap(@Nullable() CloseableReference<Bitmap> previewBitmap)
Sets a preview bitmap.
- Parameters:
previewBitmap- the preview.
-
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.
-
setFrameForPreview
AnimatedImageResultBuilder setFrameForPreview(int frameForPreview)
Sets the frame that should be used for the preview image. If the preview bitmap was fetched,this is the frame that it's for.
-
getDecodedFrames
@Nullable() List<CloseableReference<Bitmap>> getDecodedFrames()
Gets the decoded frames. Only used if the
{@code ImageDecodeOptions}were configured to decodeall frames at decode time.
-
setDecodedFrames
AnimatedImageResultBuilder setDecodedFrames(@Nullable() List<CloseableReference<Bitmap>> decodedFrames)
Sets the decoded frames. Only used if the
{@code ImageDecodeOptions}were configured to decodeall frames at decode time.- Parameters:
decodedFrames- the decoded frames.
-
getBitmapTransformation
@Nullable() BitmapTransformation getBitmapTransformation()
Gets the transformation that is to be applied to the image, or null if none.
-
setBitmapTransformation
AnimatedImageResultBuilder setBitmapTransformation(@Nullable() BitmapTransformation bitmapTransformation)
Sets the transformation that is to be applied to the image.
- Parameters:
bitmapTransformation- the transformation that is to be applied to the image
-
setSource
AnimatedImageResultBuilder setSource(@Nullable() String source)
Sets the source of the animated image
- Parameters:
source- uri path
-
build
AnimatedImageResult build()
Builds the AnimatedImageResult. The preview bitmap and the decoded frames are closedafter build is called, so this should not be called more than once or those fields will be lostafter the first call.
-
-
-
-