Fix deprecation warning (libtiff)

/usr/include/x86_64-linux-gnu/tiff.h:81:45: note: 'uint16' has been explicitly marked deprecated here
typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED;
This commit is contained in:
Artem Pavlenko 2022-08-04 10:06:04 +01:00
parent 1ba1278b42
commit a9c98dff5d
2 changed files with 5 additions and 5 deletions

View file

@ -207,12 +207,12 @@ struct tag_setter
TIFFSetField(output_, TIFFTAG_SAMPLESPERPIXEL, 4);
if (data.get_premultiplied())
{
uint16 extras[] = {EXTRASAMPLE_ASSOCALPHA};
std::uint16_t extras[] = {EXTRASAMPLE_ASSOCALPHA};
TIFFSetField(output_, TIFFTAG_EXTRASAMPLES, 1, extras);
}
else
{
uint16 extras[] = {EXTRASAMPLE_UNASSALPHA};
std::uint16_t extras[] = {EXTRASAMPLE_UNASSALPHA};
TIFFSetField(output_, TIFFTAG_EXTRASAMPLES, 1, extras);
}
if (config_.compression == COMPRESSION_DEFLATE || config_.compression == COMPRESSION_ADOBE_DEFLATE ||

View file

@ -253,8 +253,8 @@ void tiff_reader<T>::init()
read_method_ = stripped;
}
// TIFFTAG_EXTRASAMPLES
uint16 extrasamples = 0;
uint16* sampleinfo = nullptr;
std::uint16_t extrasamples = 0;
std::uint16_t* sampleinfo = nullptr;
if (TIFFGetField(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, &sampleinfo))
{
has_alpha_ = true;
@ -265,7 +265,7 @@ void tiff_reader<T>::init()
}
// Try extracting bounding box from geoTIFF tags
{
uint16 count = 0;
std::uint16_t count = 0;
double* pixelscale;
double* tilepoint;
if (TIFFGetField(tif, 33550, &count, &pixelscale) == 1 && count == 3 &&