Posts from Thursday, September 1st, 2005

Clearly Impossible?

Published 13 years, 1 month ago

I’ve been pounding my brain against a problem in Photoshop CS for the last few months—no, not continuously—and I’ve given up.  Now I turn to the PSD experts in the crowd for help.

What I want to do seems simple enough.  The goal here is to have a PNG where the alpha channel coincides precisely with a visible pieces of the image.  In other words, if the visible image is a large black diamond, then I want the alpha channel to be in the same shape and intensity as the diamond.  That way, in IE/Win, there will be a big black diamond.  In other, more capable browsers, there will be a transparent diamond with a white mask, so I can set whatever background color I want.

Here are two images that, I hope, illustrate what I’m aiming to do.  The first image is what IE/Win would render, and the second is a representation of what another browser would render (the gray checkerboard pattern representing the transparent parts of the PNG).

I’ve fiddled with combinations of masks, layers, alpha channels, and more until my head feels ready to explode.  No matter what I do, I can get either an image that’s opaque (read: no alpha channel) in all browsers, or an image with a full alpha channel, where the alpha portion is filled with a light silver-gray in IE/Win.

It seems like there has to be a way to do this, and that someone out there knows what it is.  So how in the name of the sweet Virgin Mary do I get this to work?

Update: I sense that people aren’t getting what I want to do.  What I effectively want to do is take an image of the diamond—a GIF, a TIFF, whatever—and, in turning it into a PNG, add an alpha channel such that the diamond gets “knocked out” in programs that understand the alpha channel.  In those that don’t, like IE/Win, the regular image should just appear, with no alpha-channel effects.  Just the black diamond.

And I want to know how to do it in Photoshop, which is the tool I use.  Telling me how to do it in GIMP would be incredibly useful if I hadn’t thoroughly hated GIMP’s UI, and thus uninstalled it about ten minutes after installing it, back when I did.  (To be fair, it might have been the X11 UI that I hated, but since GIMP was the only X11 application I’ve run… you see where I’m headed with that, I hope.)