We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
crop: :centre
Describe the bug
Vips::Image.thumbnail("filename.gif[n=-1]", 200, height: 200, crop: :centre) with animated GIF file saves static file with 1 scene only.
Vips::Image.thumbnail("filename.gif[n=-1]", 200, height: 200, crop: :centre)
Without crop: :centre it saves animated file correctly
I used file https://i.pinimg.com/originals/96/50/f0/9650f01cd3334952b075f8cf55bedd60.gif for testing
To Reproduce Steps to reproduce the behavior: Run ruby script
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "ruby-vips" gem 'down' end GLib::logger.level = Logger::DEBUG tempfile = Down.download("https://i.pinimg.com/originals/96/50/f0/9650f01cd3334952b075f8cf55bedd60.gif") resized_image = Vips::Image.thumbnail("#{tempfile.path}[n=-1]", 400, height: 400, crop: :centre) resized_image.write_to_file "/tmp/rabbit-with-crop.gif" `browse /tmp/rabbit-with-crop.gif`
Expected behavior File must be animated with all scenes cropped
Additional context I have libvips 8.13rc1 compiled with cgif
The text was updated successfully, but these errors were encountered:
Hi @aglushkov,
vipsthumbnail has logic for shrinking animated images. but not for cropping them. There's an enhancement issue here libvips/libvips#2668
vipsthumbnail
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Vips::Image.thumbnail("filename.gif[n=-1]", 200, height: 200, crop: :centre)
with animated GIF file saves static file with 1 scene only.Without
crop: :centre
it saves animated file correctlyI used file https://i.pinimg.com/originals/96/50/f0/9650f01cd3334952b075f8cf55bedd60.gif for testing
To Reproduce
Steps to reproduce the behavior:
Run ruby script
Expected behavior
File must be animated with all scenes cropped
Additional context
I have libvips 8.13rc1 compiled with cgif
The text was updated successfully, but these errors were encountered: