canvaskit-wasm 0.39 build 2026-04-29

FilterMode

How sub-pixel sampling reads from an image when scaled or transformed. Consumed by Image.makeShaderOptions, Canvas.drawImageOptions / drawImageRectOptions, and similar resampling APIs.

Error: Line 1: Unexpected identifier

Nearest keeps every source pixel as a crisp block — pixel art renders cleanly, edges stay sharp. Linear blends adjacent source pixels — smooth gradients between tiles, but soft edges that look blurry on pixel art.

All values

ValueBehavior
NearestPick the closest source pixel. Crisp, blocky — ideal for pixel art.
LinearBilinear interpolation. Smooth — typical for photos and scaled images.

See also