-
-
Notifications
You must be signed in to change notification settings - Fork 699
add support to thumbnail for cropping animated images #2668
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
Comments
Hi @vansante, vipsthumbnail doesn't attempt to crop animated images, but I agree it's an obvious thing to add. Let's tag this as an enhancement. |
hi, jcupitt. @jcupitt Forgive my stupid question, I tried use C to resize GIF, but it doesn’t work, i only get the first frame (not an animation image), Codeint main(int argc, char **argv)
{
VipsImage *in = vips_image_new_from_file("input.gif", NULL);
VipsImage *out;
// if (vips_thumbnail_image(in, &out, 100, "height", 100, "size", VIPS_SIZE_FORCE, NULL))
if (vips_resize(in, &out, 0.5, NULL))
{
return 1;
}
vips_image_write_to_file(out, "output.gif", NULL);
return 0;
} EnvironmentVips version: vips -l | grep gif
|
Hello @Hpsyche, Please open a new discussion for a new question. This issue is just for adding a crop feature to animation thumbnailing. (don't use |
+1 for this enhancement. |
Fix issue from libvips ref: libvips/libvips#2668
Is there any progress on this? Quite an important features without which I am unable to switch to Vips from Magick |
No one has volunteered to do the work, so there's been no progress. PRs very welcome if anyone is able. |
Questions, enhancements, tips, etc.
Please use libvips discussions for other topics.
https://github.com/libvips/libvips/discussions
Bug report
Describe the bug
Using
vips_thumbnail_image
on a GIF with multiple frames andcrop
set toVIPS_INTERESTING_CENTRE
results in a single frame image, while usingVIPS_INTERESTING_NONE
results in an image with the right amount of frames.To Reproduce
Steps to reproduce the behavior:
vips_thumbnail_image
with width set to40
and height set to30
and crop set toVIPS_INTERESTING_CENTRE
andVIPS_INTERESTING_NONE
.gifsave
exporterExpected behavior
I expect the resulting images to contain all 9 frames.
Actual behavior
The image which had crop set to
VIPS_INTERESTING_CENTRE
contains just 1 frame.Screenshots
The resulting images:
VIPS_INTERESTING_CENTRE
VIPS_INTERESTING_NONE
Environment
(please complete the following information)
Additional context
The text was updated successfully, but these errors were encountered: