Bug in Image Resizer node with specific TIFF XResolution, YResolution

Hoping this is the right channel for reporting a bug, if not, please advise!

A customer has reported us a problem related to how the pixel resolution is encoded in some TIFF files. In TIFF files the resolutions are specified as rational numbers consisting of a pair of integers. It appears this somehow interferes with the Image Resizer functionality which reports an error: “Execute failed: java.lang.RuntimeException: Number of elements in ArrayImg too big, use for example CellImg instead: 3369802500 > 2147483647”.

The issue appears if the TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION resolutions are encoded as 2540155 / 16384 (= 155.03875732421875). This encoding is chosen by libTIFF 4.5.1. In an earlier libTIFF version (4.1.0) the libTIFF library chose other integers for representing this resolution: 4294967295 / 27702539 (= 155.0387599851407), which apparently worked fine. As the actual resolution values are practically the same, this seems like a bug in the KNIME Image Reader or Image Resizer node.

Image size: 1080x1080, 16 bpp
Image Resizer settings: Linear Interpolation, Affect All Dimensions, Scaling factor 1.2, Image Calibration (customer claims this is needed for next steps).

Demo workspace and demo files attached (one failing, one working; the only difference is the encoding of rational resolutions, done by a binary editor).

Any suggestions or workarounds for our customer? (we cannot change the TIFF files easily).

TIA
Paavo

KNIME_projectv2.knwf (17.3 KB)

black_failing.tiff (12.8 KB)
black_working.tiff (12.8 KB)