From c0e92efde871631f5e87d06caae543341d878215 Mon Sep 17 00:00:00 2001 From: Dmitriy Kovalenko Date: Thu, 22 Aug 2024 16:59:22 +0200 Subject: [PATCH] Remove -cc gcc --- io/tiff/ReadTiff.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/io/tiff/ReadTiff.c b/io/tiff/ReadTiff.c index 9a314b10..e2d04b98 100644 --- a/io/tiff/ReadTiff.c +++ b/io/tiff/ReadTiff.c @@ -1,5 +1,4 @@ #define CAML_NAME_SPACE -#include #include #include @@ -10,6 +9,13 @@ #include +#ifdef _WIN32 +#include // For structured exception handling (SEH) +#include +#include +#include +#endif + CAMLprim value read_tiff_file_to_tuple(value file) { CAMLparam1(file); CAMLlocal2(res, ba); @@ -34,6 +40,7 @@ CAMLprim value read_tiff_file_to_tuple(value file) { NULL, dims); uint32_t *buffer = (uint32_t *)Caml_ba_data_val(ba); + if (!(TIFFReadRGBAImageOriented(image, width, height, buffer, ORIENTATION_TOPLEFT, 0))) { TIFFClose(image);