To turn off antialiasing on an HTML canvas with JavaScript, we set the imageSmoothingEnabled
property.
For instance, we write
context.imageSmoothingEnabled = false;
to set the canvas’ context
‘s imageSmoothingEnabled
property to false
to disable antialiasing.