High Efficiency Image File Format (HEIF/.heic)
en.wikipedia.org
en.wikipedia.org
At this point AVIF vs JPEG XL is a more interesting discussion than anything vs HEIC.
https://libre-software.net/image/avif-test/
on two Linux machines with Firefox 105, and both showed the alt image text, so I guess maybe not, although it's showing up as enabled in about:config.
Edit: https://avif.io/ seems to work and display converted .jpg files, so maybe the first URL is old and doesn't work.
HEIF doesn't work in any web browser:
I think Safari already supports using at least one actual video format as the `src` in an <img> element but it's weird to do so.
My browser seems to render AVIF just fine on Ubuntu and Manjaro, with Nvidia and Intel GPU backends. If it works with hardware acceleration on top of Nvidia's shitty drivers, I assume it'll work everywhere.
I've heard some old bug reports about colour management and AVIF not working together well in Firefox, that was the reason support had been baked in for a whole but the format was still locked behind a flag. I suppose they fixed that now that they enable the format by default.
It's pretty clear at this point that JPEG XL is a superior codec for e.g. photography. I think the question is going to be whether the browsers decide that it's worth supporting on the web, where lower quality images are the norm.
Some comparison images: https://afontenot.github.io/image-formats-comparison/#eaglef...
Meanwhile, PNG is always compressed, lossless.
TIFF is really a package format. It’s so flexible, that it’s damn near impossible to write a “full-fat” TIFF reader (I’ve done that. Never again).
TIFF is so flexible, that you can define an image to have a 6-bit R channel, and a 12-bit G channel, for instance. I think some medical or scientific images may have actually done that.
You can also have pretty much any type of compression that you want, for the image data.
But most people use TIFF to store uncompressed “raw” image data. These files can be crazy big, but also won’t have compression artifacts.
With progressive decoding, JPEG XL is also much a better fit for the web.
I just dont see how we continue to ignore JPEG XL and want to force AVIF adoption everywhere, when XL is technically superior, including encoding and decoding complexity. We literally have representatives from different companies and industries, most have been silent in the image / video codec format war begging for browser vendors to support JPEG XL.
But of course the cult and ideology somehow had people convinced the only accepted codec are AVIF, AV1 and Opus.
[1] https://twitter.com/jonsneyers/status/1563442356493230080
It's not really consistent, but at small sizes JPEG XL sometimes falls apart, especially if the image contains a lot of smooth textures and clean lines that are easily compressed by AV1. https://afontenot.github.io/image-formats-comparison/#air-fo...
I don't think you need any kind of conspiracy here, AV1 is an open codec after all. The problem is more that (a) AVIF has been around for longer, (b) browsers have to implement most of the spec anyway because they need to have AV1 support, and (c) the hardware decoding story for AVIF is probably going to be better for quite a while, given its closeness to video. AV1 is still a great codec, and Opus is best-in-class for general purpose audio.
Also, I agree with you that optimizing an image codec for high quality use cases is the ideal, but a lot of casual users prefer blurred images with missing detail to noticeable artifacts.
Note that there are samples where JPEG XL still has way too many artifacts at e.g. 1.3 bpp: https://afontenot.github.io/image-formats-comparison/#pont-d...
I do agree with you, though, that if a site is targeting 1.0 bpp or more, they're usually going to see better results with JPEG XL than AVIF.
> progressive decoding
If I'm not mistaken, it isn't enabled by default for JPEG XL and reduces the encoding efficiency by about 10%.
https://www.spiedigitallibrary.org/conference-proceedings-of...
Figure 1
This is excellent, and does indeed suggest that JPEG XL should be broadly preferred in the browser. Thanks for the reference.
Safari for iOS 16.0 supports it now for still images. Safari for 16.1 apparently adds support for animated image sequences.
AVIF support comes to macOS with macOS Ventura.
and while I'm here, if you export/backup your heic photo library from your Mac, the .mov files from "live" photos are separate files, and not part of the .heic (unless they are both)
They're doing an awful job of it then.
If you read the link above you already know that HEIC (HEVC in HEIF) isn't an Apple invention, but an ISO standard that Apple chose to adopt. With macOS Ventura, Photos will also support AVIF (AV1 in HEIF).
In addition to those HEIF-based formats, Apple Photos supports any image file/container and media formats you might expect should work, along with RAW formats from these camera: https://support.apple.com/en-us/HT212821 You can also export to JPEG, PNG, and TIFF.
There's a whole ecosystem of apps that can work with the Apple Photos catalog directly, an extension system for 3rd-party developers, blah blah blah.
Cloudinary compared tens of thousands of samples and found HEIF turns out to be the best at compressing images, even better than AVIF.
So I do think HEIF could have its uses outside of the web. And it would be interesting to see how VVC performs as an image format.
I do wish the world pays more attention to JPEG XL though. Which is technically better in almost every single way.
<input type="file" accept="image/jpeg" />
iOS supports HEIF, Safari does not.
Why Safari does not, still, 5 years later, I can't tell you.
The Apple employees who work on WebKit, Safari's open source browser engine, or even those who make Safari from WebKit are not the same Apple employees who work on iOS's file system or Photos.app or anything else found on an iPhone when you first take it out of the box.
Still, it is odd that iOS 16, including Safari, has added support for AVIF but HEIF still doesn't work in Safari.
Your argumentative tone would've made sense if my criticism was directed at the Safari team for not implementing HEIF support. But my criticism is towards Apple for failing to make a cohesive product.
Exactly. Safari had the motivation/resources to add AVIF support, but not HEIF. So it seems like Apple chose to back the wrong horse (HEIC) at first and is now pivoting to AVIF
When I'm uploading a picture straight from an iPhone, using built-in Safari, it's JPG not HEIF. It's got a different name though - RFC 4122 UUID with ".jpeg" extension, not IMG_XXXX.JPG
File uploaded to a tiny Python/Flask app, to make sure no processing is done behind the scenes, is seen by file(1) as: "9E83B1D4-8AF1-4468-9095-0EE3FEEDF5BE.jpeg: JPEG image data, Exif standard: [TIFF image data, big-endian, direntries=X, orientation=X, xresolution=X...]" and can be opened with Firefox as your usual JPEG. HTML form asks for enctype="multipart/form-data" and doesn't specify anything about image formatting nor does it care what file type is being uploaded.
If you want to AirDrop your existing HEIF photos, or want to AirDrop RAW (ProRAW) photos, or if you prefer to continue to capture in the higher-quality HEIF format, you can use this "AirDrop JPEGs" shortcut.
https://www.icloud.com/shortcuts/e455df464625443baca41366b9a...
https://msrc.microsoft.com/update-guide/vulnerability/CVE-20...
But I will say that there is a disturbing number of such vulnerabilities listed for this codec.
So ridiculous...
https://apps.microsoft.com/store/detail/hevc-video-extension...
In imagemagick, a HEIC image of quality "75" is approximately the same file size as an image of JPEG quality "95".
For the same quality "number", HEIC images are often larger than their JPEG equivalents, which can be confusing if you assume the number directly indicates a "quality" level, which it apparently doesn't.
It doesn't, because after 50+ years of research, there is still no consensus on image quality.
In JXL the quality setting has been tuned especially well to give predictable speed/visual quality output. See Jon Sneyers's posts on twitter showing how quality variance is kept minimal: https://twitter.com/jonsneyers/status/1542560897306185729
I'm actually using lossy DNG (8 bit JPEG with a tonemap under the hood) as my universal storage format for casual photos.
No. Live photos predate support for HEIF, it's just a photo and a video file next to one another (they're not even bundled on-device, that's just an abstraction of PHAsset).
Well I guess it could have changed with HEIF, but while I know the container supports derivations and sequences I'm not sure it supports such a wide disparity as "image and related video".
Edit: And now I'm learning things from other commenters who have been inspired to provide interesting tidbits they know about HEIF!