0

I am displaying the color JPG image of A4 document on canvas. However, the letters of the image shown in canvas are not clear.

Recently, I saw the content of image resample through javascript.

Please help me with how to make the characters inside the document image clear using the image filter.

Puhahaho
  • 1
  • 2
  • I believe the required filters will depend from image to image; can you please show us a piece of the image so we can have a better idea? – Haroldo_OK Sep 29 '22 at 10:04
  • Have you used CSS styles (width, height) to size the canvas? – Teemu Sep 29 '22 at 11:50
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 29 '22 at 17:34
  • First of all, thank you very much for your interest! I made JSFIDLE as follows URL : https://jsfiddle.net/j1fwka5v/ I made the canvas smaller, but even if it's bigger, the letters are not as clear as I thought. Please help me with how to apply image filtering so that it can be clearly displayed. – Puhahaho Sep 29 '22 at 23:34
  • JPEG is a raster image, it gets blurred when resized from the natural dimensions. The only way you can make the text sharper is to create the image so, that its natural size matches the canvas size. Even then the text might be not sharp enough, maybe you should use looseless PNG format instead of JPG ..? – Teemu Sep 30 '22 at 05:57

0 Answers0