| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2006.10.06 22:05 "Re: Inverting color space values in a TIFF file", by Toby ThainOn 7-Oct-06, at 2:03 AM, Richard Nolde wrote: > Tiff list: > 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. Why doesn't inverting the entries in the palette work (leaving pixel indices unchanged)? --Toby > 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? > > Richard Nolde > > > _______________________________________________ > Tiff mailing list: Tiff@lists.maptools.org > http://lists.maptools.org/mailman/listinfo/tiff > http://www.remotesensing.org/libtiff/ _______________________________________________ Tiff mailing list: Tiff@lists.maptools.org http://lists.maptools.org/mailman/listinfo/tiff http://www.remotesensing.org/libtiff/ |
|||||||