Post

firefox is shipping JXL so i thought i'd take a look at the state of things, at least for my own system i'm using this image since it has all of: large areas of similar color; fine details (the lineart uses a very noisy brush); and an alpha channel (notoriously hard for png). but mostly bc lexy

PNG, WEBP, AVIF, and JXL all preview in kde dolphin no problem. gimp and imagemagick both appear fully capable of reading and writing all of them. so JXL is basically native already. windows users idk what to tell you, maybe in 2050 meanwhile bluesky has of course already trashed the image

PNG: gimp, max compression — 369k (reference size) imagemagick, default — 376k (−2% smaller) imagemagick, -quality 96 or 100 — 369k (0% smaller) optipng, -o9 — 359k (3% smaller)

WebP, all using the "drawing" mode: gimp, lossless — 223k (40% smaller) imagemagick, lossless, max compression — 212k (43% smaller) i'm not sure how to rate lossy compression since it's obviously very subjective, so i guess i will just give my impressions. only tried a couple variations

WebP cont'd: gimp, quality 100% — 110k (70% smaller) exactly identical to "lossless", which is sensible for 100% quality, but then how is it half the size?? gimp, quality 98% — 101k (73% smaller) looks the same at 1:1. slightly smooths the mane, shuffles the lineart noise. minimal savings though

WebP cont'd: imagemagick, default — 39k (90% smaller) this is of course visibly worse even at 1:1, though it's not nearly as worse as i expected. basically jpegifies areas of high contrast, though the noise is surprisingly well constrained. this is why every website saves as webp lol

AVIF: gimp, lossless, slow — 334k (10% smaller) gimp, 98% quality, slow — 175k (53% smaller) looks the same to me at 4:1 gimp, 50% quality, slow — 38k (90% smaller) pretty much the same as the webp imagemagick default, except the errors are uncannily smooth rather than uncannily noisy

honestly not sure why anyone was excited about AVIF; it seems very comparable to WebP at similar filesizes? also the "slow" encoder is definitely pretty slow, though i didn't time any of these

0 reposts12 likes

and finally JXL: apparently these encoding speed names are canonical also rather than a quality scale, there's an acceptable error scale, where 1 is "visually lossless" and higher is lossier. but gimp also has a lossless checkbox so i guess 1 is not actually visually lossless maybe?

JXL cont'd: i fiddled with this a lot because i'm not really sure what the implications are so bear with me gimp, lossless, squirrel (default speed) — 195k (47% smaller) gimp, lossless, tortoise (try hardest) — 186k (50% smaller) lossless imagemagick was also 195k, both with default and max effort

JXL cont'd: gimp, quality 1.0, squirrel — 86k (77% smaller) small noisy details blurred out a bit, though not nearly so much as the 38k AVIF gimp, quality 1.0, tortoise — 124k (66% smaller) well now i'm confused. surely if it's trying harder the result should be smaller? quality *slightly* better

JXL cont'd: also tried imagemagick default, but it looks like that might just be 1.0 squirrel, because i can't tell the difference and the filesize is the same gimp, quality 2.0, squirrel — 60k (84% smaller) again, smoother rather than noisier. effect is like 1.0 twice, which i guess checks out

i would think distance means it's related to the "maxError" number hidden behind the popup here, although that goes from 0.1 to 15 whereas this goes from 0 to 25?

Distance and maxError are the same. In cjxl setting a distance of 0 switches to mathematically lossless mode. I'm not sure where the bounds 0.1, 15, and 25 come from (whether they're limits of the algorithm itself or just bounds set by the interface to give you reasonable results).