Get first pixel (0,0) of image with jQuery -
i need first pixels (0,0)
of image jquery (rgba or hex)
pls me :d
you have draw image in canvas element. can use getimagedata
method return array containing rgba values.
var img = new image(); img.src = 'image.jpg'; var context = document.getelementbyid('canvas').getcontext('2d'); context.drawimage(img, 0, 0); data = context.getimagedata(x, y, 1, 1).data;
Comments
Post a Comment