Top
Best
New

Posted by bluedel 7 days ago

A new PNG spec(www.programmax.net)
667 points | 595 commentspage 3
jbverschoor 6 days ago||
What if we kind of fit JXL in PNG? That way it's more likely to be supported
snickerbockers 6 days ago||
It was gone??? Was I the only one using it this entire time?
nektro 6 days ago||
cautiously optimistic. the thing that makes png so sought after is its status as frozen
razorfen 5 days ago||
Can anyone explain how they maintain backwards compatibility on formats like this when adding features? I assume there are byte ranges managed in the format, but with things like compression, wouldn’t compressed images be unrenderable on clients that don’t support it? I suppose it would behoove servers to serve based on what the client would support.
gmueckl 5 days ago||
In mynunderstanding, the actual image data encoding isn't altered in this update. It only introduces an extended color space definition for the encoded data.

PNG is a highly structured file format internally. It borrows design ideas from formats like EA's Interchange File Format in that it contains lists of chunks with fixed headers encoding chunk type amd length. Decoders are expected to parse them and ignore chunk types they do not support.

joquarky 5 days ago||
The Amiga was quite a platform. Glad to know that it had some long term influence.
joshmarinacci 5 days ago|||
The PNG format has chunks with types. So you can add an additional chunk with a new type and existing decoders will ignore it.

There is also some leeway for how encoding is done as long as you end up with a valid stream of bits at the end (called the bit stream format), so encoders can improve over time. This is common in video formats. I don’t know if a lossless image format would benefit much from that.

gmueckl 5 days ago||
PNG is a bit unusual in that it allows a couple of alternate compressed encodings for the data that are all lossless. It is up to the encoder to choose between them (scanline by scanline, IIRC). So.this encoding algorithm leeway is implicit in a way.
jdhsddh 5 days ago||
PNG is specifically designed to support this. Clients will simply skip chunks they do not understand.

In this case there could be an embedded reduced colour space image next to an extended color space one

guilbep 6 days ago||
Let's call it PPNG: Pas Portable NetWork Graphic
jug 5 days ago||
This is the first time I’ve seen HDR used to refer to wider color spaces and not extended brightness and contrast ratios.
ProgramMax 5 days ago||
Yeah. I mentioned this elsewhere but repeating here:

I designed the article to be accessible and understandable for the average person. So I took some liberties like showing only HDR primaries and not deep diving into HDR transfer functions. People understand the primaries intuitively.

But you are right that a wide color image could also use those same primaries without being HDR.

My goal was to be as truthful as possible while still being digestible at a glance.

In the article, I linked to Chris Lilley's post which explains it more thoroughly for the technical people.

account42 5 days ago||
Don't forget increased bit depths. You need all of these for a full HDR experience.
Dwedit 6 days ago||
If you wanted better compression, it's called Lossless WEBP. Lossless WEBP is such a nice codec. Compared with Lossless JXL, it decompresses many times more quickly, and while JXL usually produces a smaller file, it doesn't always.

Lossless AVIF is not competitive.

However, lossless WEBP does not support indexed color images. If you need palettes, you're stuck with PNG for now.

