Skip to content

Conversation

@radarhere
Copy link
Member

Updates GifImagePlugin so that

def _get_palette_bytes(im):
"""
Gets the palette for inclusion in the gif header
:param im: Image object
:returns: Bytes, len<=768 suitable for inclusion in gif header
"""
return im.palette.palette

returns an empty bytestring if there is no palette.

The test case I've added otherwise fails with AttributeError: 'NoneType' object has no attribute 'palette' in the above function.

@radarhere radarhere added the GIF label May 23, 2023
@radarhere radarhere changed the title Fixed saving multiple 1 mode images to GIF Fixed saving multiple 1 mode frames to GIF May 24, 2023
@hugovk hugovk merged commit df873e3 into python-pillow:main Jun 6, 2023
@radarhere radarhere deleted the gif branch June 6, 2023 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants