News for hackers. Stuff that matters.
Re:JPEG XL and the Pareto Front by a-french-anon on Friday March 01, 2024 @08:15AM (#39561453)
An issue with lossless WebP is that it only supports A(RGB) and encodes grayscale via hacks that aren't as good as simply supporting monochrome.

If you compress a whole manga, PNG (via oxipng, optipng is basically deprecated) is still the way to go.

Another something not mentioned in here is that lossless JPEG2000 can be surprisingly good and fast on photographic content.

Re:JPEG XL and the Pareto Front by edflsafoiewq on Friday March 01, 2024 @08:35AM (#39561602)
IIRC the way you encode grayscale in WebP is a SUBTRACT_GREEN transform that makes the red and blue channel 0 everywhere, and then use a 1-element prefix code for R and B, so the R and B for each pixel take zero bits. Same idea with A for opaque images. Do you know why that's not good enough?
Re:JPEG XL and the Pareto Front by JyrkiAlakuijala on Friday March 01, 2024 @08:52AM (#39561750)
I made a mistake there with subtract green.

If I had just added 128 to the residuals, all remaining prediction arithmetic would have worked better and it would have given 1 % more density.

This is because most related arithmetic for predicting pixels is done in unsigned 8 bit arithmetic. Subtract green moves such predictions to often cross the 0 -> 255 boundary, and then averaging, deltas etc make little sense and add to the entropy.

Re:JPEG XL and the Pareto Front by edflsafoiewq on Friday March 01, 2024 @08:54AM (#39561772)
Can you explain why?
Re:JPEG XL and the Pareto Front by JyrkiAlakuijala on Friday March 01, 2024 @08:58AM (#39561805)
I edited the answer into the previous message for better flow.
Re:JPEG XL and the Pareto Front by a-french-anon on Friday March 01, 2024 @09:59AM (#39562366)
Thankfully the following comment explains more than I know, I was speaking purely from empiric experience.
Re:JPEG XL and the Pareto Front by edflsafoiewq on Friday March 01, 2024 @10:05AM (#39562415)
Then you can't know that any difference you see is because of how WebP encodes grayscale.
Re:JPEG XL and the Pareto Front by out_of_protocol on Friday March 01, 2024 @08:54AM (#39561776)
Just tried it on random manga page

- OxiPNG - 730k

- webp lossless max effort - 702k

- avif lossless max effort - 2.54MB (yay!)

- jpegxl lossless max effort - 506k (winner!)

Re:JPEG XL and the Pareto Front by Andrex on Friday March 01, 2024 @10:03AM (#39562398)
Probably depends on the manga itself. Action manga probably don't compress as well as more dialogue-heavy works.
Re:JPEG XL and the Pareto Front by ComputerGuru on Friday March 01, 2024 @10:59AM (#39562982)
I would, at a first blush, disagree with that characterization? Dialogue equals more fine-grained strokes and more individual, independent “zones” to encode.
Re:JPEG XL and the Pareto Front by lonjil on Friday March 01, 2024 @01:09PM (#39564742)
I wonder if the text would be consistent enough for JXL's "patches" feature to work well.
Re:JPEG XL and the Pareto Front by Andrex on Friday March 01, 2024 @04:17PM (#39566901)
Now I'm really curious. If anyone has more time than me they could do some sample compressions and I'd be interested in the results.