2006.09.15 12:38 "[Tiff] is there alpha component present in Grayscale or Palette color image", by Anurag Singh

2006.09.16 22:20 "Re: [Tiff] is there alpha component present in GrayscaleorPalettecolorimage", by Toby Thain

On 16-Sep-06, at 6:18 PM, Joris wrote:

Why is that challenging? You just omit that index from colour matching consideration. In most cases, just thresholding alpha to that index would be sufficient for opacity handling.

You're clearly talking about the case where one palette entry is made to code full transparency, and others are made to have no transparency at all.

I am. I'll postpone worrying about the more general case until I meet it in real life. :)


I'm refering instead to the general case of alpha inside palette entries, where for example you could have RGBA values like (20,20,20,100) and (20,20,20,200). That's the general case when we are assessing transparency inside palettes. Thus, dithering involves calculating differences between RGBA values. Aside from the fact that RGB is not a colorspace proportional to vision but a space proportional to CRT voltages and thus the normal euclidean distance between RGB values doesn't make much sense in a dithering algorithm, the real challenge here is to somehow involve alpha in that scheme. Is RGBA (20,20,20,20) closest to RGBA (20,20,100,20), or is it closest to RGBA (20,20,20,100)? Put more generally, you need to weigh color difference against alpha difference, and it's not quite clear how to avoid making rather arbitrary weight decisions.