Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding drop shadow to GIF changes gray to black

Status
Not open for further replies.

mkrausnick

Programmer
Apr 2, 2002
766
US
I have a small GIF to which I want to add a blurry gray drop shadow. The GIF will be used as an IMG link on a web page. The GIF has transparency set so the image appears to be oval-shaped.

I can add the drop shadow in layer properties - no problem. I adjust the settings to get what I want and it looks great.

Here's the problem: In order to edit the layer, I am forced to change the image color mode from Indexed Color to something else (otherwise the layer is locked). When I try to save the GIF, the mode is changed back to Indexed Color and the blurry gray shadow changes to solid black.

How can I save the GIF with the drop shadow unchanged?


Mike Krausnick
Dublin, California
 
Problem with GIF is it only contains one level of transparency. Since the drop shadow in effect is a colour that gradualy fades to transparency the gif is making it 'solid' instead of a fade. You may want to consider saving it as a PNG as that does a better job with transparency or if you can get away with a solid background then save as a JPEG.
 
I suppose not you need to change the last part /tutorial... to
/tutorial_30.html
 
mscallisto, thanks for the input.
A very interesting link on creating realistic shadows. But I'm looking for a simple drop-shadow, and the issue is that I can make the shadow but I can't save it.

dimoj,
I tried saving it as PNG and it didn't save the shadow at all - so from one extreme to the other. I was, however, able to save it as a JPG. It looks great, except of course, it's surrounded by a white rectangle.

I've seen this technique on many graphics on web pages. How the heck do they do it?

Any help, as always, is greatly appreciated.

Mike Krausnick
Dublin, California
 
Here's a simple way, but first, understand that your drop shadow won't have any trasparency associated with it. The transparency will begin after the dropoff regions surrounding the drop shadow.

Here is one of many ways:

First, flatten your image. Then, create a layer below the image with the drop shadow. Make sure it's transparent. Then, use your magic wand selector (with zero tolerance) to select the white region you want transparent, and press delete to clear it.

What you should be left with is the image, with drop shadow, and a tranparent region surrounding it.

Then go to "Save For Web" - Select GIF for your format, check the Transparency box, and choose white for your matte color...then click Save, and you should have what you're looking for.

Hope that helps.






 
BTW Mike, I have this thread set for email notification, so if you're not sure what my instructions were, or have a question about it, respond here and I'll get back to you on it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top