Help! How can I shadow the transparent gif image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
harian

Help! How can I shadow the transparent gif image

Post by harian »

I have a gif image with a transparent hole on center, how can I shadow this image and keep the centeral hole transparent, I try shadowImage command but the transparency is override.

pls help me. thanks.

Image
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Help! How can I shadow the transparent gif image

Post by anthony »

You will need to try and mask out white.

Trying to preserve the anti-aliasing edges of the masked image is going to be a real problem in this case, as you have white in the 'stones' of the image as well.

Some morphological mask filtering to try and recover the anti-aliasing may be needed. alternativally some type of mask feathering may be needed to 'fake' the anti-aliased edges of the image.

Without some attempt to recover the anti-aliasing, you will have end up with a highly aliased (staircase-like) edging to the stones that for this natural looking image will not look very nice.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply