ID:138244
 
Can we just make the mask color always a mask?

I am spending literally hours hunting down stray pixels of the mask color because under some circumstances the mask color is treated as grey.

It's very hard to find these pixels when they are the same color as the pixels around them which are treated differently.
On 12/23/00 11:42 pm Deadron wrote:
Can we just make the mask color always a mask?

I am spending literally hours hunting down stray pixels of the mask color because under some circumstances the mask color is treated as grey.

It's very hard to find these pixels when they are the same color as the pixels around them which are treated differently.

The color (192,192,192) should always be the mask when you are using 8-bit (or less) bitmaps. If this is not the case, please provide an example and I will try to fix it.

If you are using 24-bit images,then this will not work, because the image must get dithered to fit into our color scheme. But usually 24-bit images don't employ palettes. In your image editor, you can conver to 8-bit _first_, then assign the mask.

I can try to support masks in 24-bit if that is necessary.
In response to Tom H.
On 12/24/00 2:44 am Tom H. wrote:
The color (192,192,192) should always be the mask when you are using 8-bit (or less) bitmaps. If this is not the case, please provide an example and I will try to fix it.

If you are using 24-bit images,then this will not work, because the image must get dithered to fit into our color scheme. But usually 24-bit images don't employ palettes. In your image editor, you can conver to 8-bit _first_, then assign the mask.

I can try to support masks in 24-bit if that is necessary.


I actually don't know if the original was 24 bit (have to ask Guy!) cause I got it in .dmi form and only using 8 colors or so.

However, even if it was 24 bit, behavior is inconsistent. If I copy/pasted the image, then the gray was treated as mask, even though in all other cases it wasn't...

Would it be possible to indicate in the icon editor whether it's a 24-bit image? It's quite easy to be in 24 bit without realizing it, and quite confusing when the icon editor doesn't behave as expected.
In response to Deadron
On 12/24/00 11:16 am Deadron wrote:

I actually don't know if the original was 24 bit (have to ask Guy!) cause I got it in .dmi form and only using 8 colors or so.

If it's in .dmi form, it should be 8-bit.

Can you email or point me to an example? This shouldn't be happening.

[Edit]

Oh, I bet I know what is happening, but I'll need to see the original (pre-dmi) icon to know for sure.

DMI icons technically don't turn all gray (192,192,192) into the mask-- they just turn colors assigned with the first palette slot for the mask. So if you happen to have a color with the same rgb as that slot, it will display as gray but will look the same as the mask in the editor. In other words, the DMI pixmap is a 32x32 grid of numbers ranging from 0 to 255, corresponding to the 256 slots in the palette. Any point with number = 0 will be a mask.

Now, I'm not sure how you are getting into this situation in the first place. Either the pre-dmi icon actually has different shades of gray, or the dmi icon itself was just designed with this in mind, or we screwed up in the importing somewhere. That's why I need to see the original icon so I can test the importing myself. Seeing the dmi version would help confirm this as well.
In response to Tom H.
On 12/24/00 3:31 pm Tom H. wrote:

Now, I'm not sure how you are getting into this situation in the first place.

Never mind. I just noticed that bmps aren't importing the mask color as the mask, as I should have inferred from your original post. This may require some finesse to get it to work for 24-bit bmp imports, but I'll fix it.