2016.11.12 20:40 "Re: [Tiff] Global variables in LibTIFF", by Paavo Helde
On 12.11.2016 2:24, Yakov Galka wrote:
Following our discussion of this issue a few month ago I actually went implementing it. You can look at the patches based on my current code on the following links. I've split it into two patches for easier review: one of the manual edits and one of the autoreplace of the TIFFError/Warning calls:
- I tried to prevent combinatorial explosion by introducing a two step TIFF creation: first one allocates the structure, sets the relevant parameters, then issues the actual Open* call. That state separation actually happened to be useful in fax2tiff in the "FakeInput" TIFF.
Two-step initialization seems very fine to me. At first you initialize the library/engine, then use this initialized engine to actually open/initialize TIFF files. These are two separate operations logically and this should be exposed at the SDK level as well.
Of course, backwards compatibility with previous versions is a must.
just my 2 euro cents