Live data from Hacker News

A new PNG spec

programmax.net

371–380 of 622 posts

Re: A new PNG spec

#371
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.

Do you mean services that reencode gif files to webm/mp4? apng just works everywhere that png works, and will remain animated as long as it's not re-encoded.

You can even have one frame that gets shown if and only if animation is not supported.

Re: A new PNG spec

#372

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.

This is also how Valetudo delivers robot map data to Home Assistant https://hass.valetudo.cloud.

Re: A new PNG spec

#373
post #342
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

WebP lossless is close to state of the art and widely available. It's also not widely used. The takeaway seems to be that absolute best performance for lossless compression isn't that important, or at least it won't get you widely adopted.

I don't know that i have ever used jpg or png lossless in practical usage (e.g. I don't think 99.9% of mobile app or web usecases are for lossless). WebP lossy performance is just not worth it in practice, which is why WebP never took off IMO.

Are there usecases for lossless other than archival?

Re: A new PNG spec

#374
post #278

Earlier quoted context omitted.

I agree that language is fluid. However, when it comes to names, I think people should have enough respect to pronounce things how the creator (or owner, depending on the situation) of the name says it should be pronounced. Too often people will mispronounce someone's name as a sign of intentional disrespect (see Kamala Harris for a fairly recent prominent example) and I cannot get behind that. You see a similar disr…

I don’t think technical standards merit the same level of “deference to the creator” as personal names. People are wrong about standards they created all the time (ask me what I think about John Gruber’s “stewardship” of Markdown) and should be corrected, a standard is meant for all. Obviously the pronunciation of an acronym isn’t anywhere near as important as technical details, but I think the principle holds.

People are wrong about the children they create all the time too, and should be corrected.

Re: A new PNG spec

#375
post #327

Earlier quoted context omitted.

If the creator insists on a weird pronunciation, because of an inside joke most won't ever get, then I feel no responsibility in humoring them. The G in gif is for graphics. Not 'giraffics'. And most people in the world have no idea what Jif even is, much less a particular catchphrase from an old ad campaign that barely even connects.

And the P in JPEG is for photographic, so you better be saying jay-feg if you want to rely on that logic.

If everyone conformed, then we would have no fun lively debates on things like this. That would be a boring world.

Re: A new PNG spec

#376
post #21

Earlier quoted context omitted.

But animated gradient outlines on text is the only use-case I care about.

"Use case" is written without hyphen https://en.m.wikipedia.org/wiki/Use_case

Hyphenation of multi-word nouns is a process in English that usually happens after some time of usage as separate words. It often happens before eventually merger into a single compound word noun. Such as: "Electronic Mail" to "E Mail" to "e-mail" to "email".

Given how often it is used as a jargon term in software development, I can absolutely see this usage of "use-case" here as a "vote" for the next step in the process. Will we eventually see "usecase" become common? It's possible. I think it might even be a good idea. I'm debating adding my own "votes" for the hyphen moving forward.

Re: A new PNG spec

#377
post #314

Earlier quoted context omitted.

why not? that's up to the program displaying the animation, not the animation itself -- i'm sure a pausable gif or apng display program is possible

It's absolutely possible. Browsers even routinely pause playback when images aren't visible on screen. They just don't have a proper UI and JS APIs exposed, and there's nothing stopping them from adding that. IMO browsers are just stuck with tech debt, and maintainin a no-longer-relevant distinction between "animations" and "videos". Every supported codec should work wherever GIF/APNG work and vice versa. It's not ev…

> They just don't have a proper UI and JS APIs exposed, and there's nothing stopping them from adding that.

Browsers should just allow animated gifs and apngs in

Re: A new PNG spec

#378
This is a false claim in the PR:

> Many of the programs you use already support the new PNG spec: ... Photoshop, ...

Photoshop does NOT support APNGs. The PR calls out APNg recognition as the 2nd bullet point of "What's new?"

Am I missing something? Seems like a pretty big mistake. I was excited that an art tool with some marketshare finally supported it.

Re: A new PNG spec

#379

Earlier quoted context omitted.

I don’t think technical standards merit the same level of “deference to the creator” as personal names. People are wrong about standards they created all the time (ask me what I think about John Gruber’s “stewardship” of Markdown) and should be corrected, a standard is meant for all. Obviously the pronunciation of an acronym isn’t anywhere near as important as technical details, but I think the principle holds.

People are wrong about the children they create all the time too, and should be corrected.

A child is presumably a sentient being, and at some point in their life should gain control of their name. In fact, they do, to some large degree. There are means to change one's legal name, or one can diverge from their legal name and professionally/publicly use a completely different name.

A file format is not a sentient being. The creator's intent matters much more. If GIF had sentience and could voice a desire one way or the other, the whole discussion would be moot as it would clearly be disrespectful to intentionally mispronounce the name.

Re: A new PNG spec

#380

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?

They're not saving text, they're saving an idea - a "map" or a "CAD model" or a "video game skin" or whatever.

Yes, a hypothetical user's sprinker layout "map" or whatever they're working on is actually composed of a few rectangles that represent their house, and a spline representing the garden border, and a circle representing the tree in the front yard, and a bunch of line segments that draw the pipes between the sprinkler heads. Yes, each of those geometric elements can be concisely defined by JSON text that defines the X and Y location, the length/width/diameter/spline coordinates or whatever, the color, etc. of the objects on the map. And yes, OP has a rendering engine that can turn that JSON back into an image.

But when the user thinks about the map, they want to think about the image. If a landscaping customer is viewing a dashboard of all their open projects, OP doesn't want to have to run the rendering engine a dozen times to re-draw the projects each time the page loads just to show a bunch of icons on the screen. They just want to load a bunch of PNGs. You could store two objects on disk/in the database, one being the icon and another being the JSON, but why store two things when you could store one?

Post reply on HN