[Bf-blender-cvs] [e12a8aedce5] master: Cleanup: remove use of deprecated uint32, utin16 types

Campbell Barton noreply at git.blender.org
Mon Apr 26 15:00:58 CEST 2021


Commit: e12a8aedce52a05a635a4a70721a33352fe5de58
Author: Campbell Barton
Date:   Mon Apr 26 14:23:31 2021 +1000
Branches: master
https://developer.blender.org/rBe12a8aedce52a05a635a4a70721a33352fe5de58

Cleanup: remove use of deprecated uint32, utin16 types

===================================================================

M	source/blender/imbuf/intern/tiff.c

===================================================================

diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 001cd4e1575..12f7553d5e4 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -374,7 +374,7 @@ static void scanline_separate_32bit(float *rectf, const float *fbuf, int scanlin
 
 static void imb_read_tiff_resolution(ImBuf *ibuf, TIFF *image)
 {
-  uint16 unit;
+  uint16_t unit;
   float xres;
   float yres;
 
@@ -569,7 +569,7 @@ ImBuf *imb_loadtiff(const unsigned char *mem,
   TIFF *image = NULL;
   ImBuf *ibuf = NULL, *hbuf;
   ImbTIFFMemFile memFile;
-  uint32 width, height;
+  uint32_t width, height;
   char *format = NULL;
   int level;
   short spp;
@@ -690,7 +690,7 @@ void imb_loadtiletiff(
     ImBuf *ibuf, const unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect)
 {
   TIFF *image = NULL;
-  uint32 width, height;
+  uint32_t width, height;
   ImbTIFFMemFile memFile;
 
   image = imb_tiff_client_open(&memFile, mem, size);
@@ -761,7 +761,7 @@ void imb_loadtiletiff(
 bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags)
 {
   TIFF *image = NULL;
-  uint16 samplesperpixel, bitspersample;
+  uint16_t samplesperpixel, bitspersample;
   size_t npixels;
   unsigned char *pixels = NULL;
   unsigned char *from = NULL, *to = NULL;
@@ -774,7 +774,7 @@ bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags)
   /* check for a valid number of bytes per pixel.  Like the PNG writer,
    * the TIFF writer supports 1, 3 or 4 bytes per pixel, corresponding
    * to gray, RGB, RGBA respectively. */
-  samplesperpixel = (uint16)((ibuf->planes + 7) >> 3);
+  samplesperpixel = (uint16_t)((ibuf->planes + 7) >> 3);
   if ((samplesperpixel > 4) || (samplesperpixel == 2)) {
     fprintf(stderr,
             "imb_savetiff: unsupported number of bytes per "



More information about the Bf-blender-cvs mailing list