mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-15 10:42:19 +03:00
removed extra params from _get_palette_bytes
This commit is contained in:
parent
b315b6ecf3
commit
321c6165c9
|
@ -472,7 +472,7 @@ def _get_local_header(fp, im, offset, flags):
|
||||||
include_color_table = im.encoderinfo.get('include_color_table')
|
include_color_table = im.encoderinfo.get('include_color_table')
|
||||||
if include_color_table:
|
if include_color_table:
|
||||||
palette = im.encoderinfo.get("palette", None)
|
palette = im.encoderinfo.get("palette", None)
|
||||||
palette_bytes = _get_palette_bytes(im, palette, im.encoderinfo)
|
palette_bytes = _get_palette_bytes(im)
|
||||||
color_table_size = _get_color_table_size(palette_bytes)
|
color_table_size = _get_color_table_size(palette_bytes)
|
||||||
if color_table_size:
|
if color_table_size:
|
||||||
flags = flags | 128 # local color table flag
|
flags = flags | 128 # local color table flag
|
||||||
|
@ -624,7 +624,7 @@ def _normalize_palette(im, palette, info):
|
||||||
im.palette.palette = source_palette
|
im.palette.palette = source_palette
|
||||||
return im
|
return im
|
||||||
|
|
||||||
def _get_palette_bytes(im, *args):
|
def _get_palette_bytes(im):
|
||||||
"""
|
"""
|
||||||
Gets the palette for inclusion in the gif header
|
Gets the palette for inclusion in the gif header
|
||||||
|
|
||||||
|
@ -651,7 +651,7 @@ def _get_global_header(im, palette, info):
|
||||||
if im.info.get("version") == b"89a":
|
if im.info.get("version") == b"89a":
|
||||||
version = b"89a"
|
version = b"89a"
|
||||||
|
|
||||||
palette_bytes = _get_palette_bytes(im, palette, info)
|
palette_bytes = _get_palette_bytes(im)
|
||||||
color_table_size = _get_color_table_size(palette_bytes)
|
color_table_size = _get_color_table_size(palette_bytes)
|
||||||
|
|
||||||
background = info["background"] if "background" in info else 0
|
background = info["background"] if "background" in info else 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user