question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Metadata for AVIF, format returned as 'heif'

See original GitHub issue

Using Sharp 27, which now supports AVIF and is great. Thanks!

Downloading this image and then extracting metadata with sharp(inputavif).metadata()

http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/Chimera/AVIF/Chimera-AV1-10bit-1280x720-2380kbps-100.avif

The format returned is heif as that’s the encoder used by libvips.

Is it true that this metadata format will be returned for both avif and heic images?

If so, it’s not going to be possible to use the metadata to distinguish between the two, one of which is patent-encumbered and cannot be processed without globally installed libvips, as I understand it.

Would it be possible for the libvips metadata to return avif as the format, for consistency with mime type headers and Sharp output format strings?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lovellcommented, Dec 30, 2020

libvips v8.11.0 will contain logic to expose the heif-compression metadata - see https://github.com/libvips/libvips/pull/1850

0reactions
lovellcommented, Aug 18, 2021

The object returned/resolved by toBuffer() contains properties that are calculated or might change during processing. The compression property of avif() is known before processing and does not change during.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Output options - High performance Node.js image processing
Write output image data to a file. If an explicit output format is not selected, it will be inferred from the extension, with...
Read more >
Cloudflare Images introduces AVIF, Blur and Bundle with Stream
We announced support for the new AVIF image format in Image Resizing ... As we explained previously, AVIF is a combination of the...
Read more >
How to use the sharp.format function in sharp | Snyk
toFormat(sharp.format.jpeg) .resize(Math.min(height || 0, metadata.width ... headers if (mime === 'image/jpeg') { image.rotate(); } return mime; })(type);.
Read more >
HEIC Converter Plus - Abyssmedia
Robust tool lets you convert iPhone iPad iPod photos from HEIF/AVIF to JPG or PNG on Windows.
Read more >
Newest 'heif' Questions - Stack Overflow
High Efficiency Image File Format (HEIF) is a file format for individual ... I'm looking for a (fast) way to retrieve image metadata...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found