[gdal-dev] How to use JPEGXL in TIFF right?

Even Rouault even.rouault at spatialys.com
Thu Oct 24 07:10:27 PDT 2024


Le 24/10/2024 à 15:53, Rahkonen Jukka via gdal-dev a écrit :
>
> Thanks Thomas,
>
> I will suggest an edit to the GeoTIFF driver page for adding that 
> information.
> If single row blocks are needed for some reason, it seems to be better 
> to use the JPEGXL driver directly. It is fast and creates small output.
>
The single row block reported by the standalone JPEGXL driver is an 
illusion. The driver has to decompress the whole image first, so once it 
has done that it can expose a single line as the block shape, but that 
doesn't reflect the reality of the underlying work. Yes GDAL drivers are 
lying to do. All the time :-) ("/Traduttore, traditore")/ That's the 
whole purpose of GDAL./
/

If you try to compress too big blocks with libjxl (but here I'm probably 
talking about > 10k x 10k pixels at once), you will hit RAM issues at 
some point, because the libjxl compressor is quite RAM hungry.

On the contrary when doing JPEGXL-in-TIFF with BLOCKYSIZE=1, you really 
get one JPEGXL blob per line (that can be independently decompressed). 
And you will kill any benefit from JPEGXL compression since it is 
designed/optimized for 2D images, not images degenerated to single 
lines. (contrary to ZLIB, ZSTD, LZMA or LZW that are generic purpose 
methods totally ignoring the 2D aspect)

Even

-- 
http://www.spatialys.com
My software is free, but my time generally not.
Butcher of all kinds of standards, open or closed formats. At the end, this is just about bytes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20241024/80be7be6/attachment.htm>


More information about the gdal-dev mailing list