this post was submitted on 24 Jun 2025
255 points (99.6% liked)

Programming

21142 readers
153 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

After 20 years, PNG is back with renewed vigor! A new PNG spec was just released.

all 50 comments
sorted by: hot top controversial new old
[–] reactionality@lemmy.sdf.org 6 points 15 hours ago

Good. Kill webp and its incompatible ass.

[–] realitista@lemmy.world 12 points 18 hours ago* (last edited 18 hours ago)

Did it go away? I still use it as my go to format for small lossless images.

[–] Grant_M@lemmy.ca 11 points 22 hours ago* (last edited 22 hours ago)

Yes. But does Lemmy support .png?

Ahh.

[–] Almacca@aussie.zone 6 points 23 hours ago (1 children)

Took me a second to realise you're not talking about Papua New Guinea.

Same! I saw the title and thought, "wtf happened to PNG?!?!"

[–] BetterDev@programming.dev 26 points 1 day ago (2 children)

Um, actually it's pronounced png

[–] spartanatreyu@programming.dev 2 points 4 hours ago

Imagine if god showed up one day and said: "It's actually Jod" then left

[–] f4f4f4f4f4f4f4f4@sopuli.xyz 7 points 1 day ago

Correct. Like "plunge" without the "lu".

[–] vhstape@lemmy.sdf.org 103 points 2 days ago (3 children)

Great news! PNG has always been my image format of choice due to its relatively good compression and support for transparency.

[–] aeroplayne@lemm.ee 9 points 1 day ago

Do you remember png? Well now it's back. In pog form!

[–] RizzRustbolt@lemmy.world 2 points 1 day ago

Eventually they'll adopt the multi-page specs and finally push Adobe off the mountain.

[–] WolfLink@sh.itjust.works 15 points 1 day ago

HDR PNG is huge

[–] sentient_loom@sh.itjust.works 52 points 2 days ago (1 children)

I didn't realize it had gone anywhere. It's always my first choice.

[–] tal@lemmy.today 40 points 2 days ago (1 children)

WebP had been kind of moving in on its turf, based on what I've been seeing websites using.

[–] sentient_loom@sh.itjust.works 2 points 1 day ago (2 children)

I've never heard of webP. Looked it up. Not impressed. Sticking with png.

[–] xiwi@lemmy.dbzer0.com 6 points 17 hours ago (1 children)

Who would want to use a format named web-pee

[–] BootLoop@sh.itjust.works 7 points 16 hours ago

Web-pee is stored in the web-balls

[–] Sorse@discuss.tchncs.de 23 points 1 day ago (1 children)

The main advantage of webp is that it has good lossy compression, which makes it great for websites that show tens or hundreds of images on a single page

[–] realitista@lemmy.world 2 points 18 hours ago (1 children)

I always used PNG where I would have used GIF. Other than that I use JPG still. I'm guessing webp is more on the JPG side of things than the GIF side?

[–] azertyfun@sh.itjust.works 1 points 8 hours ago

It can do both, lossiness is toggleable.

If you've seen a picture on Lemmy, you've almost certainly seen a WebP. A fair bit of software – most egregiously from Microsoft – refuses to decode them still, but every major browser has supported WebP for years and since superior data efficiency compared to JPG/PNG means is already very widely used on the web. Bandwidth is not that cheap.

[–] captainastronaut@seattlelunarsociety.org 12 points 1 day ago (3 children)

May webp die a horrible death in its wake!

[–] Emotional@lemmy.blahaj.zone 5 points 22 hours ago (1 children)
[–] kipo@lemm.ee 7 points 22 hours ago* (last edited 22 hours ago) (1 children)

Because most of my software doesn’t have support for webp, including but not limited to my Mac, phone, and messaging apps. Until everything supports it, I have to keep converting it to use it, so I just don’t bother saving anything as webp. In fact, I have a firefox extension that lets me save webp as other image formats.

It may be good to use for the web, but it’s not yet good for me.

[–] Emotional@lemmy.blahaj.zone 2 points 11 hours ago (1 children)

I personally love WebP and other innovative formats, I don't wish them dead, because better compression saves time and bandwidth.

However, for saving stuff on my computer, like you, I would tend to go for more supported formats.

I'm mostly just sad that it takes so long for new formats to be widely supported.

[–] SonOfAntenora@lemmy.world 1 points 8 hours ago

You have no choice there. Outside of web pages it's undersupported. Is it the fault of the file format or of software that doesn't support the format?

[–] LaggyKar@programming.dev 18 points 1 day ago

Lossless WebP is still gets way better compression than PNG though, this doesn't change that. Although they mention they're looking to improve it in the next version, so we'll see then.

[–] FizzyOrange@programming.dev 23 points 1 day ago

WebP was the first widely supported format to support lossy transparency. It's worth it for that alone.

[–] tal@lemmy.today 24 points 2 days ago* (last edited 1 day ago) (4 children)

What's next?

