SKBitmap.ScalePixels 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
ScalePixels(SKPixmap, SKFilterQuality) |
Copies this pixmap to the destination, scaling the pixels to fit the destination size and converting the pixels to match the color type and alpha type. |
ScalePixels(SKBitmap, SKFilterQuality) |
Copies this pixmap to the destination, scaling the pixels to fit the destination size and converting the pixels to match the color type and alpha type. |
ScalePixels(SKPixmap, SKFilterQuality)
Copies this pixmap to the destination, scaling the pixels to fit the destination size and converting the pixels to match the color type and alpha type.
public bool ScalePixels (SkiaSharp.SKPixmap destination, SkiaSharp.SKFilterQuality quality);
Parameters
- destination
- SKPixmap
The pixmap to recieve the scaled and converted pixels.
- quality
- SKFilterQuality
The level of quality to use when scaling the pixels.
Returns
Returns true
on success, or false
if there was an error.
Remarks
Pixels are copied only if pixel conversion is possible.
If the color type is Gray8, or Alpha8, the destination color type must match. If the color type is Gray8, destination colorspace must also match.
If the alpha type is Opaque, the destination alpha type must match.
If the colorspace is null
, the destination colorspace must also be null
.
Filter Quality:
- None is fastest, typically implemented with nearest neighbor filter.
- Low is typically implemented with bilerp filter.
- Medium is typically implemented with bilerp filter, and mipmap when size is reduced.
- High is slowest, typically implemented with the bicubic filter.
Applies to
ScalePixels(SKBitmap, SKFilterQuality)
Copies this pixmap to the destination, scaling the pixels to fit the destination size and converting the pixels to match the color type and alpha type.
public bool ScalePixels (SkiaSharp.SKBitmap destination, SkiaSharp.SKFilterQuality quality);
Parameters
- destination
- SKBitmap
The bitmap to recieve the scaled and converted pixels.
- quality
- SKFilterQuality
The level of quality to use when scaling the pixels.
Returns
Returns true
on success, or false
if there was an error.
Remarks
Pixels are copied only if pixel conversion is possible.
If the color type is Gray8, or Alpha8, the destination color type must match. If the color type is Gray8, destination colorspace must also match.
If the alpha type is Opaque, the destination alpha type must match.
If the colorspace is null
, the destination colorspace must also be null
.
Filter Quality:
- None is fastest, typically implemented with nearest neighbor filter.
- Low is typically implemented with bilerp filter.
- Medium is typically implemented with bilerp filter, and mipmap when size is reduced.
- High is slowest, typically implemented with the bicubic filter.
Applies to
SkiaSharp