how to access an image that's dragged onto a DOM element

playing around with file dragging. I can get an image dragged into the page to display on the page using a createimg command and then I can put that image into the P5 canvas but is there a way of getting the dropped image file straight into a variable so I can access its pixels? I tried this but no dice:

function gotFile(file){

var img = file.data image(img,0,0) }

Answers

Sign In or Register to comment.