-
public interface AnimatedImageCommon interface for an animated image.
-
-
Method Summary
Modifier and Type Method Description abstract voiddispose()Disposes the instance. abstract intgetWidth()Gets the width of the image (also known as the canvas in WebP nomenclature). abstract intgetHeight()Gets the height of the image (also known as the canvas in WebP nomenclature). abstract intgetFrameCount()Gets the number of frames in the image. abstract intgetDuration()Gets the duration of the animated image. abstract Array<int>getFrameDurations()Gets the duration of each frame of the animated image. abstract intgetLoopCount()Gets the number of loops to run the animation for. abstract AnimatedImageFramegetFrame(int frameNumber)Creates an AnimatedImageFrame at the specified index. abstract booleandoesRenderSupportScaling()Returns whether renderFrame supports scaling to arbitrary sizes orwhether scaling must be done externally. abstract intgetSizeInBytes()Gets the size of bytes of the encoded image data (which is the data kept in memory for theimage). abstract AnimatedDrawableFrameInfogetFrameInfo(int frameNumber)Gets the frame info for the specified frame. abstract Bitmap.ConfiggetAnimatedBitmapConfig()Gets the Bitmap.Config to decode the Bitmap of Animated Frames. -
-
Method Detail
-
dispose
abstract void dispose()
Disposes the instance. This will free native resources held by this instance. Once called,other methods on this instance may throw. Note, the underlying native resources may notactually be freed until all associated instances of AnimatedImageFrame are disposed orfinalized as well.
-
getWidth
abstract int getWidth()
Gets the width of the image (also known as the canvas in WebP nomenclature).
-
getHeight
abstract int getHeight()
Gets the height of the image (also known as the canvas in WebP nomenclature).
-
getFrameCount
abstract int getFrameCount()
Gets the number of frames in the image.
-
getDuration
abstract int getDuration()
Gets the duration of the animated image.
-
getFrameDurations
abstract Array<int> getFrameDurations()
Gets the duration of each frame of the animated image.
-
getLoopCount
abstract int getLoopCount()
Gets the number of loops to run the animation for.
-
getFrame
abstract AnimatedImageFrame getFrame(int frameNumber)
Creates an AnimatedImageFrame at the specified index.
- Parameters:
frameNumber- the index of the frame
-
doesRenderSupportScaling
abstract boolean doesRenderSupportScaling()
Returns whether renderFrame supports scaling to arbitrary sizes orwhether scaling must be done externally.
-
getSizeInBytes
abstract int getSizeInBytes()
Gets the size of bytes of the encoded image data (which is the data kept in memory for theimage).
-
getFrameInfo
abstract AnimatedDrawableFrameInfo getFrameInfo(int frameNumber)
Gets the frame info for the specified frame.
- Parameters:
frameNumber- the frame to get the info for
-
getAnimatedBitmapConfig
@Nullable() abstract Bitmap.Config getAnimatedBitmapConfig()
Gets the Bitmap.Config to decode the Bitmap of Animated Frames.
-
-
-
-