News for hackers. Stuff that matters.
Re:Fighting JPEG color banding by hulitu on Thursday June 23, 2022 @05:04PM (#31855139)
just use PNG. JPEG sucks.
Re:Fighting JPEG color banding by gruturo on Friday June 24, 2022 @06:08AM (#31859719)
For a screenshot? Yeah JPEG sucks. For a diagram with large blocks of uniform color and sharp edges? Yeah JPEG sucks.

But for pictures, JPEG is in its comfort zone and it's amazing it is still doing comparatively well after the IT equivalent of 150 years. Only now worthy alternatives are starting to emerge (looking at you JPEG XL), not for lack of trying (looking at you WEBP). It's incredible it managed to stay relevant for so long, and while surely patents, sunken cost fallacies, hardware implementations and inertia played a part, none of this would have mattered if it hadn't been pretty good to start with.

Re:Fighting JPEG color banding by zinekeller on Friday June 24, 2022 @06:51AM (#31859951)
> none of this would have mattered if it hadn't been pretty good to start with.

Considering that MPEG (and competitors) have evolved due to its deficiencies (the current baseline today is H.264 and not the original version H.261 or even its immediate successor MPEG-1), I'm surprised that JPEG is just showing its deficiencies today and not in 2000. Actually, it's a complement that although multiple file formats were invented to handle lossy pictures but even WebP can't beat JPEG all the time (especially that WebP can only save up to 16k pixels per side while JPEG can handle up to 64k pixels).

Re:Fighting JPEG color banding by bob1029 on Friday June 24, 2022 @05:28AM (#31859482)
JPEG absolutely destroys PNG in areas of performance and size when it comes to typical use cases.

Lossy compression is not a bad thing. We need to get over this.

Re:Fighting JPEG color banding by LocalH on Friday June 24, 2022 @12:37AM (#31857859)
PNG sucks for some uses too. There is no universally perfect image format for all possible use cases.
Re:Fighting JPEG color banding by jug on Friday June 24, 2022 @09:04PM (#31871463)
WebP & JPEG XL compress losslessly better than PNG and lossy much better than JPEG. Perhaps not perfect either, but we finally do have formats that can do both — and better than either before.
Re:Fighting JPEG color banding by igoradamenko on Friday June 24, 2022 @03:30AM (#31858725)
Well, if we're talking about web, then I it's better to use WebP rather than PNG.

It's widely supported by vendors if you do not need to deal with IE: https://caniuse.com/?search=webp.

Re:Fighting JPEG color banding by jeroenhd on Friday June 24, 2022 @09:46AM (#31861717)
Do note that if you need to target macOS 10 + Safari, WebP is not available.

WebP is available for macOS 11, even with overlapping versions of Safari, but Apple relies on the OS image library to render some images and they haven't backported WebP supported when they updated Safari.

Re:Fighting JPEG color banding by martin_a on Friday June 24, 2022 @04:59AM (#31859284)
That is only true for a subset of images, mostly the rather "simple" ones. Try saving photographs as PNG and see your filesize explode.
Re:Fighting JPEG color banding by keyle on Friday June 24, 2022 @05:36AM (#31859526)
Please these kind of comments are entirely counter productive and don't add anything to the conversation. No matter the topic, presume some people are truly interested in the topic and feel free to stay off it.

There is a space for JPEG and for PNG. Here is a good base reference https://www.a2hosting.com/blog/pngs-vs-jpegs/

Re:Fighting JPEG color banding by Markoff on Friday June 24, 2022 @05:22AM (#31859449)
or JPEG XL
Re:Fighting JPEG color banding by igoradamenko on Friday June 24, 2022 @05:38AM (#31859540)
Well, yeah, unless you want to use it in a browser: https://caniuse.com/jpegxl