Closed Harusakii closed 1 year ago
Sometimes it goes completely wild like this:
I'm sorry, but every one of those images on this page, look exactly the same! I'm on an older Win10 laptop. What is the pixel density of your display? Is it retina?
I'll wait for the experts to chime in. I just wanted you to know that I can't see any issue on my low res laptop.
here there are zoomed in on a white background, also the (edit: original) pics are 300x300 (edit:) and my display has a PPI of 110
My PPI is only 72. Try this
const canvas = createCanvas(300, 300);
const ctx = canvas.getContext("2d");
// refresh the surface
ctx.clearRect(0, 0, 300, 300;
// draw the house
oh yeah, it indeed did help! But still very weird, I would expect a completely new and cleared Context when I create one and not need to clear it manually.
Maybe write this in the documentation ahah. thank you very much though (also for your replying speed)!
So basically, when running this simple code:
it should return a simple house, which it does, but the problem is that it also generates weird pixels on the border of the images:
how it should look like (canvas in nodejs);
how it looks like with this package for deno:
in this example you see that the top left of the image has like different colors to single pixels which is very weird (zoom to the top left to see it better)