Live data from Hacker News

Image Compression

makingsoftware.com

31–37 of 37 posts

Re: Image Compression

#32
post #12
post #5

Worth highlighting the QOI Image format (qoiformat.org) showing that you can also get significant image compression benefits with a simple 1-page specification [1]: > QOI is fast. It losslessly compresses images to a similar size of PNG, while offering 20x-50x faster encoding and 3x-4x faster decoding. > QOI is simple. The reference en-/decoder fits in about 300 lines of C. The file format specification is a single p…

The opposite should also be possible with the ultimate formula a giant lookup table with all the images preloaded. Could ofc also make decompression by trying a million things. To exist the compressed file only needs a formula to validate the result. Like it being a type 42 image with this checksum. It might take a quantum computer to confirm existence. I had a fun idea to skip pixels and rows and make a tiny image a…

>To exist the compressed file only needs a formula to validate the result. Like it being a type 42 image with this checksum. It might take a quantum computer to confirm existence

I interpret this to mean that the checksum is the compressed file?

Surely you'd need to compute checksums for all possible images to confirm that the checksums are unique.

You're calculating a perfect hash for an input that could be anything. That isn't going to be short or easy to confirm.

And then you've got the question of if it's worth it. Yes the hash could represent an image of random noise at the same size as a blank black image. But it's going to be larger than today's technology for representing that black image.

So for a lot of images it isn't worth it. I would guess(?) the average photo is a lot closer to ordered than unordered, so it isn't going to work there either.

Re: Image Compression

#33
post #7

Don't sleep on JPEG XL. It's used under the hood within DNG files (at least, it's an option, Adobe DNG Converter can leverage it, including by the CLI), DxO PureRAW leverages it in the latest versions. Apple Photos can view them, and I think it's been the compression methodology used inside their ProRAW DNGs for a while (which probably by default makes it one of the worlds most popular image compressors for RAW files…

JXL is great on a variety of images with great PSNR across the board. Surprised it took browsers a good long time to ship it (removed and brought it back)

You can get way better perceptual compression at much much tinier sizes though. This is where a lot of user studies and research could play out.

If you've read that article out, you might want to take a look at alternative approaches to compressing images with similar principles.

https://github.com/guilt/MLL is a recent reimplementation of an old idea; If you quantize out the image blocks you could emit them in vector coordinates and have perceptually similar results at a fraction of the size with very decent signal preservation.

Re: Image Compression

#34
post #27

> More so than any other image format, JPEG takes advantage of the quirks of human perception to throw away information while largely preserving quality. That is a very odd thing to say in a post that also mentions WebP. I would say that of all the commonly supported lossy image codecs released since 1992, JPEG takes the least advantage of human perception quirks.

webp doesn't preserve quality it actively makes the web and images shittier.

WebP generally preserves higher visual quality at the same compression ratios as JPEG. You can make bad looking images with either codec by demanding smaller file sizes, but all else equal, WebP usually looks better.

Re: Image Compression

#35
post #13

Earlier quoted context omitted.

JPEG XL aka .jxl is now supported by Firefox 152 and Chrome since 145 (behind a flag though on both). JXL is the best image format we have - supports lossy and lossless compression, HDR, and much more! https://jpegxl.info/

The format supports HDR, but most apps using it don’t. I’ve given up trying to use JXL in the Apple ecosystems for exchanging HDR images for this reason.

Speaking out of genuine curiosity here, but what kinds of photos are you taking that require HDR?

Re: Image Compression

#37
post #32
post #12

Earlier quoted context omitted.

The opposite should also be possible with the ultimate formula a giant lookup table with all the images preloaded. Could ofc also make decompression by trying a million things. To exist the compressed file only needs a formula to validate the result. Like it being a type 42 image with this checksum. It might take a quantum computer to confirm existence. I had a fun idea to skip pixels and rows and make a tiny image a…

>To exist the compressed file only needs a formula to validate the result. Like it being a type 42 image with this checksum. It might take a quantum computer to confirm existence I interpret this to mean that the checksum is the compressed file? Surely you'd need to compute checksums for all possible images to confirm that the checksums are unique. You're calculating a perfect hash for an input that could be anything…

Please do read this as satire...

The checksum is the compressed file but you need to split the problem and forEach structure it in such a way that one can dial into it. You need to be able to compare the current result with the previous one in a linear way. It needs to fulfill all preconceived ideas of what an image should look like.

I think the joke is pretty good.

Post reply on HN