GithubHelp home page GithubHelp logo

Comments (8)

lovell avatar lovell commented on September 27, 2024 1

I suppose sharp is not correctly building from source and does not use the globally installed libraries. How can I verify/debug this?

All decisions are logged at install time. You might need to add the npm install --foreground-scripts flag to display them.

https://sharp.pixelplumbing.com/install#building-from-source

from sharp.

lovell avatar lovell commented on September 27, 2024

installed libvips on OSX

What is the output of running vips copy input.heic output.png at the command line for your sample input image?

from sharp.

divporter avatar divporter commented on September 27, 2024

I have the same problem but with jpeg (tried png also to match above issue).

Running vips on the command line works for both png and jpeg for me.

from sharp.

cryptofyre avatar cryptofyre commented on September 27, 2024

Experiencing the same as above, just on a Linux container environment.

vips copy works fine, but I get a seeking error like the OP.

from sharp.

lovell avatar lovell commented on September 27, 2024

Please remember that reading HEIC images requires sharp to be built from source against a globally-installed libvips + libheif + libde265 combo - see https://sharp.pixelplumbing.com/install#building-from-source

For those using a custom, globally-installed libheif, my best guess would be that this relates to its plugin system, which can be switched off at compile time using the -DENABLE_PLUGIN_LOADING flag (set it to one of 0, NO or OFF) as others have been directed to do at strukturag/libheif#1250

from sharp.

lukaspanni avatar lukaspanni commented on September 27, 2024

I have the same problem, using an ubuntu-based container that should contain all the required libraries.
This is the relevant snippet from my dockerfile:

RUN apt update && apt install -y libvips-dev libheif-dev
ENV SHARP_FORCE_GLOBAL_LIBVIPS=1

Using heif-convert from the heif-examples package works fine.
heif-convert --list-decoders output:

HEIC decoders:
- libde265 = libde265 HEVC decoder, version 1.0.15
AVIF decoders:
- aom = AOMedia Project AV1 Decoder v3.8.2
JPEG decoders:
JPEG 2000 decoders:
uncompressed: yes

I suppose sharp is not correctly building from source and does not use the globally installed libraries. How can I verify/debug this?

from sharp.

lukaspanni avatar lukaspanni commented on September 27, 2024

Thank you for the hint.
This revealed that the ubuntu packaged libvips has a version-mismatch with the latest version of sharp and is thus not building correctly.
Building the correct versions of the libraries should resolve the issue for me.

from sharp.

lovell avatar lovell commented on September 27, 2024

I hope this information helped. Please feel free to re-open with more details if further assistance is required.

from sharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.