AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1997.02.13 01:53 "TIFFWritedEncodedStrip behavior.", by Gabe Foster
1997.02.14 17:41 "Re: TIFFWritedEncodedStrip behavior.", by Sam Leffler

1997.02.14 17:41 "Re: TIFFWritedEncodedStrip behavior.", by Sam Leffler

I have a question for you about TIFFWritedEncodedStrip. Is it supposed to be able to modify buf? It turns out that during the prediction encoding step buf ends up being modified. Is this the right behavior?

I'm using LZW with prediction encoding on.

Yes. The horizontal differencing code does modify the user data; you can see this easily by looking at the source code. This is the only encoding case that modifies input data. BTW, you could tell this by looking at the function prototype for TIFFWritedEncodedStrip and noting that the image data parameter is of type tdata_t and *not* const tdata_t.

        Sam