I know you all immediately wondered, better compression?. We're already working on that. And parallel encoding/decoding, too! Just like this update, we want to make sure we do it right.

We expect the next PNG update (Fourth Edition) to be short. It will improve HDR & Standard Dynamic Range (SDR) interoperability. While we work on that, we'll be researching compression updates for PNG Fifth Edition.

One thing I'd like to see from image formats and libraries is better support for very high resolution images. Like, images where you're zooming into and out of a very large, high-resolution image and probably only looking at a small part of the image at any given point.

I was playing around with some high resolution images a bit back, and I was quite surprised to find how poor the situation is. Try viewing a very high resolution PNG in your favorite image-viewing program, and it'll probably choke.

  • At least on Linux, it looks like the standard native image viewers don't do a great job here, and as best I can tell, the norm is to use web-based viewers. These deal with poor image format support support for high resolutions by generating versions of the image at multiple pre-scaled levels and then slicing the image into tiles, saving each tile as a separate image, so that a web browser just pulls down a handful of appropriate tiles from a web server. Viewers and library APIs need to be able to work with the image without having to decode the whole image.

    gliv used to do very smooth GPU-accelerated panning and zooming


I'd like to be able to do the same for very high-resolution images, decoding and loading visible data into video memory as required.

  • The only image format I could find that seemed to do reasonably well was pyramidal TIFF.

I would guess that better parallel encoding and decoding support is likely associated with solving this, since limiting the portion of the image that one needs to decode is probably necessary both for parallel decoding and for efficient high-resolution processing.

[–] bestboyfriendintheworld@sh.itjust.works 2 points 18 hours ago* (last edited 18 hours ago)

JPEG2000 can do exactly what you want for decades.

[–] DaPorkchop_@lemmy.ml 11 points 1 day ago (1 children)

There is a reason why TIFF is one of the most popular formats for raster geographic datasets :)

Yeah, I have a couple over 800MB PNGs that I can only get Gimp to open properly. I need to look into pyramidal TIFFs.

[–] mindbleach@sh.itjust.works 10 points 2 days ago (2 children)

Possibly the final version. Quite Okay Imaging (QOI) achieved similar compression with none of the complexity. Lossy + difference = lossless formats are surely the better option where performance is not crucial. Even the fact they fffucking finally made APNG official is decades late to replace GIF, since several image formats are now literally video formats.

The future is webp. And telling software patents to burn in hell.

[–] spartanatreyu@programming.dev 25 points 1 day ago (1 children)

The future is ~~webp~~ JPEG XL...

And telling software patents to burn in hell.

[–] MonkderVierte@lemmy.zip 4 points 1 day ago* (last edited 1 day ago) (3 children)

Never saw even one piece of your "future" in the wild...

[–] bob_lemon@feddit.org 10 points 1 day ago* (last edited 1 day ago)

That's because Google removed the support from chrome after only a few months, and Mozilla never added it to Firefox. And although there's apparently an extension for both, (lossy) image formats need out of the box browser support to have any chance for any kind adoption.

[–] soc@programming.dev 3 points 1 day ago

Happily using it for presentation slides.

[–] Flipper@feddit.org 10 points 1 day ago (1 children)

As cool and impressive as Qoi is, as long as I can't just send it to someone it's sadly not a replacement for PNG.

[–] mindbleach@sh.itjust.works 4 points 1 day ago

Yeah, adoption's not a feature you can design.

The general idea may show up in any extensible format. Like a PNG encoder that only does Sub filter can encounter each pixel once.

... wait, PNG filtering is byte-level? It doesn't change with bit depth? Christ.

[–] Flamekebab@piefed.social 10 points 2 days ago (2 children)

APNG wasn't officially part of the spec?!

[–] KiwiTB@lemmy.world 21 points 2 days ago

Crazy huh but APNG was so well done it just showed the first frame like a normal PNG in any non supported browser which was amazing. I used to have an avatar which has the TF2 engineer as the first frame and the spy as the second.

[–] roadrunner_ex@lemmy.ca 7 points 2 days ago (1 children)

I'm glad it is now. I remember a decade or so ago, I wrote an APNG decoder, so I was deep in the world of APNG.

And I remember reading various things that made me think MNG was the 'more official' flavour of "animated PNG", and it was absurd to me, because APNG seemed like a much more approachable spec. I'm glad the winds have turned...

[–] thingsiplay@beehaw.org 5 points 2 days ago (1 children)

I remember MNG and never understood why APNG wasn't officially recognized. I didn't know it was widely supported already. Why do people still create and use GIF in the internet, if there is a superior format?

[–] tal@lemmy.today 7 points 2 days ago* (last edited 2 days ago)

At least at one point, GIF89a (animated GIF) support was universal among browsers, whereas animated PNG support was patchy. Could have changed.

I've also seen "GIF" files served up online that are actually, internally, animated PNG files, so some may actually be animated PNGs. No idea why people do that.