Table of Contents

Class WebpMetadata

Namespace
SixLabors.ImageSharp.Formats.Webp
Assembly
SixLabors.ImageSharp.dll

Provides Webp specific metadata information for the image.

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

Constructors

WebpMetadata()

Initializes a new instance of the WebpMetadata class.

public WebpMetadata()

Properties

BackgroundColor

Gets or sets the default background color of the canvas when animating. This color may be used to fill the unused space on the canvas around the frames, as well as the transparent pixels of the first frame. The background color is also used when the Disposal method is RestoreToBackground.

public Color BackgroundColor { get; set; }

Property Value

Color

BitsPerPixel

Gets or sets the number of bits per pixel.

public WebpBitsPerPixel BitsPerPixel { get; set; }

Property Value

WebpBitsPerPixel

ColorType

Gets or sets the color type.

public WebpColorType ColorType { get; set; }

Property Value

WebpColorType

FileFormat

Gets or sets the webp file format used. Either lossless or lossy.

public WebpFileFormatType FileFormat { get; set; }

Property Value

WebpFileFormatType

RepeatCount

Gets or sets the loop count. The number of times to loop the animation. 0 means infinitely.

public ushort RepeatCount { get; set; }

Property Value

ushort

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 WebpMetadata that is a deep copy of the current instance.

public WebpMetadata DeepClone()

Returns

WebpMetadata

The WebpMetadata.

FromFormatConnectingMetadata(FormatConnectingMetadata)

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

public static WebpMetadata FromFormatConnectingMetadata(FormatConnectingMetadata metadata)

Parameters

metadata FormatConnectingMetadata

The FormatConnectingMetadata.

Returns

WebpMetadata

The WebpMetadata.

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.