You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Pillow 9.0 / #5857, once you seek past the first GIF frame, the mode will change to RGB or RGBA, yes. This is because P mode can only handle up to 256 colors, and once you go past the first frame, there may be more colors than that.
The fact that avatar is a GifImageFile instance reflects the fact that you opened a GIF. I highly doubt that you actually need avatar to be a PngImageFile or JpegImageFile instance to accomplish your goal. If you think otherwise, please provide some more comments and we can discuss this further.
If you would like to create a PNG or JPG from your GIF, you can just run avatar.save("out.jpg") or avatar.save("out.png").
What did you do?
I try to extract frame from a gif
What did you expect to happen?
I expect to get png or jpg image.
What actually happened?
I got the same gif but in other mode.
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: