Skip to content

PNG has been updated for the first time in 22 years — new spec supports HDR and animation

Technology
110 69 352
  • This post did not contain any content.

    It's great that Papua New Guinea is still receiving updates /s

  • I hate that you can’t right click copy images, it always wants to share as a link. Plus some other issues when sharing, but it’s just such a pain in the ass.

    That’d be the browser’s (or whatever app you’re using) fault, not the format. I guess you could choose to hate it for poor support.

  • 2029 Headline: Worlds largest data breach caused by zero day exploit in popular PNG 3.0 renderer

    the payload was reportedly embedded in an animated image of the attacker repeatedly flicking his left testicle

    That was because they added 'shorts' and friend-lists to it.

  • Right, and it depends on what "quite off target" means. Are we talking about greens becoming purples? Or dark greens becoming bright greens? If the image is still mostly recognizable, just with poor saturation or contrast or whatever, I think it's acceptable for older software.

    So it depends on the specific HDR encoding used, Rec2020 is the most common ones you'll see (It's meant for "pure" setups, i.e. where the source and output are tightly linked, e.g. gaming consoles or blu-ray, or so) and the raw data won't look great. While something like HLG (Hybrid-Log Gamma) is designed for better fallback (As it's meant for TV broadcast, where the output device is "whatever TV the user has"), so should just look dimmer.

    This is a HDR screenshot I took of Destiny 2, which uses Rec2020, tone mapped to SDR

    And here's the raw screenshot data from before tonemapping.

    If the second image had all the right HDR metadata, and the viewer supported it properly, then both images would match.

  • JXL can do lossy images (like JPEG) and lossless ones (like PNG), and on average it'll produce smaller file sizes than both (While beating JPEG quality wise). The killer feature is that it can do lossless recompression of existing JPEG files and shave off about 20% of the file size, and it's reversible so you can turn those JXL files back into JPEG images for existing software.

    The downside is that it was created by Google Research (among others), but the Chrome team made AVIF instead and decided that's what they'd support and nothing else.

    At least Safari supports it.

    lossless recompression of existing JPEG
    Uh… how does it make a JPEG lossless? Or is it lossless in that it makes a JXL out of a JPEG without affecting the original JPEG quality (i.e. no further loss beyond JPEG's)?

    Being able to turn JPEGs into JXLs and JXLs back to JPEGs is cool, though

    What's with the AVIF thing? Yet another I am unfamiliar with (all I know about image formats is JPG = worse quality, PNG = better quality, GIF = animated (and something WebP. Idk much about that one either))

    Also, in my research, I've found something about the distinction between lossless JXL vs lossy JXL. Seems like you wouldn't be able to tell if the image is lossy or lossless just from it being a JXL

  • lossless recompression of existing JPEG
    Uh… how does it make a JPEG lossless? Or is it lossless in that it makes a JXL out of a JPEG without affecting the original JPEG quality (i.e. no further loss beyond JPEG's)?

    Being able to turn JPEGs into JXLs and JXLs back to JPEGs is cool, though

    What's with the AVIF thing? Yet another I am unfamiliar with (all I know about image formats is JPG = worse quality, PNG = better quality, GIF = animated (and something WebP. Idk much about that one either))

    Also, in my research, I've found something about the distinction between lossless JXL vs lossy JXL. Seems like you wouldn't be able to tell if the image is lossy or lossless just from it being a JXL

    WebP is the same, it's got a lossy mode (VP8) and a lossless mode (Which is more limited than PNG, but beats it where it overlaps). But to make it more complicated the lossless mode also has lossy processing modes, where it alters the image first to achieve smaller output sizes.

    And PNG is no different.

    People have a long habit of turning JPEG files into PNG files, the file extension won't help you there. They also could have reduced the colour depth or resized it, all lossy operations. All it really tells you is that it can have an alpha channel.

    As for AVIF, personally I don't like the format, it feels like an "open media" (But still patented) version of HEIF to oppose Apple. Like WebP it makes the (baseless IMO) assumption that a format designed to encode motion data is better at encoding still data than a format designed to encode still data. It's got all the limitations of a video format (It's got a max resolution, only supports 12bit images, and no progressive decoding), and they left out all the enhancements from WebP (The dedicated lossless mode, "lossless AVIF" files are huge and the last I checked badly supported, so nobody actually used them, and they just called very high quality settings "lossless")

    A team inside of Google was working on WebP2 around the same time, that used AV1 but actually added the useful stuff like efficient lossless encoding, it got killed too in favour of AVIF.

  • I hate that you can’t right click copy images, it always wants to share as a link. Plus some other issues when sharing, but it’s just such a pain in the ass.

    To ELI5 this, this happens when whoever made the webpage put a text layer above the image - probably on purpose to make it harder for people to download the image.

  • WebP is the same, it's got a lossy mode (VP8) and a lossless mode (Which is more limited than PNG, but beats it where it overlaps). But to make it more complicated the lossless mode also has lossy processing modes, where it alters the image first to achieve smaller output sizes.

    And PNG is no different.

    People have a long habit of turning JPEG files into PNG files, the file extension won't help you there. They also could have reduced the colour depth or resized it, all lossy operations. All it really tells you is that it can have an alpha channel.

    As for AVIF, personally I don't like the format, it feels like an "open media" (But still patented) version of HEIF to oppose Apple. Like WebP it makes the (baseless IMO) assumption that a format designed to encode motion data is better at encoding still data than a format designed to encode still data. It's got all the limitations of a video format (It's got a max resolution, only supports 12bit images, and no progressive decoding), and they left out all the enhancements from WebP (The dedicated lossless mode, "lossless AVIF" files are huge and the last I checked badly supported, so nobody actually used them, and they just called very high quality settings "lossless")

    A team inside of Google was working on WebP2 around the same time, that used AV1 but actually added the useful stuff like efficient lossless encoding, it got killed too in favour of AVIF.

    Ooh, Alpha channel. Forgot of that. That is a nice one. Love me some alpha channel.

    So, what would you say is best? If someone wanted to save an image, which format would you recommend? I usually go with PNG. JPG if I want bad quality on purpose (drag quality slider to minimum for extra compression)

  • Ooh, Alpha channel. Forgot of that. That is a nice one. Love me some alpha channel.

    So, what would you say is best? If someone wanted to save an image, which format would you recommend? I usually go with PNG. JPG if I want bad quality on purpose (drag quality slider to minimum for extra compression)

    PNG gets you the best compatibility and features, at the expense of file size. But I probably wouldn't use it for uploading photographs to the web of course.

  • I'm probably gonna be massively downvoted for saying the forbidden word but I asked AI to do a summary with references of the forward and backward compatibility of PNG's new version:

    !

    Based on recent search results, the new PNG specification (Third Edition) and its reference library (libpng) maintain strong backward compatibility while introducing modern features. Here's a detailed compatibility analysis:

    🔄 1. Backward Compatibility (Viewing Old PNGs with New Lib)

    • Full Support: The new libpng (1.6.49+) and PNG Third Edition fully support legacy PNG files. Existing PNGs (conforming to the 2003/2004 spec) will render correctly without changes .
    • Implementation Stability: Libpng's API evolution (e.g., hiding png_struct/png_info internals since 1.5.0) ensures older apps using png_get_*/png_set_* functions remain compatible. Direct struct access, deprecated since 1.4.x, may break in libpng 2.0.x (C99-only) .
    • Security Enhancements: Critical vulnerabilities (e.g., CVE-2019-7317 in png_image_free()) were patched in libpng 1.6.37+, making the new lib safer for decoding old files .

    ⚠️ 2. Forward Compatibility (Viewing New PNGs with Old Lib)

    • Basic Support: Older libpng versions (pre-1.6.37) can decode new PNGs if they avoid new features. Core chunks like IHDR or IDAT remain unchanged .
    • New Feature Limitations:
      • HDR Imagery: Requires libpng 1.6.45+ and apps supporting the mDCv chunk. Older libs ignore HDR data, falling back to SDR, which may cause color inaccuracies .
      • APNG Animation: Officially standardized in PNG Third Edition. Older libs (e.g., <1.6) treat APNG as static images, showing only the first frame .
      • EXIF Metadata: New eXIf chunks are ignored by legacy decoders, losing metadata like GPS or copyright info .
    • Security Risks: Older libs (e.g., ≤1.6.36) contain unpatched vulnerabilities (e.g., CVE-2015-8126). Parsing malicious new PNGs could exploit these flaws .

    📊 Compatibility Summary

    Scenario Compatibility Key Considerations
    Old PNG → New Lib ✅ Excellent Legacy files work flawlessly; security improved.
    New PNG → Old Lib ⚠️ Partial Basic rendering works, but HDR/APNG/EXIF ignored. Security risks in unpatched versions.
    New Features 🔧 Conditional Requires updated apps (e.g., Photoshop, browsers) and OS support .

    🔧 3. Implementation and Industry Adoption

    • Broad Support: Major browsers (Chrome, Safari, Firefox), OSs (iOS, macOS), and tools (Photoshop, DaVinci Resolve) already support the new spec .
    • Progressive Enhancement: New features like HDR use optional chunks, ensuring graceful degradation in older software .
    • Future-Proofing: Work on PNG Fourth Edition (HDR/SDR interoperability) and Fifth Edition (better compression) is underway .

    💎 Conclusion

    • Upgrade Recommended: New libpng (1.6.49+) ensures security and full compatibility with legacy files.
    • Test Workflows: Verify critical tools handle new features (e.g., APNG animation in browsers).
    • Fallbacks for Old Systems: For environments stuck with outdated libs, convert new PNGs to legacy format (e.g., strip HDR/APNG) .

    For developers: Use png_get_valid(png_ptr, info_ptr, PNG_INFO_mDCv) to check HDR support and provide fallbacks .

    !<

    I do not have downvotes on my instance, so please, have a 👎

  • I made a porn scroller without the clutter

    Technology technology
    1
    1
    4 Stimmen
    1 Beiträge
    12 Aufrufe
    Niemand hat geantwortet
  • 1 Stimmen
    1 Beiträge
    4 Aufrufe
    Niemand hat geantwortet
  • The Wikipedia Test

    Technology technology
    8
    1
    85 Stimmen
    8 Beiträge
    46 Aufrufe
    B
    You act like they want us to have access to information they don't have full control over. I'm pretty sure that's a really low priority for most of them.
  • 210 Stimmen
    16 Beiträge
    67 Aufrufe
    J
    It doesn't seem to be the case. As far as I can tell, the law only covers realistic digital imitations of a person's likeness (deepfakes), with an exception for parody and satire. If you appear in public that is effectively license for someone to capture your image.
  • I Counted All of the Yurts in Mongolia Using Machine Learning

    Technology technology
    9
    17 Stimmen
    9 Beiträge
    43 Aufrufe
    G
    I'd say, when there's a policy and its goals aren't reached, that's a policy failure. If people don't like the policy, that's an issue but it's a separate issue. It doesn't seem likely that people prefer living in tents, though. But to be fair, the government may be doing the best it can. It's ranked "Flawed Democracy" by The Economist Democracy Index. That's really good, I'd say, considering the circumstances. They are placed slightly ahead of Argentina and Hungary. OP has this to say: Due to the large number of people moving to urban locations, it has been difficult for the government to build the infrastructure needed for them. The informal settlements that grew from this difficulty are now known as ger districts. There have been many efforts to formalize and develop these areas. The Law on Allocation of Land to Mongolian Citizens for Ownership, passed in 2002, allowed for existing ger district residents to formalize the land they settled, and allowed for others to receive land from the government into the future. Along with the privatization of land, the Mongolian government has been pushing for the development of ger districts into areas with housing blocks connected to utilities. The plan for this was published in 2014 as Ulaanbaatar 2020 Master Plan and Development Approaches for 2030. Although progress has been slow (Choi and Enkhbat 7), they have been making progress in building housing blocks in ger distrcts. Residents of ger districts sell or exchange their plots to developers who then build housing blocks on them. Often this is in exchange for an apartment in the building, and often the value of the apartment is less than the land they originally had (Choi and Enkhbat 15). Based on what I’ve read about the ger districts, they have been around since at least the 1970s, and progress on developing them has been slow. When ineffective policy results in a large chunk of the populace generationally living in yurts on the outskirts of urban areas, it’s clear that there is failure. Choi, Mack Joong, and Urandulguun Enkhbat. “Distributional Effects of Ger Area Redevelopment in Ulaanbaatar, Mongolia.” International Journal of Urban Sciences, vol. 24, no. 1, Jan. 2020, pp. 50–68. DOI.org (Crossref), https://doi.org/10.1080/12265934.2019.1571433.
  • 4 Stimmen
    1 Beiträge
    4 Aufrufe
    Niemand hat geantwortet
  • 73 Stimmen
    38 Beiträge
    133 Aufrufe
    F
    For sure they are! Meta more then the others though
  • The Enshitification of Youtube’s Full Album Playlists

    Technology technology
    3
    1
    108 Stimmen
    3 Beiträge
    24 Aufrufe
    dual_sport_dork@lemmy.worldD
    Especially when the poster does not disclose that it's AI. The perpetual Youtube rabbit hole occasionally lands on one of these for me when I leave it unsupervised, and usually you can tell from the "cover" art. But only if you're looking at it. Because if you just leave it going in the background eventually you start to realize, "Wow, this guy really tripped over the fine line between a groove and rut." Then you click on it and look: Curses! Foiled again. And golly gee, I'm sure glad Youtube took away the option to oughtright block channels. I'm sure that's a total coincidence. W/e. I'm a have-it-on-my-hard-drive kind of bird. Yt-dlp is your friend. Just use it to nab whatever it is you actually want and let your own media player decide how to shuffle and present it. This works great for big name commercial music as well, whereupon the record labels are inevitably dumb enough to post songs and albums in their entirety right there you Youtube. Who even needs piracy sites at that rate? Yoink!