I am looking for a jquery image eraser plugin that can erase parts of an actual image. For example, if a user uploads an image of a monkey and decides that he does not want the tail, then he should be able to move the mouse over the tail and erase it. To keep it simple, lets assume that all images are black and white and background is always white.
I have searched for quite some time and most "jquery eraser" plugins point to a canvas eraser and not a true image eraser. For example: http://minimal.be/lab/jQuery.eraser/ this creates a canvas on top of an image and you can then erase the canvas - this is NOT the requirement
Couple of other threads on stackoverflow are interesting: like How to erase partially image with javascript and result of erase pixel is transperent?
Is there a plugin that can do this with canvas
I don't know of a non-canvas plugin that does just image erasing.
I don't think its easily done on the client-side without the canvas element because html5 canvas is the only native element that can edit an existing image at the pixel level and then save the edited image.
As you've discovered, it's easy enough to do using html5 canvas:
drawImagean image onto a canvas element,destination-outcompositing to let the user erase part of the image,.toDataURLHere's a simple proof-of-concept for you to start from: