I know that you can get the value of each pixel inside the html5 Canvas using getImageData() and .data() but is there a way to get their coordinates and not just their values?
相关问题
- Does using percentages instead of pixels change an
- Method for drawing circles in a pyramid pattern
- HTML5 - Canvas - Optimization for large images
- A function to preload images - need to draw them n
- Canvas fillStyle none in HTML5
It's just as easy to derive the x/y from the index while looping through the image data array, or to add in offsets if you have fetched only part of the canvas pixels.