Older libtiff versions...
Hauke Heibel
hauke.heibel at googlemail.com
Wed Jul 14 03:35:46 EDT 2010
Hi Adam,
I am still here and since a colleague of mine wants to start working
with the lib since I still don't have enough time I am looking into a
few things again.
A quick overview of what is happening. I got a new system, had to
reinstall and my environment is slightly different than last time.
Last time I build all the dependencies myself because on Windows there
are no system versions of tiff, png, jpeg, etc.
This time I was wondering whether I could use the versions of ITK.
They have CMake configuration for all these libraries which makes it
very simple to build them. The manual builds are in particular ugly
because many of these libraries support Unix build environments only.
After trying this, I stumbled over a tiny issue which is probably
generally related to older libtiff versions.
The functions TIFFRGBAImageGet and TIFFReadRGBAImageOriented are
declared to take uint32* and this is true even in new versions.
OpenSlide is internally using uint32_t and this implies that you
expect them to be identical (uint32 = uint32_t). This is at least with
the older libtiff version not necessarily the case, with newer ones it
is but that may still be by chance.
My suggestion is to change the following lines (line numbers may vary
due to more changes in my code):
1) openslide-ops-tiff.c (line 485)
-if (TIFFRGBAImageGet(&img, dest, w, h)) {
+if (TIFFRGBAImageGet(&img, (uint32*)dest, w, h)) {
2) openslide-vendor-aperio.c (line 287)
-if (!TIFFReadRGBAImageOriented(tiff, w, h, img_data, ORIENTATION_TOPLEFT, 0)) {
+if (!TIFFReadRGBAImageOriented(tiff, w, h, (uint32*)img_data,
ORIENTATION_TOPLEFT, 0)) {
When uint32 and uint32_t are identical the compiler will remove this
in the other case it sill does not hurt, since both types are 32bit
unsigned.
What do you think?
Regards,
- Hauke
More information about the openslide-users
mailing list