Table of Contents

Class PngMetadata

Namespace
SixLabors.ImageSharp.Formats.Png
Assembly
SixLabors.ImageSharp.dll

Provides Png specific metadata information for the image.

public class PngMetadata : IFormatMetadata<PngMetadata>, IFormatMetadata, IDeepCloneable, IDeepCloneable<PngMetadata>
Inheritance
PngMetadata
Implements
Inherited Members

Constructors

PngMetadata()

Initializes a new instance of the PngMetadata class.

public PngMetadata()

Properties

AnimateRootFrame

Gets or sets a value indicating whether the root frame is shown as part of the animated sequence

public bool AnimateRootFrame { get; set; }

Property Value

bool

BitDepth

Gets or sets the number of bits per sample or per palette index (not per pixel). Not all values are allowed for all ColorType values.

public PngBitDepth BitDepth { get; set; }

Property Value

PngBitDepth

ColorTable

Gets or sets the color table, if any.

public ReadOnlyMemory<Color>? ColorTable { get; set; }

Property Value

ReadOnlyMemory<Color>?

ColorType

Gets or sets the color type.

public PngColorType ColorType { get; set; }

Property Value

PngColorType

Gamma

Gets or sets the gamma value for the image.

public float Gamma { get; set; }

Property Value

float

InterlaceMethod

Gets or sets a value indicating whether this instance should write an Adam7 interlaced image.

public PngInterlaceMode InterlaceMethod { get; set; }

Property Value

PngInterlaceMode

RepeatCount

Gets or sets the number of times to loop this APNG. 0 indicates infinite looping.

public uint RepeatCount { get; set; }

Property Value

uint

TextData

Gets or sets the collection of text data stored within the iTXt, tEXt, and zTXt chunks. Used for conveying textual information associated with the image.

public IList<PngTextData> TextData { get; set; }

Property Value

IList<PngTextData>

TransparentColor

Gets or sets the transparent color used with non palette based images, if a transparency chunk and markers were decoded.

public Color? TransparentColor { get; set; }

Property Value

Color?

Methods

AfterImageApply<TPixel>(Image<TPixel>, Matrix4x4)

This method is called after a process has been applied to the image.

public void AfterImageApply<TPixel>(Image<TPixel> destination, Matrix4x4 matrix) where TPixel : unmanaged, IPixel<TPixel>

Parameters

destination Image<TPixel>

The destination image .

matrix Matrix4x4

The transformation matrix applied to the image.

Type Parameters

TPixel

The type of pixel format.

DeepClone()

Creates a new PngMetadata that is a deep copy of the current instance.

public PngMetadata DeepClone()

Returns

PngMetadata

The PngMetadata.

FromFormatConnectingMetadata(FormatConnectingMetadata)

Creates a new instance of the PngMetadata class from the given FormatConnectingMetadata.

public static PngMetadata FromFormatConnectingMetadata(FormatConnectingMetadata metadata)

Parameters

metadata FormatConnectingMetadata

The FormatConnectingMetadata.

Returns

PngMetadata

The PngMetadata.

GetPixelTypeInfo()

Converts the metadata to a PixelTypeInfo instance.

public PixelTypeInfo GetPixelTypeInfo()

Returns

PixelTypeInfo

The pixel type info.

ToFormatConnectingMetadata()

Converts the metadata to a FormatConnectingMetadata instance.

public FormatConnectingMetadata ToFormatConnectingMetadata()

Returns

FormatConnectingMetadata

The FormatConnectingMetadata.