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

Default to using gifsave for libvips >= 8.12.0 #269

Merged
merged 2 commits into from
Mar 9, 2022

Conversation

vansante
Copy link
Contributor

@vansante vansante commented Feb 16, 2022

I use libvips without magick and I would like to start generating gif files, which is possible since libvips version 8.12.0. However govips still hardcodes the codepath to use magicksave for all gif exports. It results in the error VipsOperation: class "magicksave_buffer" not found (see #255 as well).

This PR does a version detection to check whether the libvips version >= 8.12.0 and if true, defaults to using the new gifsave function which is much faster.

This is technically backwards incompatible (you need a new dependency CGIF, the ubuntu package name is libcgif-dev) otherwise the GIF saving feature is broken. I tried doing a runtime feature detection check for cgif, but couldn't find a way to make it work. However, currently trying to save gifs without having magick also results in an error, so I'm not sure how much of a problem this is.

Let me know if I need to tweak this PR further :).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 76.317% when pulling 14f35e5 on vansante:cgif-save into 2bff6b1 on davidbyttow:master.

@davidbyttow
Copy link
Owner

Thank you!

@davidbyttow davidbyttow merged commit 9984c53 into davidbyttow:master Mar 9, 2022
@vansante vansante deleted the cgif-save branch March 25, 2022 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants