Implement support for file memory mapping for tiff reading


libtiff will by default attempt to establish a memory map for reading
a tiff file. Implement the callbacks to establish this in Qt's tiff
handler, since this will save data copying, particularly in the case
where the input file is already in memory as a resource or QBuffer.

Also, this makes sure that QTiffHandler utilizes libtiff's default,
and hence best tested, code path for tiff decoding. Specifically, it
avoids a hitting a bug that breaks reading of certain tiffs in the
newly released libtiff version 4.5.0.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Id6a746546e069da9910cacd4a4996c669c72cbab
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
commitcd92d76e9dcd98f4fc974c796453459779393bdc
parent8ea7335aeb7a9209e633e273942ba93a63189db7
authorEirik Aavitsland <eirik.aavitsland@qt.io>
committerEirik Aavitsland <eirik.aavitsland@qt.io>
commit timeFri, 13 Jan 2023 14:46:28 +0100