Crop for animated images
Mefgalm opened this issue · comments
Hello! Thanks for this great library!
I have .gif
and .webp
files, on which I try to apply Image.thumbnail(image, dims, crop: center)
which leads to the animation disappearing. When opening images I pass pages: -1
. Resizing animated images works correctly.
Perhaps libvips
itself does not currently support this option: libvips/libvips#2668
I believe you are correct in that libvips
doesn't support thumbnailing/cropping animated images.
I think I might be able to do this for webp
simple animated images (ones that don't have the ANIM
chunk and just have simple loop
and delay
headers) by splitting the image, cropping each frame and reassembling.
I'll do some experiments today on this. If webp
works well enough I'll take a look at gif
.