4 ms·
PNG and JPEG are simple enough that a single person can write a useful decoder for them from scratch in a weekend or two. The newer formats achieve better comp
by pornel 2y ago
PNG and JPEG are simple enough that a single person can write a useful decoder for them from scratch in a weekend or two.
The newer formats achieve better compression by adding more and more stuff. They're year-long projects to reimplement, which makes almost everyone stick to their reference implementations.
- tomrod 2y agoThe newer ones are destined to failure by complexity then?
- lytedev 2y agoNah the space savings can significantly cut down on bandwidth costs at scale. They'll get (and have been?) pushed by Google and friends for that reason.
- deleted 2y ago[deleted]
- astrange 2y agoNewer image formats are based on video codecs, so if you already have the video codec around then theoretically it's not too bad.
- qingcharles 2y agoPNG and JPEG both have ICC color profiles, which complicates things. Even most Windows programs (including Windows Explorer thumbnails) don't display images correctly, which is infuriating.
- pornel 2y agoICC isn't too complex itself, but the bolted-on design of color profiles makes them annoying to handle, and easy to ignore. You can't just handle pixels, you need to handle pixels in a context of input and output profiles. That's a pain like code-page based text encodings before Unicode, and we haven't established a Unicode equivalent for pixels yet.
- hnlmorg 2y agoA “Unicode for pixels” is still just pixels. The problem colour profiles solves is about how the monitor should display those colours. It’s so that what you see on the screen is going to be exactly the same shade of CMYK as what gets printed. It’s a big problem for magazine (and equivalent) publishing. Movies too. But much less of an issue for other media industries which are targeting end user devices like smart phones and laptops. The equivalent in typefaces would be the font rasterisation itself (like Microsoft Clear Type) rather than code pages.
- pornel 2y ago"Unicode for pixels" would be something like Rec.2020 color (with some specific high depth and HDR solution defined) used in all APIs that take pixels. Currently sRGB is the closest to a universal default, but that's ASCII of pixels. You need a monitor profile because the display protocol takes dumb numeric values that are interpreted in monitor-specific way, instead of being sent in some universal color space, and converted to monitor's internal format by the monitor itself. In this analogy monitors are like pre-Unicode printers, where characters were just bytes, and the bytes mapped to whatever 8-bit language-specific font the printer had.
- hnlmorg 2y agoYou’re assuming that monitors and printers can be trusted to accurately reproduce the colour space even if there was a profile attached (which, by the way, most monitors do actually have). This isn’t true. Particularly with monitors where people can adjust the contract and brightness. The reason colour profiles exist is so that computers can be calibrated to support the monitor output. You are also ignoring the fact that environmental factors can have an effect too. Ie how the room is lit. Comparing something standardised like writing glyphs with something highly individual (monitor calibration) doesn’t make a whole lot of sense.
- userbinator 2y agoSame for GIF. I've written decoders for all 3.