|
|
|
|
|
by mpmpmpmp
1565 days ago
|
|
What would your strategy for working with raw image data and implementing a digital “zoom” that doesn’t do any anti aliasing or smoothing? My current thought is to just have an original copy of the data and then the current canvas is just a smaller subset of the original data when zoomed. So a 100x100 pixel image when zoomed 1x would take a 50x50 subset based on the center of the viewport and copy each pixel into a 2x2 to get back to a 100x100 image. |
|
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRende...