goo/TiffWriter.cc |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit c59a6ffe3d4168d40e8ee95801c09069a32c34d4
Author: Albert Astals Cid <[email protected]>
Date:   Tue May 25 23:59:30 2021 +0200

    uintx -> uintx_t
    
    The non _t types were provided by libtiff and are now deprecated

diff --git a/goo/TiffWriter.cc b/goo/TiffWriter.cc
index 612c3960..98cbea52 100644
--- a/goo/TiffWriter.cc
+++ b/goo/TiffWriter.cc
@@ -5,7 +5,7 @@
 // This file is licensed under the GPLv2 or later
 //
 // Copyright (C) 2010, 2012 William Bader <[email protected]>
-// Copyright (C) 2012 Albert Astals Cid <[email protected]>
+// Copyright (C) 2012, 2021 Albert Astals Cid <[email protected]>
 // Copyright (C) 2012, 2017 Adrian Johnson <[email protected]>
 // Copyright (C) 2012 Pino Toscano <[email protected]>
 // Copyright (C) 2014 Steven Lee <[email protected]>
@@ -26,6 +26,8 @@ extern "C" {
 #    include <tiffio.h>
 }
 
+#    include <cstdint>
+
 struct TiffWriterPrivate
 {
     TIFF *f; // LibTiff file context
@@ -62,10 +64,10 @@ void TiffWriter::setCompressionString(const char 
*compressionStringArg)
 bool TiffWriter::init(FILE *openedFile, int width, int height, int hDPI, int 
vDPI)
 {
     unsigned int compression;
-    uint16 photometric = 0;
-    uint32 rowsperstrip = (uint32)-1;
+    uint16_t photometric = 0;
+    uint32_t rowsperstrip = (uint32_t)-1;
     int bitspersample;
-    uint16 samplesperpixel = 0;
+    uint16_t samplesperpixel = 0;
     const struct compression_name_tag
     {
         const char *compressionName; // name of the compression option from 
the command line
@@ -182,14 +184,14 @@ bool TiffWriter::init(FILE *openedFile, int width, int 
height, int hDPI, int vDP
     TIFFSetField(priv->f, TIFFTAG_BITSPERSAMPLE, bitspersample);
     TIFFSetField(priv->f, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
     TIFFSetField(priv->f, TIFFTAG_PHOTOMETRIC, photometric);
-    TIFFSetField(priv->f, TIFFTAG_COMPRESSION, (uint16)compression);
+    TIFFSetField(priv->f, TIFFTAG_COMPRESSION, (uint16_t)compression);
     TIFFSetField(priv->f, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(priv->f, 
rowsperstrip));
     TIFFSetField(priv->f, TIFFTAG_XRESOLUTION, (double)hDPI);
     TIFFSetField(priv->f, TIFFTAG_YRESOLUTION, (double)vDPI);
     TIFFSetField(priv->f, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
 
     if (priv->format == RGBA_PREMULTIPLIED) {
-        uint16 extra = EXTRASAMPLE_ASSOCALPHA;
+        uint16_t extra = EXTRASAMPLE_ASSOCALPHA;
         TIFFSetField(priv->f, TIFFTAG_EXTRASAMPLES, 1, &extra);
     }
 
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to