Extend JXL support: saving in that format. #9
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It looks like imlib2 can only open JXL but not save to it (according to https://github.com/resurrecting-open-source-projects/scrot/issues/273#issuecomment-1502074636 but I grepped through the source code a bit and the ChangeLog doesn't mention a saver as well.)
It would be nice if imlib2 supported saving to JXL since a lot of of projects use this library and JXL can bring immense savings of over 50% compared to PNG, at least when it comes to desktop screenshots (I run that command on thousands of PNG files:
cjxl -q 100 -m 1 -e 9 --brotli_effort 11 -E 3 -I 100 -g 3 -j 1
).Right, there is no jxl saver. Maybe some day one turns up :)
Could this be of any use for a potential saver: https://github.com/alistair7/imlib2-jxl?
I found a mention to that within https://github.com/libjxl/libjxl/blob/main/doc/software_support.md
Done.
To set non-default quality/compression parameters you'll have to use (similarly to other savers)
imlib_image_attach_data_value("quality", NULL, QUALITY, NULL);
imlib_image_attach_data_value("compression", NULL, EFFORT, NULL);
where QUALITY is in (0-100), more or less same as cjxl -q QUALITY, maps to jxl "distance" (15-0),
and EFFORT is in (1-9), same as cjxl -e EFFORT, default 7.
These parameters can be set when using imlib2_conv with like
imlib2_conv -i quality QUALITY -i compression EFFORT image.png image.jxl