2002.10.04 14:26 "run length array extraction", by Mark Trueman

2002.10.04 14:26 "run length array extraction", by Mark Trueman

Hi,

I need some help with the decompression of a g4 tiff. Im trying to dissect tifflib so that i can partially decompress the image. What i mean by this is that i want an array/vector that contains the runlengths in the image. For example, each scanline should be represented as a list of numbers, each one representing the last pixel of a certain colour in the scanline ie "3,10,13,14,19" would be 3 white, 7 black, 3 white, 1 black, 5 white. I believe this is done in the expand2d macro in some way (but im not sure).

I can just about understand how the macros work but im not a great c/c++ programmer (only a few months experience) and im having trouble ripping out what i need. If someone could give me some pointers as to what bits i need in order to load the tiff, get it into the state that i require and then, after performing some manipulation on these "boundries", re-compress it and write it back, i would be very grateful.

Thanks in advance

Mark