Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEIF/HEIC support #1105

Closed
kadishmal opened this issue Jan 29, 2018 · 14 comments
Closed

HEIF/HEIC support #1105

kadishmal opened this issue Jan 29, 2018 · 14 comments

Comments

@kadishmal
Copy link

kadishmal commented Jan 29, 2018

I don't know if this is technically possible at this moment, it would be nice if sharp would one day support HEIF format which is now a default image format on latest iPhones.

References:

@lovell
Copy link
Owner

lovell commented Jan 29, 2018

Hello, please see https://github.com/jcupitt/libvips/issues/671

@chris-kobrzak
Copy link

chris-kobrzak commented Nov 7, 2018

Hi @lovell, I've just noticed GitHub issues are no longer accessible under libvips. Does this mean we won't get support for .heic files in a foreseeable future?

PS Thanks for your amazing work on Sharp!

@mceachen
Copy link
Contributor

mceachen commented Nov 8, 2018

@chris-kobrzak libvips moved to its own org (but it looks like he then forked it back to his account?), so there isn't a redirect. The issue is here: libvips/libvips#671

@Donluigimx
Copy link

@lovell They already made a new issue addressing only some issues with autorotate. Seems like libvips is now compatible with HEIC. libvips/libvips#1247

@lovell
Copy link
Owner

lovell commented Mar 8, 2019

The forthcoming libvips v8.8.0 will add support for libheif. There will probably be a few changes required in sharp to expose the ability to read and write this format.

More importantly, the precompiled binaries provided by sharp will not include libheif so you'll need to compile libvips from source and install it globally. (When the patent-free AVIF format is added to libheif then this might change.)

@kalpitad
Copy link

It seems like libvips v8.8.0 is out. We're wondering if you're planning support for HEIF in the near future?

By the way, we love and appreciate Sharp. Thank you!

@faradaytrs
Copy link

any progress on this?

lovell added a commit that referenced this issue Jul 4, 2019
Requires a custom, globally-installed libvips compiled with libheif
@lovell
Copy link
Owner

lovell commented Jul 4, 2019

Commit b737d46 adds (highly) experimental support for reading and writing HEIF images. It will require use with a custom, globally-installed libvips that has itself been compiled with support for libheif.

The prebuilt binaries provided by sharp will not include libheif (and will never include HEVC-related logic whilst it is patent-encumbered).

@lovell lovell added this to the v0.23.0 milestone Jul 4, 2019
@faradaytrs
Copy link

maybe it's worth to make a guide or at least provide some links

@lovell
Copy link
Owner

lovell commented Jul 29, 2019

sharp v0.23.0 is now available.

This will require use of sharp with a custom installation of libvips compiled with support for libheif etc.

The prebuilt binaries will not include any support for HEIC.

https://libvips.github.io/libvips/install.html#building-libvips-from-a-source-tarball

@lovell lovell closed this as completed Jul 29, 2019
@ajhool
Copy link
Contributor

ajhool commented Oct 29, 2019

@lovell Do you have a feel for how lack of heic support is affecting the web dev world? I find it really surprising / confusing / unsurprising that Apple has basically thrown a wrench into every website's image upload portal and there doesn't seem to be a great, robust solution. Have you noticed any common workarounds like simply notifying the user that they need to convert the heic image to a still before uploading?

I can't believe that Apple also is ignoring the allowed image type in the browser file inputs and forcing heic into input fields that were only supposed to include jpeg.

Are devs up in arms at apple over this?

Thanks for your work on this!

@lovell
Copy link
Owner

lovell commented Oct 29, 2019

@ajhool Apple are a founding member of AOM so are well-placed to switch from HEIC to the royalty-free AVIF and prevent their customers from experiencing the problems you describe.

@dminkovsky
Copy link

dminkovsky commented May 19, 2020

I installed libvips on macOS with brew install libvips. I then installed sharp with yarn add sharp. When I tried operating on an HEIC file, it failed with unsupported format. Then I removed node_modules/sharp/vendor, and tried again, and it worked. How can I make the install process find the globally installed libvips? It's found at runtime, but not at install.

Thank you!

EDIT: Posted to SO https://stackoverflow.com/questions/61903049/how-can-i-use-a-globally-installed-libvips-with-sharp-on-macos.

@lovell
Copy link
Owner

lovell commented May 20, 2020

@dminkovsky The output of npm install sharp logs all decisions made about global vs vendored libvips. Please open a new installation issue if you're still having problems detecting a globally-installed libvips.

Repository owner locked and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants