Edit

SKPixmap.Encode Method

Definition

Overloads

Name Description
Encode(SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

Encode(SKPngEncoderOptions)

Encodes the pixmap as a PNG.

Encode(SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

Encode(SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

Encode(SKWStream, SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

Encode(SKWStream, SKPngEncoderOptions)

Encodes the pixmap as a PNG.

Encode(SKWStream, SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

Encode(Stream, SKJpegEncoderOptions)

Encodes the pixmap to the stream using the specified options.

Encode(Stream, SKPngEncoderOptions)

Encodes the pixmap to the stream using the specified options.

Encode(Stream, SKWebpEncoderOptions)

Encodes the pixmap to the stream using the specified options.

Encode(SKWStream, SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

Encode(Stream, SKEncodedImageFormat, Int32)

Encodes the pixmap to the stream using the specified format and quality.

Encode(SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

public SkiaSharp.SKData? Encode(SkiaSharp.SKJpegEncoderOptions options);

Parameters

options
SKJpegEncoderOptions

The options to use when creating the encoder.

Returns

Returns the SKData wrapping the encoded pixmap.

Applies to

Encode(SKPngEncoderOptions)

Encodes the pixmap as a PNG.

public SkiaSharp.SKData? Encode(SkiaSharp.SKPngEncoderOptions options);

Parameters

options
SKPngEncoderOptions

The options to use when creating the encoder.

Returns

Returns the SKData wrapping the encoded pixmap.

Applies to

Encode(SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

public SkiaSharp.SKData? Encode(SkiaSharp.SKWebpEncoderOptions options);

Parameters

options
SKWebpEncoderOptions

The options to use when creating the encoder.

Returns

Returns the SKData wrapping the encoded pixmap.

Applies to

Encode(SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

public SkiaSharp.SKData? Encode(SkiaSharp.SKEncodedImageFormat encoder, int quality);

Parameters

encoder
SKEncodedImageFormat

The file format used to encode the pixmap.

quality
Int32

The quality level to use for the pixmap.

Returns

Returns the SKData wrapping the encoded pixmap.

Applies to

Encode(SKWStream, SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

public bool Encode(SkiaSharp.SKWStream dst, SkiaSharp.SKJpegEncoderOptions options);

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

options
SKJpegEncoderOptions

The options to use when creating the encoder.

Returns

Returns true on success, or false if there was an error.

Applies to

Encode(SKWStream, SKPngEncoderOptions)

Encodes the pixmap as a PNG.

public bool Encode(SkiaSharp.SKWStream dst, SkiaSharp.SKPngEncoderOptions options);

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

options
SKPngEncoderOptions

The options to use when creating the encoder.

Returns

Returns true on success, or false if there was an error.

Applies to

Encode(SKWStream, SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

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

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

options
SKWebpEncoderOptions

The options to use when creating the encoder.

Returns

Returns true on success, or false if there was an error.

Applies to

Encode(Stream, SKJpegEncoderOptions)

Encodes the pixmap to the stream using the specified options.

public bool Encode(System.IO.Stream dst, SkiaSharp.SKJpegEncoderOptions options);

Parameters

dst
Stream

The destination stream.

options
SKJpegEncoderOptions

The encoder options.

Returns

Returns true on success.

Applies to

Encode(Stream, SKPngEncoderOptions)

Encodes the pixmap to the stream using the specified options.

public bool Encode(System.IO.Stream dst, SkiaSharp.SKPngEncoderOptions options);

Parameters

dst
Stream

The destination stream.

options
SKPngEncoderOptions

The encoder options.

Returns

Returns true on success.

Applies to

Encode(Stream, SKWebpEncoderOptions)

Encodes the pixmap to the stream using the specified options.

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

Parameters

dst
Stream

The destination stream.

options
SKWebpEncoderOptions

The encoder options.

Returns

Returns true on success.

Applies to

Encode(SKWStream, SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

public bool Encode(SkiaSharp.SKWStream dst, SkiaSharp.SKEncodedImageFormat encoder, int quality);

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

encoder
SKEncodedImageFormat

The file format used to encode the pixmap.

quality
Int32

The quality level to use for the pixmap.

Returns

Returns true on success, or false if there was an error.

Applies to

Encode(Stream, SKEncodedImageFormat, Int32)

Encodes the pixmap to the stream using the specified format and quality.

public bool Encode(System.IO.Stream dst, SkiaSharp.SKEncodedImageFormat encoder, int quality);

Parameters

dst
Stream

The destination stream.

encoder
SKEncodedImageFormat

The encoded image format.

quality
Int32

The encoding quality (0-100).

Returns

Returns true on success.

Applies to