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
Image distortion in GIFs when I use crop #5661
Comments
The gif after deal is bigger than 10M,so I can’t upload it |
img = pil_img.open(img_path)
width, height = img.size
box = (0, 0, width - 10, height - 10)
frames = [img.crop(box) for frame in range(0, img.n_frames) if not img.seek(frame)]
frames[0].save(new_path, save_all=True, append_images=frames[:60], loop=0, duration=img.info['duration']) I saved less frames to limit gif size,my results of crop is serious distortion |
What version of Pillow are you using? If I go back to Pillow 8.1.2, then I get your version. So I expect if you upgrade to a more recent version of Pillow, your output will be improved to match mine. |
To confirm that you are using the upgraded Pillow, does |
Pillow 9.0.0 has significantly improved reading animated GIFs thanks to #5857. If this issue is still a problem when using Pillow 9.0.0, please let us know. |
The text was updated successfully, but these errors were encountered: