Thursday, 7 April 2022

How to fix a grayscale border when downloading html elements with html2 canvas

I am building a sudoku puzzle generator + sudoku downloader. There is no problem with the sudoku itself, but with the downloaded image of it.

So, I'm using html2 canvas, which allows me to download html elements. I did this with the sudoku. The big problem is that when I download that html element, I see some grayscale around the borders, as you can see in this example: enter image description here

And in the website you can't see that grayscale border: enter image description here

This probably does not have to do anything with css, because there is no problem in the styling itself, but in the way the html was downloaded.

I tried using different image formats, like png, jpg and heic, the results were all the same.

If someone knows anything that could solve my problem, please let me know.



from How to fix a grayscale border when downloading html elements with html2 canvas

No comments:

Post a Comment