You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
put whole canvas size data with the shift of width and height, so it should be outside canvas
What I got:
draw image for whole canvas size
get only part of canvas (0.36% in each direction)
put it in the 0.36% of width and height
It seems like geiImageData and putImageData interpret the coordinates (canvas.width, canvas.height) in other way than drawImage or even fillRect which also works correctly. I calculated this scale, and it seems to be exactly 2.75 (0.36). The proportions are keeped.
My canvas size is 1/3 of screen width and proportion is 3:4. But as I checked, it does not affect scale.
When I replace canvas.width with the number, it is all the same.
Please, tell me if I am doing something wrong or what could cause this issue
The text was updated successfully, but these errors were encountered:
iddan
changed the title
Difference in drawImage coorginates and getImageData/putImageData coordinates
Difference in drawImage coordinates and getImageData/putImageData coordinates
Jun 19, 2023
Hi, i made folllowing code:
and the canvas
and now my canvas looks like this:
What I think I am doing:
What I got:
It seems like geiImageData and putImageData interpret the coordinates (canvas.width, canvas.height) in other way than drawImage or even fillRect which also works correctly. I calculated this scale, and it seems to be exactly 2.75 (0.36). The proportions are keeped.
My canvas size is 1/3 of screen width and proportion is 3:4. But as I checked, it does not affect scale.
When I replace canvas.width with the number, it is all the same.
Please, tell me if I am doing something wrong or what could cause this issue
The text was updated successfully, but these errors were encountered: