Live data from Hacker News

A new PNG spec

programmax.net

351–360 of 622 posts

Re: A new PNG spec

#351
post #331

It seems like this new PNG spec just cements what exists already, great! The best codecs are the ones that work on everything. PNG and JPEG work everywhere, reliably. Try opening a HEIC or AV1 or something on a machine that doesn't natively support it down to the OS-level, and you're in for a bad time. This stuff needs to work everywhere—in every app, in the OS shell for quick-looking at files, in APIs, on Linux, etc…

This new spec will make PNG even worse than HEIC or AV1 - you won’t know what codec is actually inside the PNG until you open it.

> you won’t know what codec is actually inside the PNG until you open it.

But this is a feature. Think about all those exploits made possible by this feature. Sincerely, the CIA, the MI-6, the FSB, the Mossad, etc.

Re: A new PNG spec

#352

Earlier quoted context omitted.

Because the creator of gifs telling the world how he pronounced it made such a huge difference :) Not sure I'll bother to reprogram myself from “png”, “pung”, or “pee-enn-gee”.

When someone makes a baby, you call that person by their real name with the correct pronunciation, don’t you? So why can’t you do that with GIF or PNG? People that create things get to name them.

First, it's not a baby, that's a ridiculous comparison.

But also, no, not universally even for babies, especially when the name is something ridiculous like X Æ A-Xii where even parents disagree on pronunciation, or when the person himself uses a "non-specced" variant

Re: A new PNG spec

#353

A fun trick I do with my web based drawing tools is to save a JSON representation of your document as a comment field inside of a PNG. This way the doc you save is immediately usable as an image but can also be loaded back into the editor. Also means your downloads folder isn’t littered with unintelligible JSON files.

Could you expand on this? It sounds a bit preposterous to save a text, as json, inside an image - and then expect it to be immediately usable… as an image?

Re: A new PNG spec

#354
post #170

It is just a spec on something widely implemented already. Assuming Next gen PNG will still require new decoder. They could just call it PNG2. JPEG-XL already provides everything most people asked for a lossless codec. If there are any problems it is its encoding and decoding speed and resources. Current champion of Lossless image codec is HALIC. https://news.ycombinator.com/item?id=38990568

I'll be honest, I ignored JPEG XL for a couple years because I assumed that it was merely for extra large images.

Re: A new PNG spec

#355

A fun fact about PNG, the correct pronunciation is defined in the specification > PNG is pronounced “ping” See the end of Section 1 [0] 0: https://www.w3.org/TR/REC-png.pdf

Ha, been doing it "wrong" my whole life!

Re: A new PNG spec

#357
post #5

So animated GIFs can be replaced by Animated PNGs with alpha blending with transparent backgrounds and lossless compression! Some nostalgia from 2000s websites can be revived and relived :) Curious if Animated SVGs are also a thing. I remember seeing some Javascript based SVG animations (it was a animated chatbot avatar) - but not sure if there is any standard framework.

Almost nowhere that supports uploading GIFs supports APNG or animated WEBP. The back end support is so low it's close to zero. Which is really frustrating.

Re: A new PNG spec

#358

A fun trick I do with my web based drawing tools is to save a JSON representation of your document as a comment field inside of a PNG. This way the doc you save is immediately usable as an image but can also be loaded back into the editor. Also means your downloads folder isn’t littered with unintelligible JSON files.

Could you expand on this? It sounds a bit preposterous to save a text, as json, inside an image - and then expect it to be immediately usable… as an image?

no, GP meant they add the JSON text to the meta data of the image as comment.

Re: A new PNG spec

#359

A fun trick I do with my web based drawing tools is to save a JSON representation of your document as a comment field inside of a PNG. This way the doc you save is immediately usable as an image but can also be loaded back into the editor. Also means your downloads folder isn’t littered with unintelligible JSON files.

Could you expand on this? It sounds a bit preposterous to save a text, as json, inside an image - and then expect it to be immediately usable… as an image?

Not OP, but PNG (and most image/video formats) allows metadata and most allows arbitrary fields. Good parsers know to ignore/safely skip over fields that they are not familiar with.

https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_PN...

This is similar to HTTP request headers, if you're familiar with that. There are a set of standard headers (User-Agent, ETag etc) but nobody is stopping you from inventing x-tomtom and sending that along with HTTP request. And on the receiving end, you can parse and make use of it. Same thing with PNG here.

Re: A new PNG spec

#360

Earlier quoted context omitted.

5% of people can't view them, yet 25% of top websites use them? In what other industry would it be considered acceptable to exclude 5% of visitors/users/clients?

I can tell you, I have personally worked with a global corporation and we estimated that for one of their websites, supporting the 3% that we exclude by using “modern standards” would be more costly than the amount of revenue they get from them. So in that case, it was a rational decision. And up to the 10% cut, management just didn’t want to do the extra investment. So if something falls below that 10% threshold, th…

Something is off in this calculation, how did they get to such a high cost for such a simple thing as an alternative image format when the web supports multiple???
Post reply on HN