2006.10.06 22:03 "[Tiff] Inverting color space values in a TIFF file", by Richard Nolde
I'm working a an extension to tiffcrop that will invert the color space of an image.
For Bilevel and Grayscale images, this makes sense. I use it to convert a negative microfilm image to a positive one.
However, is there a meaningful inversion of a palette color or an RGBA image and would this be done by modifying the palette rather than the data that points
into the palette/lookup tables? What sort of algorithm should be applied to the
data in the palettes? Eg for 8 bit grayscale, I just subtract the value from 255
and for bilevel data, I just invert the bits with ones complement operator. Doing
the same for palette images produces viewable but bizarre images. Instead, should I simply subtract the values in the palette from 255 for 8 bit per color
images? I assume an Alpha Channel value would not be modified.
My version runs successful on images that have a multiple of 8 bits per pixel and
1 bit per pixel, but I doubt that inverted palette color images mean anything to anyone.
Is there any point in allowing such images to be Inverted?