Skip to content

Commit

Permalink
replace use of deprecated uint16/32 with uint16/32_t
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtournier committed May 6, 2021
1 parent b4f18a3 commit f02940e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions core/formats/tiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ namespace MR
if (! (Path::has_suffix (H.name(), ".tiff") ||
Path::has_suffix (H.name(), ".tif") ||
Path::has_suffix (H.name(), ".TIFF") ||
Path::has_suffix (H.name(), ".TIF")))
Path::has_suffix (H.name(), ".TIF")))
return std::unique_ptr<ImageIO::Base>();

File::TIFF tif (H.name());

uint32 width(0), height(0);
uint16 bpp(0), sampleformat(0), samplesperpixel(0), config (0);
uint32_t width(0), height(0);
uint16_t bpp(0), sampleformat(0), samplesperpixel(0), config (0);
size_t ndir = 0;

do {
Expand All @@ -57,7 +57,7 @@ namespace MR

H.ndim() = samplesperpixel > 1 ? 4 : 3;

H.size(0) = width;
H.size(0) = width;
H.stride(0) = 2;

H.size(1) = height;
Expand All @@ -73,7 +73,7 @@ namespace MR

H.datatype() = DataType::Undefined;
switch (bpp) {
case 8:
case 8:
switch (sampleformat) {
case 1: H.datatype() = DataType::UInt8; break;
case 2: H.datatype() = DataType::Int8; break;
Expand Down Expand Up @@ -114,7 +114,7 @@ namespace MR
if (Path::has_suffix (H.name(), ".tiff") ||
Path::has_suffix (H.name(), ".tif") ||
Path::has_suffix (H.name(), ".TIFF") ||
Path::has_suffix (H.name(), ".TIF"))
Path::has_suffix (H.name(), ".TIF"))
throw Exception ("TIFF format not supported for output");

return false;
Expand Down
2 changes: 1 addition & 1 deletion core/image_io/tiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace MR
for (auto& entry : files) {
File::TIFF tif (entry.name);

uint16 config (0);
uint16_t config (0);
tif.read_and_check (TIFFTAG_PLANARCONFIG, config);

size_t scanline_size = tif.scanline_size();
Expand Down

0 comments on commit f02940e

Please sign in to comment.