Fix reading of 16-bit TIFF images on big endian host.
Use correct integer types for arguments to TIFFGetField to avoid corruption of values and failed loads of TIFF file when using cv::imread(). Added test where both big and little endian TIFF files are read using imread(). Fixed build of 3rdparty libtiff on big endian hosts. Reduced memory required during decode_tile16384x16384 test by not converting large grayscale test image to color image during read.
This commit is contained in:
2
3rdparty/libtiff/tif_config.h.cmakein
vendored
2
3rdparty/libtiff/tif_config.h.cmakein
vendored
@@ -54,7 +54,7 @@
|
||||
|
||||
/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
|
||||
(Intel) */
|
||||
#define HOST_BIGENDIAN 0
|
||||
#define HOST_BIGENDIAN @HOST_BIGENDIAN@
|
||||
|
||||
/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
|
||||
#define HOST_FILLORDER FILLORDER_LSB2MSB
|
||||
|
||||
Reference in New Issue
Block a user