Hi Jukka, Yes, you should definitely be using tiled tiff with jxl. The actual tile size (256,512 or 1024) did not seem to make much difference in file size from what I have experienced, so you can choose that value depending on how you plan to use the tifs later on. In production use here, we use "-co BIGTIFF=YES -co TILED=YES -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co COMPRESS=JXL -co JXL_EFFORT=3" . Setting the effort to 3 greatly reduces compression time while having very little effect on final image size on 16bit satellite imagery.
Regards, TB On Thu, Oct 24, 2024 at 1:00 PM Rahkonen Jukka via gdal-dev < gdal-dev@lists.osgeo.org> wrote: > Hi, > > > > I made some tests about using JPEGXL (JXL) compression in GeoTIFF. I am > interested in lossless compression. So far I have learned that stripes are > not good, but results from tiled TIFFs are promising. > > The GeoTIFF driver manual has a warning about WEBP compression: “There is > a significant time penalty for each tile/strip with lossless WebP > compression, so you may want to increase the BLOCKYSIZE value for strip > layout.” I wonder if the same applies to JPEG XL compression as well. > Without tiles this command was very slow > > gdal_translate -of gtiff -co compress=jxl p4433h.tif p4433h_jxl.tif > > This one was faster. > > gdal_translate -of gtiff -co tiled=yes -co compress=jxl p4433h.tif > p4433h_jxl_tiled.tif > > > > Not only being slow but the compression with stripes does not really > compress much. See the file sizes: > > > > With stripes: 359 211 087 p4433h_jxl.tif > > With 256x256 tiles: 142 188 540 p4433h_jxl_tiled.tif > > Referense (LZW): 283 864 896 p4433h_lzw.tif > > > > What might be the optimal block size for JXL-in-GeoTIFF when the aim is a > good compression ratio and reasonable processing time? > > > > -Jukka Rahkonen- > > > > > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev