I am uploading an image from a form (in wordpress), and I want to allow users to use a pencil tool to draw a line around an area. Think of the lasso tool in photoshop. So users can basically 'mark' that area to be modified.
What I would like to see, is if it is possible to use either imagemagik, gd, or a client side JS library to find that selected area, and convert everything inside to be transparent.
here is an example image. Say a person wants to upload this image, and using the uploader, they marked a red line to select what they would like to be transparent.
So the image inside the red line, should be detected by imagemagik/gd/client js, and everything in there will be transparent.
I could not find anything to see if this was possible or not. On the server I am using PHP so I can do it there if needed with imgmagik/gd if it is possible. So I would need to know if those can take the inside of the red area and make it transparent. But I would prefer, if I could find a client side JS library or jquery plugin, that will let the end user do that on the client side via an image upload utility. and then finally upload the final modified version of the image.
Any help or input on this is greatly appreciated.