Closed loremru closed 1 year ago
I already install libheif on macos, but I have an error.
If you're using macOS and Homebrew, you can try brew install vips
, which will install libvips, libheif and x265. You can then (re)install sharp and the globally-installed libvips should then be detected and used.
I already install libheif on macos, but I have an error.
If you're using macOS and Homebrew, you can try
brew install vips
, which will install libvips, libheif and x265. You can then (re)install sharp and the globally-installed libvips should then be detected and used.
That actually doesn't work
Did you get this to work? I have just installed another library for HEIC conversion, because I didn't find anything about HEIC support in sharp.
Incidentally I found out that libvips has support for HEIC. Does this mean that Sharp also has HEIC support, but undocumented?
@msageryd I installed another library too. But I think problem was in yarn cache. Try to clean package cache. Sharp has heic support, but libvis connection has no docs
https://sharp.pixelplumbing.com/api-output#heif
Support for patent-encumbered HEIC images using hevc compression requires the use of a globally-installed libvips compiled with support for libheif, libde265 and x265.
Thanks. I simply missed that because the menu said "heif".
I'll try to install libvips in my Alpine Docker container.
edit: Oh, that was a mouthful. Not an of-the-shelf solution for handling heic files. I need to set aside some time for this some day, but it seems way too complicated (to me) to solve now.
I noticed that PDFium and Poppler also are optional dependencies. Does this mean that I could use Sharp for rendering PDF pages to PNG? I'm currently using pdf2cairo from poppler-utils for this.
@msageryd If a globally-installed libvips is compiled to use pdfium or poppler, and sharp is compiled to use that libvips, then yes, you can render PDF documents as PNG. Watch out for licensing concerns around these e.g. poppler is AGPL.
Question about an existing feature
What are you trying to achieve?
Convert from .heic to .webp
When you searched for similar issues, what did you find that might be related?
I already install libheif on macos, but I have an error. And I haven't any idea how to do it with docker
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this question
sharp(buffer).webp()
Please provide sample image(s) that help explain this question
a random .heic image