How to turn off antialiasing on an HTML canvas with JavaScript?

Spread the love

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.

Leave a Reply

Your email address will not be published. Required fields are marked *