Skip to content

Commit f62fff0

Browse files
Merge pull request #137 from melissalinkert/quality-documentation
Split compression type/quality into separate section, add JPEG info
2 parents 7d61adc + 93d8ebb commit f62fff0

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,23 @@ or generate a 5.9.x-compatible pyramid:
7676

7777
The input tile directory must contain a full pyramid in a Zarr container.
7878

79+
If the `--rgb` option is set, the data will be stored in the OME-TIFF using
80+
the [chunky format](https://web.archive.org/web/20240528191227/https://www.awaresystems.be/imaging/tiff/tifftags/planarconfiguration.html)
81+
and the [RGB color space](https://web.archive.org/web/20240708194342/https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html),
82+
as further described in the [TIFF specification](https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf).
83+
This option is strongly recommended when the input data is a brightfield whole slide.
84+
85+
Tile compression is performed in parallel. The number of workers can be changed using the `--max_workers` option.
86+
87+
`axes` and `transformations` metadata in the input Zarr will be ignored. This metadata is assumed to be consistent
88+
with the corresponding `PhysicalSize*`, `TimeIncrement`, and `DimensionOrder` values in the input `METADATA.ome.xml`.
89+
90+
Compression type and quality
91+
============================
92+
7993
The compression can be changed using the `--compression` option.
8094
Valid compression types are `Uncompressed`, `LZW`, `JPEG-2000`, `JPEG-2000 Lossy`, `JPEG`, and `zlib`.
81-
By default, `LZW` compression will be used in the OME-TIFF file.
95+
By default, `LZW` compression will be used in the OME-TIFF file, as this is a lossless compression type.
8296

8397
If the `--compression` option is set to `JPEG-2000 Lossy`, then
8498
the `--quality` option can be used to control encoded bitrate in bits per pixel.
@@ -89,14 +103,9 @@ To see truly lossy compression, the quality should be set to less than the bit d
89103
We recommend experimenting with different quality values between 0.25 and the bit depth of the input image to find an acceptable tradeoff
90104
between file size and visual appeal of the converted images.
91105

92-
If the `--rgb` option is set, the data will be stored in the OME-TIFF using
93-
the [chunky format](https://www.awaresystems.be/imaging/tiff/tifftags/planarconfiguration.html)
94-
and the [RGB color space](https://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html).
95-
96-
Tile compression is performed in parallel. The number of workers can be changed using the `--max_workers` option.
97-
98-
`axes` and `transformations` metadata in the input Zarr will be ignored. This metadata is assumed to be consistent
99-
with the corresponding `PhysicalSize*`, `TimeIncrement`, and `DimensionOrder` values in the input `METADATA.ome.xml`.
106+
If the `--compression` option is set to `JPEG`, then
107+
the `--quality` option controls the compression quality on a scale from `0.25` (25%, extremely lossy)
108+
to `1.0` (100%, nearly lossless). The default value is `0.75`.
100109

101110
License
102111
=======

0 commit comments

Comments
 (0)