canvaskit-wasm 0.39 build 2026-04-29

CubicResampler

A plain JS object describing a Mitchell-Netravali bicubic resampling kernel. Two scalars — B and C — pick a point in the resampling family. Useful for high-quality image scaling (smoother than Linear, sharper than Mitchell defaults).

const sampler = { B: 0, C: 0.5 };  // Catmull-Rom

Fields

FieldTypeNotes
BnumberThe "B" parameter. 1/3 is Mitchell-Netravali (smooth); 0 with C = 0.5 is Catmull-Rom (sharper).
CnumberThe "C" parameter.

Where it's accepted

Wherever an API takes a sampling argument that isn't a FilterMode + MipmapMode pair:

See also

  • FilterOptions — alternative sampling description (linear / nearest + mipmap).