ansgri 6 days ago||
How's HDR and high bit depth support? One of the things I liked about JXL is wide range of bit depths and arbitrary number of channels.
altairprime 6 days ago|||
I look forward to seeing what PNG v5 does in the future with compression, especially relative to existing formats.
account42 5 days ago|||
Webp is a joke. The reference encoder can't even get color spaces right.
rurban 6 days ago||
And the JXL api is a nightmare, compared to WEBP.
Dwedit 5 days ago||
Yeah, the whole "subscribe to events then check a status result" thing is pretty bad. This is compounded by "Box" behaving differently than everything else. When I made JxlSharp (C# JXL library wrapper), I had to add a workaround in there to force Box to behave like all the other event subscriptions.

And buffer sizes aren't handled in a good way. You have to provide pre-allocated memory, guessing how big it is supposed to be. Then you get a "not big enough" error. This is a guessing game, not a good design. You're forced to overshoot, then shrink the buffer afterwards.

---

In different APIs, there tends to be a function you call to get the required buffer size. For example, many Win32 API functions make you call them with a buffer size of 0, then you get the actual required size back. Another possibility is having the library allocate the memory, and return the allocated buffer to you. Since cross-module memory management is hairy (different `malloc` implementations can't interoperate), some APIs let you provide the `malloc`, `realloc`, and `free` functions.

tonyedgecombe 6 days ago||
>After 20 years of stagnation, PNG is back with renewed vigor!

After 20 years of success, we can't resist the temptation to mess with what works.

encom 6 days ago||
Yea I'm mildly concerned about this as well. PNG's age is a feature, in a time where software development has gone to hell.
HelloNurse 6 days ago||
Without the new HDR and color profile handling, PNG was still useful but significantly obsolete. Display hardware has progressed over a few decades, raising the bar for image files.
virtualritz 6 days ago|||
There is nothing in display hardware today that TIFF couldn't handle already.

For example 16bit (integer) TIFF files 'with headroom', i.e. where some bits were used to represent data over 1.0 (HDR) was a common approach for VFX work in the 90's.

16bit float TIFF is also thing since 33 years. Adobe DNG is modeled after TIFF. High end offline renderers have traditionally been using TIFF (with mip-maps) to store textures.

TIFF supports tags so primaries and white point or a known color space name can be stored in the file.

The format is so versatile, it is used everywhere.

And of course it also supports indexed color, i.e. a non-negotiable feature at the time PNG was introduced.

PNG was meant to replace GIF. Instead of looking what was already there some group of "experts" and "enthusiasts" (quote Wikipedia) succumbed to their NIH complexes. If licensing/patent woes over compression algorithms had been a motivator, why not just add a new one to TIFF?

The fact that PNG stores straight/unpremultiplied alpha says everything if you know anything about imaging in computer graphics.

And the fact that the updated format spec just released didn't address this tells you everything you need to know about the group in charge of that, today.

PNG is the VHS of image formats. It should have never seen the light day of in the first place nor the adoption it did.

tonyedgecombe 6 days ago|||
>The format is so versatile, it is used everywhere.

Yeah, I love the fact that you can embed a PDF file inside a TIFF.

Mr_Minderbinder 5 days ago|||
> The fact that PNG stores straight/unpremultiplied alpha says everything if you know anything about imaging in computer graphics.

> And the fact that the updated format spec just released didn't address this tells you everything you need to know about the group in charge of that, today.

What does it say? That they are naive or have the wrong priorities? Their rationale for this seems quite reasonable to me: https://www.w3.org/TR/PNG-Rationale.html#R.Non-premultiplied...

leni536 6 days ago||||
PNG already supports color profiles, but probably not HDR. I would say that the gamut argument in the article is misleading, you can already encode a wider gamut.

Not sure how HDR encoding works, but my impression is that you can set a nominal white point other than (1, 1, 1) in your specified colorspace. This is an extension, but orthogonal to specifying the colorspace itself and the gamut.

ProgramMax 5 days ago||
You are correct. I designed the article to be very approachable and understandable for the normal person. As such, I took some liberties like only showing HDR primaries and ignoring transfer function. I linked to Chris Lilley's post to give experts a more correct answer.

But wide color gamut was already possibly in PNG via ICC profiles (HDR was not). And those primaries I showed could have been used in a wide color image.

So the image is a bit misleading or red-flag-y to experts who know. But to the average person, I think it is as truthful as I can be without getting too deep in the weeds.

jeroenhd 6 days ago||||
> Display hardware has progressed

The continued popularity of non-HDR 1080p screens on laptops is a bleak reminder that most people would rather save a couple hundred bucks than buy HDR capable hardware.

HDR is great for TVs and a nice-to-have on phones (who mostly get it for free because OLEDs are the norm these days), but display technology only advances as much as its availability in low-cost devices.

account42 5 days ago||
Or maybe the advantage isn't that big for most uses (images with super bright highlights are a nice novelty but not fun to look at all the time) and people don't want to deal with the clusterfuck that is HDR software support.
encom 6 days ago|||
>Display hardware has progressed

It has, but WWW is still de facto sRGB, and will be for a long time still. But again, I'm not strictly opposed to evolving PNG, I just hope they don't ruin it in the process, because that's usually what happens when something gets update for a modern audience. I'll be watching with mixed optimism and concern.

jeroenhd 6 days ago||
Plenty of JPGs on the web are already in HDR and you wouldn't notice it if you don't have a HDR capable display. The same is true for PNGs.
eviks 6 days ago||
> [not] Officially supports Exif data

How can you call this basic fail a success?

tonyedgecombe 6 days ago|||
Exif data might be important to you but it clearly hasn't stopped the adoption of png.
Retr0id 6 days ago|||
People crammed exif data into PNGs anyway, and now they can continue to do that but in conformance with the spec.
eviks 5 days ago|||
Yes, plenty of tech garbage floats at the top, the question is why would you argue that lack of basic fixes over decades is not stagnation, but something positive
account42 5 days ago|||
Embedded (and thus often invisible) metadata is a mistake.
b0a04gl 6 days ago|
it's more to do with the obvious economic layer underneath. you give a format new life only if there's tooling and distribution muscle behind it. adobe, apple, chrome, ffmpeg etc may not get aligned at the same time. someone somewhere wants apng/hdr/png to be a standard pipe again for creative chains; maybe because video formats are too bulky for microinteraction or maybe because svg is too unsafe in sandboxed renderers. and think onboarding of animations, embedded previews, rich avatars, system wide thumbs ; all without shipping a separate codec or runtime. every time a 'dead' format comes back, it's usually because someone needed a way around a gate
ProgramMax 5 days ago|
In general, I support the "follow the money" idea. But I don't think it applies here.

I'm retired and making zero money here. (I'm actually losing money on it. Wish I had a company sponsoring me for the flights and hotels for meetups.)

All participants are required to not patent any piece of it. We work hard to make sure we only reference open standards. (This one is quite tricky. We have to convince other standard orgs to make their stuff free.)

I could see the argument for getting around a gate. But fwiw I don't think that's the case :)

More comments...