AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2012.07.11 20:52 "[Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Jorge Martin
2012.07.11 21:35 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Bob Friesenhahn
2012.07.11 23:47 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Olivier Paquet
2012.07.12 09:44 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Joris Van Damme
2012.07.12 09:57 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Jorge Martin
2012.07.12 10:10 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Joris Van Damme
2012.07.12 10:17 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Jorge Martin
2012.07.12 11:17 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Joris Van Damme
2012.07.12 20:22 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Jorge

2012.07.12 09:44 "Re: [Tiff] Doubts about Strip and Tile Oriented read/write TIFF files", by Joris Van Damme

Olivier, all,

Obviously, it's better if you put zeroes there.

Actually zeroing out the 'unused' area might not be a TIFF writer's best option. It interferes badly with some compression modes, like JPEG, and with prediction and the likes.

To my mind, the best option is the repetition of the last valid color. I apply that in both directions, i.e. I repeat the last valid column of pixel values to the right, in right-most tiles, and I repeat the last valid line of pixels to the bottom, in bottom-most tiles. It's probably not ideal, and it may be that the best option is actually compression-mode-dependent, but in my opinion, in TIFF, it's very important to eliminate dependencies between the different steps of the encoding and decoding chains, and repetition of the last valid color is the single option I could find that doesn't hurt too much whatever the details of preceding and following steps may be.

Best regards,

Joris Van Damme
AWare Systems