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

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

JXL cont'd: gimp, quality 5.0, squirrel — 36k (90% smaller) picked this because it produces a similar filesize to that awful AVIF default. at 1:1 it's very similar to the AVIF, and both are only slightly worse than the original. most obviously the shine on the mane loses some definition

JXL, cont'd: at 4:1 they are both pretty bad. JXL is starting to show some classic jpeg blocks and a bit of haloing around the lineart; it preserves noise a little better at the cost of adding its own. AVIF just smears everything together, to the point that the shapes of some shadows change

JXL, cont'd: gimp, quality 0.1, squirrel — 264k (29% smaller) at 4:1 it's visually indistinguishable to me, but of course this is bigger than lossless so i'm not sure why you would want to do this i also tried tortoise with many of these but the result was always bigger than squirrel? wakaranai

conclusions: as someone who does not enjoy turning images to slurry i'm mostly interested in lossless, where JXL wins handily: best PNG, optipng — 359k best AVIF, lossless slow — 334k (7% smaller) best WebP, lossless max — 212k (41% smaller) best JXL, lossless tortoise — 186k (48% smaller)

conclusions cont'd: that said, i admit that our past few VNs have used WebPs that are very slightly lossy, on the grounds that the download size shrinks by a good 10% but no one could possibly tell the difference because all that happens is that some noisy pixels move around slightly

Have you experimented with palettization at all (assuming the images aren't already), using pngquant or similar? It depends on how many colours and gradients the source has, but the results have been surprisingly good (in my opinion) in the images I've been given to use.

0 reposts0 likes

No replies yet.