←back to thread

A new PNG spec

(www.programmax.net)
614 points bluedel | 10 comments | | HN request time: 0.948s | source | bottom
Show context
poisonborz ◴[] No.44375523[source]
Not backwards compatible. We just add it to that nice cupboard "great advanced image formats we will forget about".

Society doesn't need a new image format. I'd wager to say not any new multimedia format. Big corporate entites do, and have churning them out at a steady pace.

Look at poor webp - a format pushed by the largest industry players - and the abysmal everyday use it gets, and the hate it generates.

replies(10): >>44375537 #>>44375557 #>>44375998 #>>44376442 #>>44376512 #>>44376957 #>>44376999 #>>44377083 #>>44377151 #>>44380128 #
michaelmior ◴[] No.44375537[source]
> and the abysmal everyday use it gets

Estimates are that 95% of Internet users have a browser that supports WebP and that ~25% of the top million websites serve WebP images. I wouldn't call that abysmal.

replies(5): >>44375570 #>>44375590 #>>44375752 #>>44376063 #>>44376879 #
dotancohen ◴[] No.44375590[source]
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?

replies(6): >>44375629 #>>44375653 #>>44375669 #>>44375691 #>>44375850 #>>44376255 #
1. 0points ◴[] No.44375669[source]
> 5% of people can't view them, yet 25% of top websites use them?

That's not how it works.

The server declares what versions of media it has, and the client requests a supported media format. The same trick have been used for audio and video for ages too.

Example:

    <picture>
        <source srcset="a.webp" type="image/webp">
        <img src="fallback.jpg">
    </picture>
replies(1): >>44375890 #
2. vbezhenar ◴[] No.44375890[source]
This problem was solved by HTTP since forever. Client sends `Accept` header with supported formats and server selects the necessary content with corresponding `Content-Type` header. You don't need any HTML tags for it.
replies(2): >>44375941 #>>44376751 #
3. allendoerfer ◴[] No.44375941[source]
What about file extensions?
replies(2): >>44376157 #>>44376171 #
4. jdiff ◴[] No.44376157{3}[source]
Sometimes respected, largely ignored. URLs very often don't map directly to files served.
replies(1): >>44385097 #
5. georgyo ◴[] No.44376171{3}[source]
File extensions are just a hint about what the file might be and have nothing to do with what the file actually is. If the server sets the MIME type, the browser will use that as the hint.

But even beyond that, most file formats have a bit of a header at the start of the file that declares the actual format of the file. Browsers already can understand that and use the correct render for a file without an extension.

replies(1): >>44385099 #
6. NorwegianDude ◴[] No.44376751[source]
No, cause thats just one of the features.

Images are often at different resolutions too, that way, depending on the pixel density of the device, and the physical size, the browser can select the photo that has high enough resolution, but not one that is needlessly large, while also selecting the preferred image format.

7. allendoerfer ◴[] No.44385097{4}[source]
Images almost always do.
replies(1): >>44389223 #
8. allendoerfer ◴[] No.44385099{4}[source]
What if the user wants to use the file outside the browser, where they do not have access to the HTTP headers?
replies(1): >>44387289 #
9. georgyo ◴[] No.44387289{5}[source]
The same is true, if you rename a .png to .jpg and opening it with an image viewer, it will render.
10. jdiff ◴[] No.44389223{5}[source]
I wish, would make my job a good bit easier. Sometimes they don't even respect format query parameters and just use whatever's in your Accept headers.

Will say though that it's not universal, it depends heavily on the corner of the internet you're on.