Edit

SKWebpEncoder.Encode Method

Definition

Overloads

Name Description
Encode(SKPixmap, SKWebpEncoderOptions)

Encodes the specified pixel data to the WebP format and returns the result as SKData.

Encode(SKWStream, SKPixmap, SKWebpEncoderOptions)

Encodes the specified pixel data to WebP format and writes the result to the specified stream.

Encode(Stream, SKPixmap, SKWebpEncoderOptions)

Encodes the specified pixel data to WebP format and writes the result to the specified managed stream.

Encode(SKPixmap, SKWebpEncoderOptions)

Encodes the specified pixel data to the WebP format and returns the result as SKData.

public static SkiaSharp.SKData? Encode(SkiaSharp.SKPixmap src, SkiaSharp.SKWebpEncoderOptions options);

Parameters

src
SKPixmap

The pixel data to encode.

options
SKWebpEncoderOptions

The WebP encoder options, such as quality and compression method.

Returns

A new SKData containing the encoded WebP data, or null if encoding failed.

Applies to

Encode(SKWStream, SKPixmap, SKWebpEncoderOptions)

Encodes the specified pixel data to WebP format and writes the result to the specified stream.

public static bool Encode(SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKWebpEncoderOptions options);

Parameters

dst
SKWStream

The stream to which the encoded WebP data is written.

src
SKPixmap

The pixel data to encode.

options
SKWebpEncoderOptions

The WebP encoder options, such as quality and compression method.

Returns

true if encoding succeeded; otherwise, false.

Applies to

Encode(Stream, SKPixmap, SKWebpEncoderOptions)

Encodes the specified pixel data to WebP format and writes the result to the specified managed stream.

public static bool Encode(System.IO.Stream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKWebpEncoderOptions options);

Parameters

dst
Stream

The managed stream to which the encoded WebP data is written.

src
SKPixmap

The pixel data to encode.

options
SKWebpEncoderOptions

The WebP encoder options, such as quality and compression method.

Returns

true if encoding succeeded; otherwise, false.

Applies to