Returns a new Bitmap with the same pixel data but a different scale factor.
scaled(n)
n
The new scale factor.
A new Bitmap object with the specified scale.
let bitmap = new Bitmap(new Uint8Array([255, 0, 0, 255]), 1, 1)
let scaled = bitmap.scaled(2.0)
scaled.scale
2