User:Mikevoir/sandbox.js

$(function{	var canvas = document.createElement('canvas');	var context = canvas.getContext('2d');	var food = new Image;	food.onload = function{		context.drawImage(food, 0, 0);		getPixelData;	};	food.crossOrigin = 'anonymous';	food.src = 'https://static.wikia.nocookie.net/gensin-impact/images/7/7c/Item_Cassoulet.png';	function getPixelData {		var x = 1;		var y = 1;		while (context.getImageData(x, y, 1, 1)) {			var pixel = context.getImageData(x, y, 1, 1);			var data = pixel.data;			console.log(data);			y++;			if (y>256) {				x++;				y = 0;			}		}	} });