Page 1 of 1
Removing single color shadow / White to transparent
Posted: 2010-11-02T13:02:05-07:00
by Cmars
Well I'm trying to add a remove shadow on my bot but I can't seem to get it right (like always)
Image:
Close up:
Also, removing the white transparent out interrupting the image (if has white inside the image)
Thank's for reading.
Re: Removing single color shadow / White to transparent
Posted: 2010-11-02T15:49:59-07:00
by fmw42
Your alpha channel is totally white. So no transparency anywhere. You need to make a (b/w or grayscale) mask to cut out the parts you don't want and then overlay that on your base image.
Re: Removing single color shadow / White to transparent
Posted: 2010-11-02T22:06:37-07:00
by anthony
I would start by turning white into a masking image. then mody that mask by removing any pixel that is down and left of another pixel in the mask! that will remove the 'shadow'
Hmmm...
First the mask...
Code: Select all
convert image.png -negate -threshold 0 mask.png
now get rid of the shadow
Code: Select all
convert mask.png \( +clone -roll -1-1 \) -compose multiply -composite mask2.png
and apply mask to image
Code: Select all
convert image.png mask2.png -alpha off -compose CopyOpacity -composite result.png
there you go, masked and a one pixel shadow removed.
Re: Removing single color shadow / White to transparent
Posted: 2010-11-02T22:22:04-07:00
by Cmars
Thank you anthony