Add support for additional TIFF compression methods


QTiffHandler now supports the following compression methods via
QImageWriter::setCompression():
    0 - No compression (COMPRESSION_NONE) [existing]
    1 - LZW compression (COMPRESSION_LZW) [existing]
    2 - CCITT RLE compression (COMPRESSION_CCITTRLE) [new]
    3 - CCITT Group 3 fax encoding (COMPRESSION_CCITTFAX3) [new]
    4 - CCITT Group 4 fax encoding (COMPRESSION_CCITTFAX4) [new]
    5 - JPEG compression (COMPRESSION_JPEG) [new]

The compression values map directly to libtiff's compression
constants (see above). As before, invalid values are clamped to
the allowed range of values.

Compression method compatibility:
  - Methods 0, 1: Work with all image types
  - Methods 2, 3, 4: Best suited for monochrome/bilevel images
  - Method 5: Works with RGB and grayscale images

The new test writeImageWithCompression verifies that images with all
the supported compressions can be read and written (round-trip test).
For this multiple test files have been added.

In order to use jpeg compression, libjpeg support is enabled in both
QTiffHandler and the corresponding test project.

Fixes: QTBUG-120348
Change-Id: Icb4fb59deda01a0b083cd5bb29103ebab22e0065
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
commit5b1d401a523a229e0523e06a591ab3d447e84916
parent1e4480fb4d5cad128c0504363bfa064afa3ff135
authorJens Bender <jaypb.dev@gmail.com>
committerJens Bender <jaypb.dev@gmail.com>
commit timeFri, 30 Jan 2026 17:58:55 +0100