Live data from Hacker News

Visualizing and Understanding JPEG Format

github.com

11–20 of 47 posts

Re: Visualizing and Understanding JPEG Format

#12

> lossless storage: > to make JPEG store data losslessly: use grayscale, 100% quality, then either width or eight to 1 pixel, or duplicate the padded data 8 times (JPEG images are stored in 8x8 blocks). Interesting. I wonder if this is used internally in any applications.

Actually - JPEG is not lossless even at 100% quality, there is a little noise at +/-1 of pixel value, some rare pixels at 2. Grayscale is not needed, you may skip RGB->YUV conversion and encode in RGB colors, libjpeg can do that.

Re: Visualizing and Understanding JPEG Format

#13

why i still see jpeg in 2020 ?

Incumbent format momentum, for a large part. Nothing else has offered enough benefit for lossful image compression for the mass market to make the effort to switch.

Also, some of the alternative formats have licensing or patent issues that would effectively block wide adoption.

Re: Visualizing and Understanding JPEG Format

#14
post #8

why i still see jpeg in 2020 ?

What's wrong with JPEG?

Nothing particularly.

Though there are other lossful encoding schemes developed since that either produce better results with the same data size or comparable results with better compression (or both). But the improvements have not been large enough to make the industry as a whole consider making the effort to support these other formats (and in some cases there would be licensing/patent issues making support legally/financially onerous on top of the coding/testing required).

Re: Visualizing and Understanding JPEG Format

#16
By the way, you can decode JPEG with less artifacts using these projects:

https://github.com/ilyakurdyukov/jpeg-quantsmooth (good for most mid-quality and high-quality images)

https://github.com/victorvde/jpeg2png (use for very low-quality images, slower)

jpeg-quantsmooth gives a sharper output (use "-q6" option).

jpeg2png output is a little blurry, but it does a better job of unblocking very low-quality images.

Re: Visualizing and Understanding JPEG Format

#18
post #8

Earlier quoted context omitted.

What's wrong with JPEG?

Nothing particularly. Though there are other lossful encoding schemes developed since that either produce better results with the same data size or comparable results with better compression (or both). But the improvements have not been large enough to make the industry as a whole consider making the effort to support these other formats (and in some cases there would be licensing/patent issues making support legally…

I would add that the "reference implementation" of jpeg encoding and decoding is very easy to compile and to use, reasonably efficient, and completely free software. There has never been a corresponding jpeg2000 implementation, for example, leading to the fast demise of the arguably superior format.
Post reply on HN