summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kimgio/tiffr.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/kimgio/tiffr.cpp b/kimgio/tiffr.cpp
index 79f890bfe..2678d537e 100644
--- a/kimgio/tiffr.cpp
+++ b/kimgio/tiffr.cpp
@@ -13,6 +13,13 @@
#include <assert.h>
+#if (TIFFLIB_VERSION >= 20210416)
+#undef uint16
+#define uint16 uint16_t
+#undef uint32
+#define uint32 uint32_t
+#endif
+
#include "tiffr.h"
static tsize_t tiff_read( thandle_t handle, tdata_t buf, tsize_t size )
@@ -67,8 +74,8 @@ TDE_EXPORT void kimgio_tiff_read( TQImageIO *io )
uint32 width, height;
uint32 *data;
- uint16_t extra_samples_count;
- uint16_t *extra_samples;
+ uint16 extra_samples_count;
+ uint16 *extra_samples;
// FIXME: use qdatastream
@@ -139,7 +146,7 @@ TDE_EXPORT void kimgio_tiff_read( TQImageIO *io )
if (TIFFGetField(tiff, TIFFTAG_EXTRASAMPLES, &extra_samples_count, &extra_samples) == 1)
{
kdDebug(399) << "TIFF image has " << extra_samples_count << " extra sample(s)." << endl;
- for (uint16_t i = 0; i < extra_samples_count; i++)
+ for (uint16 i = 0; i < extra_samples_count; i++)
{
if ((extra_samples[i] == EXTRASAMPLE_ASSOCALPHA) ||
(extra_samples[i] == EXTRASAMPLE_UNASSALPHA))