ApngFrame

Inheritance: java.lang.Object, com.aspose.imaging.DisposableObject, com.aspose.imaging.DataStreamSupporter, com.aspose.imaging.Image, com.aspose.imaging.RasterImage, com.aspose.imaging.RasterCachedImage

All Implemented Interfaces: com.aspose.imaging.IAnimationFrame

public class ApngFrame extends RasterCachedImage implements IAnimationFrame

Craft animated PNG (APNG) image frames from single-page raster images with our API. Seamlessly set animation and frame duration, program the number of frames, and adjust gamma and contrast levels, ensuring captivating and customizable animations tailored to your vision.

Methods

MethodDescription
getBitsPerPixel()Gets the image bits per pixel count.
getWidth()Gets the image width.
getHeight()Gets the image height.
getFrameTime()Gets the frame duration.
setFrameTime(int value)Sets the frame duration.
getFrameTop()Gets the frame top offset.
getFrameLeft()Gets the frame left offset.
getDisposalMethod()Gets the disposal method.
hasTransparentColor()Gets a value indicating whether image has transparent color.
hasAlpha()Get a value indicating whether this instance has alpha.
getTransparentColor()Gets the transparent color.
setTransparentColor(boolean value)A value indicating whether image has transparent color.
setTransparentColor(Color value)The transparent color.
hasBackgroundColor()Gets a value indicating whether has background color.
getBackgroundColor()Gets the background color.
setBackgroundColor(boolean value)A value indicating whether has background color.
setBackgroundColor(Color value)The background color.
isUseAlphaBlending()Gets a value indicating whether [use alpha blending].
getFullFrame()Gets the full frame.
cacheData()Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer(DataStreamSupporter.getDataStreamContainer).

getBitsPerPixel()

public int getBitsPerPixel()

Gets the image bits per pixel count.

Returns: int - the image bits per pixel count.

getWidth()

public int getWidth()

Gets the image width.

Returns: int - the image width.

getHeight()

public int getHeight()

Gets the image height.

Returns: int - the image height.

getFrameTime()

public final int getFrameTime()

Gets the frame duration.

Returns: int - the frame duration.

setFrameTime(int value)

public final void setFrameTime(int value)

Sets the frame duration.

Parameters:

ParameterTypeDescription
valueintthe frame duration.

getFrameTop()

public final int getFrameTop()

Gets the frame top offset.

Returns: int - the frame top offset.

getFrameLeft()

public final int getFrameLeft()

Gets the frame left offset.

Returns: int - the frame left offset.

getDisposalMethod()

public final int getDisposalMethod()

Gets the disposal method.

Returns: int - the disposal method.

hasTransparentColor()

public boolean hasTransparentColor()

Gets a value indicating whether image has transparent color.

Returns: boolean - a value indicating whether image has transparent color.

hasAlpha()

public boolean hasAlpha()

Get a value indicating whether this instance has alpha.

Returns: boolean

getTransparentColor()

public Color getTransparentColor()

Gets the transparent color.

Returns: Color - the transparent color.

setTransparentColor(boolean value)

public void setTransparentColor(boolean value)

A value indicating whether image has transparent color.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether image has transparent color.

setTransparentColor(Color value)

public void setTransparentColor(Color value)

The transparent color.

Parameters:

ParameterTypeDescription
valueColorthe transparent color.

hasBackgroundColor()

public boolean hasBackgroundColor()

Gets a value indicating whether has background color.

Returns: boolean - a value indicating whether it has background color.

getBackgroundColor()

public Color getBackgroundColor()

Gets the background color.

Returns: Color - the background color.

setBackgroundColor(boolean value)

public void setBackgroundColor(boolean value)

A value indicating whether has background color.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether it has background color.

setBackgroundColor(Color value)

public void setBackgroundColor(Color value)

The background color.

Parameters:

ParameterTypeDescription
valueColorthe background color.

isUseAlphaBlending()

public final boolean isUseAlphaBlending()

Gets a value indicating whether [use alpha blending].

Value: true if [use alpha blending]; otherwise, false.

Returns: boolean - a value indicating whether [use alpha blending].

getFullFrame()

public final RasterImage getFullFrame()

Gets the full frame.

Returns: RasterImage - The full frame image.

cacheData()

public void cacheData()

Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer(DataStreamSupporter.getDataStreamContainer).