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

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -