diff --git a/bin/Main.ml b/bin/Main.ml index 59bf290f..f0ecf339 100644 --- a/bin/Main.ml +++ b/bin/Main.ml @@ -6,7 +6,7 @@ let getIOModule filename = | ".png" -> (module ODiffIO.Png.IO : ImageIO) | ".jpg" | ".jpeg" -> (module ODiffIO.Jpg.IO : ImageIO) | ".bmp" -> (module ODiffIO.Bmp.IO : ImageIO) - | ".tiff" -> (module ODiffIO.Tiff.IO : ImageIO) + (* | ".tiff" -> (module ODiffIO.Tiff.IO : ImageIO) *) | f -> failwith ("This format is not supported: " ^ f) type 'output diffResult = { exitCode : int; diff : 'output option } diff --git a/io/dune b/io/dune index 59b6a544..d739d352 100644 --- a/io/dune +++ b/io/dune @@ -3,4 +3,4 @@ (public_name odiff-io) (flags (-w -40 -w +26)) - (libraries odiff-io.png odiff-io.jpg odiff-io.bmp odiff-io.tiff)) + (libraries odiff-io.png odiff-io.jpg odiff-io.bmp)) 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);