SKPixmap.ScalePixels(SKPixmap, SKFilterQuality) Method


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);



The pixmap to recieve the scaled and converted pixels.


The level of quality to use when scaling the pixels.


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


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