JPG XL / JPX support

And about the sizes

George

A fault of mine. Above I compare the lossy jpg wit the lossless jxl. The lossy jxl is
afbeelding

George

Yes, if you run the original “cixl” software from the command line, it works like this:

cjxl input.jpg output.jxl

And quoting from the manpage:

Lossy sources such as JPEG and GIF files are compressed losslessly by default, and in the case of JPEG files specifically, the original JPEG can then be reconstructed bit-for-bit.

You also asked how it is possible, as well as how to do it.

How it is possible is that an 8x8 tile is the max size of redundancy allowed by a traditional JPEG file.

If for instance, a small 8x8 area (let’s call it A) of a photo can be drawn almost perfectly with just 7 colors of crayons, but the area beside it (let’s call it B) needs 8 colors, then a regular JPEG file needs to store those 7 colors both for the first area, plus store those 8 colors for the area beside it, even if 7 of those 8 colors happen to be the same colors as each other. The redundancy cannot be benefited from in regions outside of each separate 8x8 tile.

However, JPEG XL can combine those two side-by-side tiles into one bigger tile, and then store just the 7 colors of the first tile A, plus 1 more color to include the 8th and final color contained in tile B. This saves space in the output, but when decompressed, it returns to the same photo data as the original JPEG.

However, it is super important to realize that this doesn’t solve any of the inaccuracies of the original JPEG format–it just takes the same 8-bit original JPEG with all of its imperfections and errors, and makes it smaller. It doesn’t make it any worse, but it also cannot make it better.

That’s why the original image export format is so important.

I tried to discover why some colors changed in the jxl images and the found that the jxl images don’t have an exif. Is that normal?

George

It could be your third party software that deletes exif when converting, maybe not the original reference code. Exif can impact the color space through which an image is viewed, so your are right this can show the same photo in different colors.

I used the cjxl program and there it worked.

George

The JPEG-XL specification has explicit provision for pixel-accurate JPEG transcoding. Whether IrfanView is taking advantage of that is a different question. It may be decoding the JPEG to the final image and then recompressing.