7 ms·
While it's great at compressing the image, it's PITA to work with until browsers support it. What's strange to me is that it's the format Apple uses by default
by ftufek 4y ago
While it's great at compressing the image, it's PITA to work with until browsers support it. What's strange to me is that it's the format Apple uses by default on iOS, but even their own browser doesn't support it (!?). So when a user uploads a picture from an iPhone, you either have to load up an extra JS library (~1MB size last I included one in a web app) to process it or upload it to a remote server for processing.
- shmerl 4y agoAVIF I think is already well on the way. HEIC is DOA.
- jeroenhd 4y agoAVIF is supported on pretty much every modern browser now. Even Safari is adding support for it with the upcoming Safari release. At this point AVIF vs JPEG XL is a more interesting discussion than anything vs HEIC.
- berkut 4y agoIs it enabled by default in Firefox yet? I've just tried: https://libre-software.net/image/avif-test/ 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/ https://avif.io/ seems to work and display converted .jpg files, so maybe the first URL is old and doesn't work.
- shmerl 4y agoFirefox supports AVIF out of the box for a while already.
- josephg 4y agoOnly still images apparently. Not supported in Safari yet (though its coming) and Edge has no support: https://caniuse.com/avif https://caniuse.com/avif HEIF doesn't work in any web browser: https://caniuse.com/heif https://caniuse.com/heif
- shmerl 4y agoWhat's the point of animated AVIF vs for example AV1 video file?
- extra88 4y agoMy guess is as a drop-in replacement for GIF; use the <img> element instead of the more complicated <video> element, an inherent lack of audio, no need to specify looping or lack of video controls, etc. 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.
- jeroenhd 4y agoThe first URL doesn't even show the fallback JPEG for me on Firefox for Android so there's probably something else interfering with the use of that website. 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.
- Zardoz84 4y agoThe avif image URLs of these page are broken. at least, give me a nice 404 page
- pmarreck 4y agoI vote for JPEG XL. The fact that you can completely eliminate things like imagemagick or 3rd party scaling workflows (simply retain the max-size original and truncate the stream proportional to the pixel area requested!) is huge IMHO.
- bscphil 4y agoAccurate. My experience (as someone who has encoded a lot of both AVIF and JPEG XL images) is that JPEG XL tends to have superior detail preservation at medium to high bitrates, as well as preserving grain significantly better at all bitrates. It's also slightly less prone to banding than AVIF, but more prone to noticeable artifacting on sharp edges, which only goes away at higher bitrates. 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/#eaglefairy&avif=l&jxl=l https://afontenot.github.io/image-formats-comparison/#eaglef...
- ryukoposting 4y agoAs a hobby photographer, this is a deeply interesting topic. I keep all my scans (yes, film still exists) as TIF files, but my clients don't know what to do with a TIF (and even fewer know how to tell a printer that the image uses a particular colorspace) so I usually send them the TIFs, plus some high-quality JPEGs. Why not HEIC/AVIF/etc? Because people know what a JPEG is.
- shmerl 4y agoWhy TIF vs for example PNG? Are there any benefits?
- CharlesW 4y ago> Even Safari is adding support for it with the upcoming Safari release. 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. https://twitter.com/jensimmons/status/1547693585922789381 https://twitter.com/jensimmons/status/1547693585922789381
- yRetsyM 4y agoWhat is the patent situation for JPEG XL vs AVIF?
- shmerl 4y agoBoth officially are free, but AVIF possibly has stronger defensive backing given it's defended from patent aggressors by AOM.
- fsckboy 4y agopretty sure Apple wants their Photo app to be one of the walled gardens, they're not looking to make it browseable in their browser. 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)
- CharlesW 4y ago> pretty sure Apple wants their Photo app to be one of the walled gardens… 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 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.
- jtbayly 4y agoActually, that’s built in via iCloud. I view my photo library in the browser.
- ksec 4y ago>While it's great at compressing the image, 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.
- systoll 4y agoIf the webpage declares that it wants JPEGs or PNGs, but not HEICs, Safari will transparently convert the file before the webpage sees it. <input type="file" accept="image/jpeg" />
- mort96 4y agoBut why would iOS default to an image format it doesn't support??
- masklinn 4y ago> HEIF and HEVC offer better compression than JPEG and H.264, so they use less storage space on your devices and iCloud Photos, while preserving the same visual quality. iOS supports HEIF, Safari does not. Why Safari does not, still, 5 years later, I can't tell you.
- mort96 4y agoSafari is part of iOS though. If it was a third-party browser engine, this would've made sense; the browser lets the user upload files from their image photo library, but can't render some files in the library. But we're talking about the system browser engine, which is made by the same people who make iOS and is shipped as a core part of iOS. You'd think they'd at least think to make sure iOS's browser supports iOS's image format, or auto-convert to jpeg or something.
- extra88 4y ago> we're talking about the system browser engine, which is made by the same people who make iOS and is shipped as a core part of iOS 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.
- hericium 4y ago> So when a user uploads a picture from an iPhone, you either have to load up an extra JS library 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.