-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
The gif operation requires libvips to have been installed with support for ImageMagick #2437
Comments
Please see https://sharp.pixelplumbing.com/install#custom-libvips and #2012 |
Thanks for the quick reply. |
You'll need to globally install libvips compiled with support for ImageMagick before using https://libvips.github.io/libvips/install.html#building-libvips-from-a-source-tarball |
I deleted node_modules and ran: |
And who does he use Windows for? The guide specifies "The use of a globally-installed libvips is unsupported on Windows." What can I do as an alternative? I gloabally-installed libvips, added to the PATH but is not recognized by Sharp |
@DragoSpiro98 If your constraints include Windows and requirements include GIF output then sharp is probably the wrong solution. |
@msiric Were you able to make any progress with this by following the instructions at https://libvips.github.io/libvips/install.html#building-libvips-from-a-source-tarball ? |
@lovell I haven't made any progress on a Win machine, but judging by your reply above, I assume it isn't possible to install libvips globally with ImageMagick support? |
I've also trying to install sharp to configure a GIF file however I couldn't make it work. OS: Ubuntu 18.04.5 LTS I followed instructions to install
And this is the npm installation
However when I try to make an operation on a GIF file I'm getting this error message
Do you have any advice? On which step I'm making mistake |
I've found an easy solution for this and that is to grab the libvips build for your platform |
I recommend just using FFmpeg. its faster than imagemagick by almost several folds and uses far less ram. it shouldn't be this difficult to convert some gifs on lambda! but it is and after weeks of trying I've given up and surprised how well FFmpeg works. I guess when you deal with hours and hours of hd video compression, image ain't nothin |
leaving this here... on macOS Big Sur 11.4 I ran into some issues, but resolved it. # install global vips, which already includes the --with-magick flag
brew install vips
# next I had issues with OpenEXR and Imath not being in the default pkgconfig paths, so I added some links from the Homebrew Cellar:
# NOTE: it was 3.0.5 at the time, this will change depending on your version installed with vips
sudo ln -s /usr/local/Cellar/openexr/3.0.5/lib/pkgconfig/OpenEXR.pc /usr/local/lib/pkgconfig/OpenEXR.pc;
sudo ln -s /usr/local/Cellar/Imath/3.0.5/lib/pkgconfig/Imath.pc /usr/local/lib/pkgconfig/Imath.pc;
# not sure if required, but I also ensured this was installed globally, it was were sharp was failing.
npm install -g node-gyp;
# the last issue I encountered was with XCode CLI tools,
# i have s newer version installed, but the path points to the older one,
# i opted to just update the path with this command:
# (other options here: https://github.com/schnerd/d3-scale-cluster/issues/7)
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer;
# last step, your sharp install should be good now, it should pickup your global vips without issue.
yarn add sharp;
# npm install sharp;
|
I fixed this issue by uninstalling brew uninstall vips |
If, like me, you’re arriving here after 2022-02-01, then you should know that starting with v0.30.0 sharp supports GIF with the prebuilt binaries, so you don’t need to bring your own ImageMagick or anything like that. |
I am trying to resize a gif file, but keep getting this error:
The gif operation requires libvips to have been installed with support for ImageMagick
I am aware that I need to install libvips with *magick, but I'm not sure how to do that.
Is it possible to list this as a dependency so I don't have to install it separately on every single machine that I use?
The text was updated successfully, but these errors were encountered: