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
I tried to save a gif file with a completely transparent frame.
You can see that the last empty frame does not appear. Instead, the duration of the previous frame is delayed.
Note that I came up with a simple code rather than my original code to keep this simple.
from PIL import Image, ImageDraw image1 = Image.new("RGBA", (100, 100), "#00000000") image2 = Image.new("RGBA", (100, 100), "#00000000") image3 = Image.new("RGBA", (100, 100), "#00000000") draw = ImageDraw.Draw(image2) draw.rectangle((25, 25, 75, 75), fill = "#FF0000FF") image1.save("example.gif", format="GIF", save_all=True, disposal=2, loop=0, duration=1000, append_images=[image2, image3])
This also happens when a completely black (#000000) image is appended, regardless of the transparency.
from PIL import Image, ImageDraw image1 = Image.new("RGBA", (100, 100), "#00000000") image2 = Image.new("RGBA", (100, 100), "#00000000") image3 = Image.new("RGBA", (100, 100), "#00000000") draw = ImageDraw.Draw(image2) draw.rectangle((25, 25, 75, 75), fill = "#FF0000FF") draw = ImageDraw.Draw(image3) draw.rectangle((25, 25, 75, 75), fill = "#000000FF") image1.save("example.gif", format="GIF", save_all=True, disposal=2, loop=0, duration=1000, append_images=[image2, image3])
*edit I checked that "white" (#FFFFFF00) transparent images are normally appended to the image.
Example code:
from PIL import Image, ImageDraw image1 = Image.new("RGBA", (100, 100), "#FFFFFF00") image2 = Image.new("RGBA", (100, 100), "#FFFFFF00") image3 = Image.new("RGBA", (100, 100), "#FFFFFF00") draw = ImageDraw.Draw(image2) draw.rectangle((25, 25, 75, 75), fill = "#FF0000FF") image1.save("example.gif", format="GIF", save_all=True, disposal=2, loop=0, duration=1000, append_images=[image2, image3])
This will produce the wanted result. But anyways, I think this still is an issue.
The text was updated successfully, but these errors were encountered:
I've created PR #6787 to resolve this.
Sorry, something went wrong.
7a19251
Successfully merging a pull request may close this issue.
What did you do?
I tried to save a gif file with a completely transparent frame.
What did you expect to happen?
What actually happened?
You can see that the last empty frame does not appear. Instead, the duration of the previous frame is delayed.
What are your OS, Python and Pillow versions?
Note that I came up with a simple code rather than my original code to keep this simple.
This also happens when a completely black (#000000) image is appended, regardless of the transparency.
*edit
I checked that "white" (#FFFFFF00) transparent images are normally appended to the image.
Example code:
This will produce the wanted result. But anyways, I think this still is an issue.
The text was updated successfully, but these errors were encountered: