ID:259242
 
Well, I built my first big icon tonight. It plopped onto the map without any trouble at all. Nice work, Dantom!

And now, to reward you for your labors, I have a question. Wait, that's not a reward. Sorry.

According to my paint program, there's no way to save transparency in a BMP file. But I'm wondering if there's a way to import it. In my paint program I tried setting palette color 0 to a bright green, hoping it would switch to transparent when imported; but no luck. Then again, I'm not all that familiar with palettes in general, so that might have been the wrong approach.

Anyway, the question is: is it currently possible to get transparency in big icons?

And now, off to bed... congratulations on the new release!
On 10/4/00 9:19 pm Guy T. wrote:

Anyway, the question is: is it currently possible to get transparency in big icons?

Not right now, but maybe we can just designate a particular color to service as a transparency (for instance, that blah gray used as the mask in the icon editor). Unfortunatly this may cause problems with imported BMPs that actually use that as a color. It's too bad that the BMP format doesn't have something like this built in. Our original format of choice, the obsolete XPM, did handle this.

Eventually we'll end up supporting GIFs, which not only handle transparency but also do animation, so if you can wait for that this will be resolved without a cludge.
In response to Tom H.
Not right now, but maybe we can just designate a particular color to service as a transparency (for instance, that blah gray used as the mask in the icon editor). Unfortunatly this may cause problems with imported BMPs that actually use that as a color. It's too bad that the BMP format doesn't have something like this built in. Our original format of choice, the obsolete XPM, did handle this.

Eventually we'll end up supporting GIFs, which not only handle transparency but also do animation, so if you can wait for that this will be resolved without a cludge.


I could wait for GIFs... but, if the "designated color" method you describe can be added in without hours of programming time, I'd suggest trying it. It would add a huge amount of versatility, and there are at least two ways to get around it when the behavior isn't desired:

1) In your paint program, switch the areas that shouldn't be transparent to a color that's different but not different enough to be detected by the human eye.

2) Create a gray icon and (thanks to the map editor's auto-underlaying) just draw a gray "mat" for the image to rest on.

But wait, there's more! If you really wanted to get sophisticated (and still, hopefully, not have to spend hours fiddling with the source code) you could use a "magic dot." If the upper-left pixel of the image is the designated color, enable transparency; otherwise, gray = gray.

So, in my complete ignorance of BMP handling, the pseudocode would look something like this:

if(getColor(getPixel(minX, maxY)) == "#080808")
for(myPixel in myBMP)
if(getColor(myPixel) == "#080808") setTransparency(myPixel)


My guess is this would handle about 99% of the cases properly without requiring any special effort on the user's part. [Edit: OK, that figure may be a little too high.] And for the rest, I'd be willing to write a tutorial. (Hmm. I think I already promised a tutorial if big icons were implemented, didn't I? Dang.)

So, whaddaya think?

[Edit: to clarify my intentions here, I'm thinking mainly of cases where you want to design irregularly-shaped objects. Transparency within the picture usually wouldn't be such a big thing; but transparency around the edges seems like it would be pretty valuable to have. Otherwise you have a big, obvious rectangle on the screen, which is handy for pictures of Jimmy Carter, but not for oases or turbines or rock outcroppings or... you get the drift.

Of course, you could always draw a mat on the map editor, do a screen capture, pull it into your paint program, and paste your image over it. It would still, by a country mile, beat chopping up the BMP by hand.]
In response to Guy T.
On 10/5/00 5:04 am Guy T. wrote:

So, whaddaya think?

Fair enough. You'll have it with the 253 patch later today. We have to put out the patch anyway due to that awful spacey-path bug that has to do with the registry install.

But if people complain when their bitmaps have holes in them, I'm forwarding all hate mail to you!
In response to Tom H.
Fair enough. You'll have it with the 253 patch later today. We have to put out the patch anyway due to that awful spacey-path bug that has to do with the registry install.

Excellent! Thanks.


But if people complain when their bitmaps have holes in them, I'm forwarding all hate mail to you!

Fair enough. :)