SKBitmap.Encode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Encode(SKEncodedImageFormat, Int32) | |
Encode(SKWStream, SKEncodedImageFormat, Int32) |
Obsolete.
Encodes the image using the specified format. |
Encode(Stream, SKEncodedImageFormat, Int32) |
Encode(SKEncodedImageFormat, Int32)
public SkiaSharp.SKData Encode (SkiaSharp.SKEncodedImageFormat format, int quality);
Parameters
- format
- SKEncodedImageFormat
The file format used to encode the image.
- quality
- Int32
The quality level to use for the image. Quality range from 0-100. Higher values correspond to improved visual quality, but less compression.
Returns
Applies to
Encode(SKWStream, SKEncodedImageFormat, Int32)
Caution
Use SKPixmap.Encode instead.
Encodes the image using the specified format.
[System.Obsolete("Use SKPixmap.Encode instead.")]
public bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKEncodedImageFormat format, int quality);
public bool Encode (SkiaSharp.SKWStream dst, SkiaSharp.SKEncodedImageFormat format, int quality);
Parameters
- dst
- SKWStream
The stream to write the encoded image to.
- format
- SKEncodedImageFormat
The file format used to encode the image.
- quality
- Int32
The quality level to use for the image. Quality range from 0-100. Higher values correspond to improved visual quality, but less compression.
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 format, int quality);
Parameters
- dst
- Stream
The stream to write the encoded image to.
- format
- SKEncodedImageFormat
The file format used to encode the image.
- quality
- Int32
The quality level to use for the image. Quality range from 0-100. Higher values correspond to improved visual quality, but less compression.