Editar

Compartilhar via


SKPixmap.Encode Method

Definition

Overloads

Encode(SKWStream, SKPixmap, SKEncodedImageFormat, Int32)
Obsolete.

Encodes the pixmap using the specified format.

Encode(SKWStream, SKBitmap, SKEncodedImageFormat, Int32)
Obsolete.

Encodes the bitmap using the specified format.

Encode(Stream, SKEncodedImageFormat, Int32)
Encode(SKWStream, SKPixmap, SKWebpEncoderOptions)
Obsolete.

Encodes the pixmap as a WEBP.

Encode(SKWStream, SKPixmap, SKPngEncoderOptions)
Obsolete.

Encodes the pixmap as a PNG.

Encode(SKWStream, SKPixmap, SKJpegEncoderOptions)
Obsolete.

Encodes the pixmap as a JPEG.

Encode(SKWStream, SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

Encode(Stream, SKWebpEncoderOptions)
Encode(SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

Encode(Stream, SKJpegEncoderOptions)
Encode(SKWStream, SKWebpEncoderOptions)

Encodes the pixmap as a WEBP.

Encode(SKWStream, SKPngEncoderOptions)

Encodes the pixmap as a PNG.

Encode(SKWStream, SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

Encode(SKEncodedImageFormat, Int32)

Encodes the pixmap using the specified format.

Encode(SKPngEncoderOptions)

Encodes the pixmap as a PNG.

Encode(SKJpegEncoderOptions)

Encodes the pixmap as a JPEG.

Encode(Stream, SKPngEncoderOptions)

Encode(SKWStream, SKPixmap, SKEncodedImageFormat, Int32)

Caution

Use Encode(SKWStream, SKEncodedImageFormat, int) instead.

Encodes the pixmap using the specified format.

public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKEncodedImageFormat encoder, int quality);
[System.Obsolete("Use Encode(SKWStream, SKEncodedImageFormat, int) instead.")]
public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKEncodedImageFormat encoder, int quality);

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

src
SKPixmap

The pixmap to encode.

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.

Attributes

Applies to

Encode(SKWStream, SKBitmap, SKEncodedImageFormat, Int32)

Caution

Use Encode(SKWStream, SKEncodedImageFormat, int) instead.

Encodes the bitmap using the specified format.

public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKBitmap src, SkiaSharp.SKEncodedImageFormat format, int quality);
[System.Obsolete("Use Encode(SKWStream, SKEncodedImageFormat, int) instead.")]
public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKBitmap src, SkiaSharp.SKEncodedImageFormat format, int quality);

Parameters

dst
SKWStream

The stream to write the encoded bitmap to.

src
SKBitmap

The bitmap to encode.

format
SKEncodedImageFormat

The file format used to encode the bitmap.

quality
Int32

The quality level to use for the bitmap.

Returns

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

Attributes

Applies to

Encode(Stream, SKEncodedImageFormat, Int32)

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

Parameters

dst
Stream
quality
Int32

Returns

Applies to

Encode(SKWStream, SKPixmap, SKWebpEncoderOptions)

Caution

Use Encode(SKWStream, SKWebpEncoderOptions) instead.

Encodes the pixmap as a WEBP.

public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKWebpEncoderOptions options);
[System.Obsolete("Use Encode(SKWStream, SKWebpEncoderOptions) instead.")]
public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKWebpEncoderOptions options);

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

src
SKPixmap

The pixmap to encode.

options
SKWebpEncoderOptions

The options to use when creating the encoder.

Returns

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

Attributes

Applies to

Encode(SKWStream, SKPixmap, SKPngEncoderOptions)

Caution

Use Encode(SKWStream, SKPngEncoderOptions) instead.

Encodes the pixmap as a PNG.

public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKPngEncoderOptions options);
[System.Obsolete("Use Encode(SKWStream, SKPngEncoderOptions) instead.")]
public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKPngEncoderOptions options);

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

src
SKPixmap

The pixmap to encode.

options
SKPngEncoderOptions

The options to use when creating the encoder.

Returns

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

Attributes

Applies to

Encode(SKWStream, SKPixmap, SKJpegEncoderOptions)

Caution

Use Encode(SKWStream, SKJpegEncoderOptions) instead.

Encodes the pixmap as a JPEG.

public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKJpegEncoderOptions options);
[System.Obsolete("Use Encode(SKWStream, SKJpegEncoderOptions) instead.")]
public static bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKPixmap src, SkiaSharp.SKJpegEncoderOptions options);

Parameters

dst
SKWStream

The stream to write the encoded pixmap to.

src
SKPixmap

The pixmap to encode.

options
SKJpegEncoderOptions

The options to use when creating the encoder.

Returns

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

Attributes

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, SKWebpEncoderOptions)

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

Parameters

dst
Stream

Returns

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(Stream, SKJpegEncoderOptions)

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

Parameters

dst
Stream

Returns

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(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, 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(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(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(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(Stream, SKPngEncoderOptions)

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

Parameters

dst
Stream

Returns

Applies to