But is it backwards compatible with an old version that can’t be updated?
Yeah, this was my first thought. How many slightly older, no-longer-being-updated pieces of software will fail to open the new version? Hopefully it’s built in a way that it just falls back to legacy and ignores the extra information so you can at least load the file.
I mean, that’s already how animated .gifs work. If somehow you manage to load one into a viewer that doesn’t support the animation functionality it will at least dutifully display the first frame.
How the hell you would manage to do that in this day and age escapes me, but there were a fair few years in the early '90s where you might run into that sort of thing.
One example is piefed unfortunately. Animated gifs as avatar or banner don’t animate currently as far as I can tell.
Those are displayed in browser, right? The only reason that would be happening is if Piefeed is recompressing images and their code is not smart enough to identify an animated .gif and act accordingly.
Yeah in browser. I should probably open an issue ticket if nobody else noticed yet.
Relevant issue: https://codeberg.org/rimu/pyfedi/issues/665
tl;dr - it’s an issue with the pillow image library in python. It’s on our radar though. I got posts working, but you have to click through, the thumbnail still isn’t animated.
I’m probably gonna be massively downvoted for saying the forbidden word but I asked AI to do a summary with references of the forward and backward compatibility of PNG’s new version:
!
Based on recent search results, the new PNG specification (Third Edition) and its reference library (libpng) maintain strong backward compatibility while introducing modern features. Here’s a detailed compatibility analysis:
🔄 1. Backward Compatibility (Viewing Old PNGs with New Lib)
- Full Support: The new libpng (1.6.49+) and PNG Third Edition fully support legacy PNG files. Existing PNGs (conforming to the 2003/2004 spec) will render correctly without changes .
- Implementation Stability: Libpng’s API evolution (e.g., hiding
png_struct
/png_info
internals since 1.5.0) ensures older apps usingpng_get_*
/png_set_*
functions remain compatible. Direct struct access, deprecated since 1.4.x, may break in libpng 2.0.x (C99-only) . - Security Enhancements: Critical vulnerabilities (e.g., CVE-2019-7317 in
png_image_free()
) were patched in libpng 1.6.37+, making the new lib safer for decoding old files .
⚠️ 2. Forward Compatibility (Viewing New PNGs with Old Lib)
- Basic Support: Older libpng versions (pre-1.6.37) can decode new PNGs if they avoid new features. Core chunks like
IHDR
orIDAT
remain unchanged . - New Feature Limitations:
- HDR Imagery: Requires libpng 1.6.45+ and apps supporting the
mDCv
chunk. Older libs ignore HDR data, falling back to SDR, which may cause color inaccuracies . - APNG Animation: Officially standardized in PNG Third Edition. Older libs (e.g., <1.6) treat APNG as static images, showing only the first frame .
- EXIF Metadata: New
eXIf
chunks are ignored by legacy decoders, losing metadata like GPS or copyright info .
- HDR Imagery: Requires libpng 1.6.45+ and apps supporting the
- Security Risks: Older libs (e.g., ≤1.6.36) contain unpatched vulnerabilities (e.g., CVE-2015-8126). Parsing malicious new PNGs could exploit these flaws .
📊 Compatibility Summary
Scenario Compatibility Key Considerations Old PNG → New Lib ✅ Excellent Legacy files work flawlessly; security improved. New PNG → Old Lib ⚠️ Partial Basic rendering works, but HDR/APNG/EXIF ignored. Security risks in unpatched versions. New Features 🔧 Conditional Requires updated apps (e.g., Photoshop, browsers) and OS support . 🔧 3. Implementation and Industry Adoption
- Broad Support: Major browsers (Chrome, Safari, Firefox), OSs (iOS, macOS), and tools (Photoshop, DaVinci Resolve) already support the new spec .
- Progressive Enhancement: New features like HDR use optional chunks, ensuring graceful degradation in older software .
- Future-Proofing: Work on PNG Fourth Edition (HDR/SDR interoperability) and Fifth Edition (better compression) is underway .
💎 Conclusion
- Upgrade Recommended: New libpng (1.6.49+) ensures security and full compatibility with legacy files.
- Test Workflows: Verify critical tools handle new features (e.g., APNG animation in browsers).
- Fallbacks for Old Systems: For environments stuck with outdated libs, convert new PNGs to legacy format (e.g., strip HDR/APNG) .
For developers: Use
png_get_valid(png_ptr, info_ptr, PNG_INFO_mDCv)
to check HDR support and provide fallbacks .!<
downvoters: is it wrong?
I don’t know. If the poster couldn’t be bothered to fact-check, why would I? It is just safer to assume that it can be misinformation.
If you prefer to know nothing about PNG compatibility rather than something that might be true about PNG. That’s fine but definitely not my approach.
Also, as I said to another commenter. Critical thinking is not some tool you decide to use on some comments and not others. An AI answer on some topics is actually more likely to be correct than an answer by a human being. And it’s not some stuff I was told by an AI guru it’s what researchers are evaluating in many universities. Ask an human to complete various tasks and then ask the AI model and compare scientifically the data. And it turns out there is task where the AI outperforms the human pretty much all the time.
YET on this particular task the assumption is that it’s bullshit and it’s just downvoted. Now I would have posted the same data myself and for some reason I would not see a single downvote. The same data represented differently completely change the likelihood of it being accurate. Even though at the end of the day you shouldn’t trust blindly neither a comment from an human or an AI output.
Honestly, I’m saddened to see people already rejecting completely the technology instead of trying to understand what it’s good at and what it’s bad at and most importantly experiencing it themselves.
I wanted to know what was generative AI worth so I read about it and tried it locally with open source software. Now I know how to spot images that are AI generated, I know what’s difficult for this tech and what is not. I think that’s a much healthier attitude than blindly rejecting any and all AI outputs.
I do not have downvotes on my instance, so please, have a 👎
2029 Headline: Worlds largest data breach caused by zero day exploit in popular PNG 3.0 renderer
the payload was reportedly embedded in an animated image of the attacker repeatedly flicking his left testicle
Now if anyone don’t mind explaining, PNG vs JXL?
JXL is badly supported but it does offer lossless encoding in a more flexible and much more efficient way than png does
Basically jxl could theoretically replace png, jpg, and also exr.
Interestingly, I downloaded GNOME’s pride month wallpaper to see what it looked like, and the files were JXL. Never seen them in the wild before that
Some parts of the open source world probably still desperately try to make JXL happen. This is understandable, considering its potential. Shame this wouldn’t work.
Why are they trying to make it happen, and why it no work? Is JXL better than PNG? Maybe I need to do some research to better learn the difference
JXL can do lossy images (like JPEG) and lossless ones (like PNG), and on average it’ll produce smaller file sizes than both (While beating JPEG quality wise). The killer feature is that it can do lossless recompression of existing JPEG files and shave off about 20% of the file size, and it’s reversible so you can turn those JXL files back into JPEG images for existing software.
The downside is that it was created by Google Research (among others), but the Chrome team made AVIF instead and decided that’s what they’d support and nothing else.
At least Safari supports it.
lossless recompression of existing JPEG Uh… how does it make a JPEG lossless? Or is it lossless in that it makes a JXL out of a JPEG without affecting the original JPEG quality (i.e. no further loss beyond JPEG’s)?
Being able to turn JPEGs into JXLs and JXLs back to JPEGs is cool, though
What’s with the AVIF thing? Yet another I am unfamiliar with (all I know about image formats is JPG = worse quality, PNG = better quality, GIF = animated (and something WebP. Idk much about that one either))
Also, in my research, I’ve found something about the distinction between lossless JXL vs lossy JXL. Seems like you wouldn’t be able to tell if the image is lossy or lossless just from it being a JXL
WebP is the same, it’s got a lossy mode (VP8) and a lossless mode (Which is more limited than PNG, but beats it where it overlaps). But to make it more complicated the lossless mode also has lossy processing modes, where it alters the image first to achieve smaller output sizes.
People have a long habit of turning JPEG files into PNG files, the file extension won’t help you there. They also could have reduced the colour depth or resized it, all lossy operations. All it really tells you is that it can have an alpha channel.
As for AVIF, personally I don’t like the format, it feels like an “open media” (But still patented) version of HEIF to oppose Apple. Like WebP it makes the (baseless IMO) assumption that a format designed to encode motion data is better at encoding still data than a format designed to encode still data. It’s got all the limitations of a video format (It’s got a max resolution, only supports 12bit images, and no progressive decoding), and they left out all the enhancements from WebP (The dedicated lossless mode, “lossless AVIF” files are huge and the last I checked badly supported, so nobody actually used them, and they just called very high quality settings “lossless”)
A team inside of Google was working on WebP2 around the same time, that used AV1 but actually added the useful stuff like efficient lossless encoding, it got killed too in favour of AVIF.
I could have sworn animated pngs were a thing in the Macromedia Fireworks days. Really dating myself with that ref.
There were two different animated PNG extensions, MNG and APNG. Neither of them ever really caught on. I guess they’re hoping to do better by baking it into the core spec.
APNG is what they’re using in v3, so all many libraries need to do* is update that code for HDR.
* surely that’s easy, right?
I mean, on a Linux system that’s not riddled with flatpak / snap / … You’d basically only need to update libpng and you’d be good.
I miss the days when all the cool websites used Flash. I think Macromedia killed it for some reason. Probably because it had security flaws, back then it was pretty bandwidth-intensive too, but it made for some dynamic web designs.
Flash was a security nightmare all round, not counting the security flaws. It was just designed without any security features. It was also terribly inefficient at its core job, that was supposedly vector animation. It filled a gap in a time where browser and standards where not that advanced.
Over time, Flash issues where never resolved, but the bloatness of the software kept increasing. Along the way, HTML got better specs, JavaScript got vast improvement, especially in everyone adhering to roughly the same standard (thanks microsoft for finally caving in…), and so the flash interpreter was highly redundant with the browser itself.
For a while flash editors could export in HTML5 and you’d get roughly the same result, but with a fraction of the resources requirements, so naturally there was little incentive to keep the flash player around.
I’m not sure if “killing flash” could be attributed to their author, or to the loss of interest.
Also note that alternative flash players exists to still play older swf files, and some sites uses them alongside with plain video conversion for flash animations that weren’t dynamic.
They should have let it die because nearly everything else is nowadays somehow better:
https://en.wikipedia.org/wiki/PNG#Comparison_with_other_file_formats
Maybe I’m just a newb, but it still looks like PNG is the goto to ensure lossless image storage.
Everything else on that list that is “better” does/can do lossy compression. I’m not sure how to force apps to use lossless compression, so to me, all those lossy-capable formats are a drawback.
I absolutely hate WebP. Worst format ever.
What’s wrong with webp? It support animation, lossless compression, lossy compression and transparency. Animation has a smaller size than gif.
I hate that you can’t right click copy images, it always wants to share as a link. Plus some other issues when sharing, but it’s just such a pain in the ass.
To ELI5 this, this happens when whoever made the webpage put a text layer above the image - probably on purpose to make it harder for people to download the image.