tdf#147704 fix reading TIFF metadata (width and height)
commit1428eb1dc2f6540ec2261da6bdfd8ca2e79d7a58
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Fri, 1 Sep 2023 19:20:05 +0000 (1 21:20 +0200)
committerXisco Fauli <xiscofauli@libreoffice.org>
Mon, 4 Sep 2023 07:49:28 +0000 (4 09:49 +0200)
tree46ef32eb3c04b59529c96969e0b8f4203594c146
parente79bd728e66272d14881d40167dcf57ef48571eb
tdf#147704 fix reading TIFF metadata (width and height)

When we prepare (not read and load) the bitmap we need to read
only the metadata - most importantly pixel width and height. This
didn't work correctly for the TIFF files or more importantly the
specific TIFF files in the document, and the result was that the
size reported was 0,0 and somehow the crop factor wasn't applied
correctly. This change fixes the metadata reading and makes it
more robust.

Change-Id: I60951e5d01afc311c400589496ae82377ccb4cf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156457
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 9c636d76a9a7e167da39913ab60f5135f8e831a6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156437
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
vcl/source/filter/GraphicFormatDetector.cxx