
Thread
2005.09.19 06:32 "Re: [Tiff] How can I remove the last white lines?", by Joris Van Damme
Flávio,
I am a new user of libtiff library and I have some doubts. I am developing a program to read a tiff file G3 and I need to clear the last white lines from file, I would like to know what api can I use?
It is not clear to me what you mean. You could mean either
- Changing the decompressed memory, i.e. not changing the actual file at all. This is extremely easy.
- Transcoding, i.e. having a decompressor feeding a compressor, except that the last few lines of 'food' are to be changed in the process. This is easy.
- Same transcoding scheme applied to a single strip, in a single file, i.e. decompressor feeds a compressor that writes a replacement for the old strip back into the original file. This is probably still feasable.
- Changing actual encoded compressed data in a strip, so as to clear the last lines in that strip, without changing anything else in the file. This is possible in the case of G3 compression, I think, since the compressed data for the cleared lines will be smaller or equal in size to what was there given the G3 compression, and the lines are the last ones, so the data block becomes a little shorter and only the StripByteCount has to be adjusted to reflect that. It is the hardest option though, and a good knowledge of G3 compression is required.
- Or perhaps, by 'clearing the last white lines', you mean that you actually want to get rid of these lines alltogether, decrementing image height?
- Could you please explain which, if any, of the above guesses is what you are after?
Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html