Table of Contents

Class ApngFrame

Namespace
Aspose.Imaging.FileFormats.Apng
Assembly
Aspose.Imaging.dll

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.

public class ApngFrame : RasterCachedImage, IDisposable, IObjectWithBounds, IRasterImageArgb32PixelLoader, IRasterImageRawDataLoader, IHasXmpData, IHasMetadata, IAnimationFrame
Inheritance
ApngFrame
Implements
Inherited Members

Properties

BackgroundColor

Gets the background color.

public override Color BackgroundColor { get; set; }

Property Value

Color

BitsPerPixel

Gets the image bits per pixel count.

public override int BitsPerPixel { get; }

Property Value

int

The image bits per pixel count.

DisposalMethod

Gets the disposal method.

public AnimationDisposalMethods DisposalMethod { get; }

Property Value

AnimationDisposalMethods

The disposal method.

FrameLeft

Gets the frame left offset.

public int FrameLeft { get; }

Property Value

int

The left offset.

FrameTime

Gets or sets the frame duration.

public int FrameTime { get; set; }

Property Value

int

The frame duration, in milliseconds.

FrameTop

Gets the frame top offset.

public int FrameTop { get; }

Property Value

int

The top offset.

HasAlpha

Get a value indicating whether this instance has alpha.

public override bool HasAlpha { get; }

Property Value

bool

true if this instance has alpha; otherwise, false.

HasBackgroundColor

Gets a value indicating whether has background color.

public override bool HasBackgroundColor { get; set; }

Property Value

bool

HasTransparentColor

Gets a value indicating whether image has transparent color.

public override bool HasTransparentColor { get; set; }

Property Value

bool

Height

Gets the image height.

public override int Height { get; }

Property Value

int

The image height.

TransparentColor

Gets the transparent color.

public override Color TransparentColor { get; set; }

Property Value

Color

UseAlphaBlending

Gets a value indicating whether [use alpha blending].

public bool UseAlphaBlending { get; }

Property Value

bool

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

Width

Gets the image width.

public override int Width { get; }

Property Value

int

The image width.

Methods

CacheData()

Caches the data and ensures no additional data loading will be performed from the underlying DataStreamContainer.

public override void CacheData()

GetFullFrame()

Gets the full frame.

public RasterImage GetFullFrame()

Returns

RasterImage

The full frame image.

SaveData(Stream)

Saves the data.

protected override void SaveData(Stream stream)

Parameters

stream Stream

The stream to save data to.

UpdateDimensions(int, int)

Updates the image dimensions.

protected override void UpdateDimensions(int newWidth, int newHeight)

Parameters

newWidth int

The new image width.

newHeight int

The new image height.