Skip to content

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 (cherry picked from commit cd92d76e)


Instead of resolving a conflict in the headers I simply also cherry-picked 1224337f since QVarLengthArray is used in the code.

Merge request reports