2012.07.29 18:34 "[Tiff] So ... what about exporting TIFFDataSize?", by Tom Lane

2012.07.29 18:51 "Re: [Tiff] So ... what about exporting TIFFDataSize?", by Even Rouault

Le dimanche 29 juillet 2012 20:34:58, Tom Lane a écrit:

Armed with the accessor functions for TIFFField, I went back for another try at building freeimage with libtiff 4.0, and found there's still a remaining problem: it tries to use _TIFFDataSize() which is no longer accessible from outside the library. Looking at this, it seems like we should export that function or something just like it, because the only alternative is for clients to have built-in knowledge that TIFF_RATIONAL is funny. I see that tiffset.c has effectively duplicated TIFFDataSize() in-line, which is surely even worse.

So, any objections to renaming this to TIFFDataSize() and exporting it? Has anyone got a better naming suggestion than that?

No better suggestion, but due to the fact that the difference between the concepts of Size and Width might not be obvious to the reader, it might be wise to be really explicit in the documentation of how they differ. If I understand well, TIFFDataWidth() is about the size on disk, and TIFFDataSize() the size in memory?