3 ms·
> Not backwards compatible They say it's technically compatible since older image decoders should recognize the PNG file is using a different compression algor
by lioeters 1y ago
> Not backwards compatible
They say it's technically compatible since older image decoders should recognize the PNG file is using a different compression algorithm than the default.
> Many programs already support the new PNG spec: Chrome, Safari, Firefox, iOS/macOS, Photoshop, DaVinci Resolve, Avid Media Composer...
This is intentionally ignoring the fact that there are countless PNG decoders out in the wild, many using libpng the standard decoder last updated 6 years ago; and they will not be able to read the new PNG v2 files.
They should have used a different file extension, PNG2, to distinguish this incompatible format. Otherwise, users will be confused why their newly saved PNG file cannot be read by certain existing programs.
- JKCalhoun 1y ago[flagged]
- deleted 1y ago[deleted]
- ape4 1y agoThe 50 4E 47 spells "PNG"
- colejohnson66 1y agoThose are indeed the "magic" bytes of PNG. It's a very clever choice meant to ensure the transport layer didn't mess with it. To start, there's a byte with the upper bit set which ensures an "8-bit clean" transport. If it's stripped, it becomes a harmless tab. Then the literal "PNG" text so you can see it in a text editor. Then a CR-LF pair to check for CR-LF to LF translations. Then, a CTRL-Z to stop display on DOS-like systems. And finally, another LF to check for LF to CR-LF translations. It's a clever "magic" that basically ensures a binary transport layer. Things that mattered back in 1996. https://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R.PNG-file-signature https://www.libpng.org/pub/png/spec/1.2/PNG-Rationale.html#R...
- account42 1y agoIt's clever but I'm not so sure it actually mattered - other formats have done just as well with simpler magic numbers. All it does in the end is that you get something that doesn't identify as a PNG file rather than a PNG file with bad data when a non-binary transport is used - both results are bad and immediately apparent.
- colejohnson66 1y agoYes and no. It wasn't just about telling you a problem occurred, but failing early and being able to say exactly why. A "something in the chain is running in 7-bit mode" is more helpful than "CRC error in IDAT". Maybe the developers were being a bit too ambitious/hopeful, but an eight byte "magic" over a "simpler" four byte one isn't really worth crying over, even with 1996 download speeds.
- arp242 1y agolibng seems to get regular updates? A release just a few days ago. There's a PR for APNG: https://github.com/pnggroup/libpng/pull/706 https://github.com/pnggroup/libpng/pull/706 – it seems there was some work for HDR in e.g. https://github.com/pnggroup/libpng/pull/635 https://github.com/pnggroup/libpng/pull/635 as well. Related: https://github.com/pnggroup/libpng/issues/507 https://github.com/pnggroup/libpng/issues/507
- lioeters 1y agoOh cool! I was looking at this page, which looks official but apparently not up to date. https://www.libpng.org/pub/png/libpng.html https://www.libpng.org/pub/png/libpng.html Looks like this is the proper location for the project. https://libpng.sourceforge.io/ https://libpng.sourceforge.io/