QTiffHandler: de-duplicate the compression field writing


Every single format-specific branch wrote this the same way, so we can
drag it before said format-specific branches, like e.g. orientation
and color space fields already are.

The order in which these fields are written is not significant. Tags
in TIFF files are sorted by numerical value, anyway, cf. TIFFv6, p.16,
Section "Sort Order":

  https://web.archive.org/web/20210108174645/https://www.adobe.io/content/dam/udp/en/open/standards/tiff/TIFF6.pdf

(yes, spec only avilable via Wayback Machine; both wikipedia.org and
loc.gov link to it that way; scary...)

As a drive-by, inline the 'compression' variable into its now-only
user.

Amends the move of the TIFF plugin from qtbase into this module
(f68a3dc48d8fb8c04fe49dd9e5d07d7cdd221ad1, 5.0).

Pick-to: 6.12 6.11 6.8
Change-Id: I822a2d2698692c58d9f2ab71b1ebb14bc546923c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
commit44bd2b05cca9ad0b9db97875e9ca327b860161e3
parent31d9120b59d844c3bea01894e68da58274a89818
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeTue, 21 Jul 2026 20:01:02 +0000