diff options
author | Christian C <cc@localhost> | 2025-03-06 15:56:06 -0800 |
---|---|---|
committer | Christian C <cc@localhost> | 2025-03-06 15:56:06 -0800 |
commit | 6d46ed36bcad62db89af29512b4ca5f4fa7c423a (patch) | |
tree | 7a312c11f5b04585cb7a07b16d02b03505301f33 /src/lib/seg | |
parent | 71a446f7df79863738eb0bc5eb4e54551905deec (diff) |
Suppress TIFF Metadata warnings
Diffstat (limited to 'src/lib/seg')
-rw-r--r-- | src/lib/seg/util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/seg/util.c b/src/lib/seg/util.c index a45f6c8..238fa1c 100644 --- a/src/lib/seg/util.c +++ b/src/lib/seg/util.c @@ -7,6 +7,12 @@ #include <stdlib.h> #include <string.h> +// Suppress Tiff Warnings +void TiffDummyHandler(const char* module, const char* fmt, va_list ap) +{ + // ignore errors and warnings (or handle them your own way) +} + // Convert x,y coords to linear coordinate size_t xy_to_coord(size_t x, size_t y, uint32_t width, uint32_t height) { @@ -221,6 +227,7 @@ uint16_t* combine_masks(uint16_t *destination, uint16_t *extra_labels, uint32_t // starting_label_p will be incremented for each label found in the image uint16_t* tif_to_labels(char* tif_file_name, uint32_t *width, uint32_t *height, uint16_t *starting_label_p) { + TIFFSetWarningHandler(TiffDummyHandler); //-TIFF-IMAGE-OPEN------------------------------- TIFF *tif = TIFFOpen(tif_file_name, "r"); if (!tif) { |