MZ Issue with BLT blurriness

Having a bit of an issue using the blt function, where even though both the source and destination have anti-aliasing turned off, the transfer is blurry. Can blt be used without anti-aliasing?

JavaScript:
const width = settings.width;
const height = settings.height;
const sx = settings.x * width;
const sy = settings.y * height;
// Scale = 4
const nw = width * scale;
const nh = height * scale;

console.log("Source Smooth?:",this._bitmap.smooth);
console.log("Destination Smooth?:", contents.smooth)
contents.blt(this._bitmap, sx, sy, width, height, x, y, nw, nh);

1745587854387.png
You need to turn it off like this:

contents.imageSmoothingEnabled = false;
I set that property for both contents and bitmap, with the same result.
Does this problem still happen with scale set to 1? There's a good chance block transfers don't scale things with nearest neighbour, thus causing some blurring.
@utunnels made a small typo: imageSmoothingEnabled is a property of the rendering context, not the bitmap itself. Try this instead?
JavaScript:
this.contents._context.imageSmoothingEnabled = false;
This should set the scale mode to nearest neighbour for image data changes, e.g. blitting.

(The smooth flag affects how the bitmap's data is scaled relative to its parent, so keep that set to false.)
@utunnels made a small typo: imageSmoothingEnabled is a property of the rendering context, not the bitmap itself. Try this instead?
JavaScript:
this.contents._context.imageSmoothingEnabled = false;
This should set the scale mode to nearest neighbour for image data changes, e.g. blitting.

(The smooth flag affects how the bitmap's data is scaled relative to its parent, so keep that set to false.)

That solved everything. No more anti-aliasing. THANK YOU!

1745618924436.png

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-blt-blurriness.177218/