mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-30 18:03:07 +03:00
Removed unneeded converts
This commit is contained in:
parent
2f16077586
commit
f594d20623
|
@ -163,7 +163,6 @@ def _write_image(fp: IO[bytes], im: Image.Image, pixel_format: VtfPF) -> None:
|
|||
encoder_args: tuple[int,] | tuple[str, int, int]
|
||||
if pixel_format == VtfPF.DXT1:
|
||||
encoder_args = (1,)
|
||||
im = im.convert("RGBA")
|
||||
elif pixel_format == VtfPF.DXT3:
|
||||
encoder_args = (3,)
|
||||
elif pixel_format == VtfPF.DXT5:
|
||||
|
@ -178,10 +177,8 @@ def _write_image(fp: IO[bytes], im: Image.Image, pixel_format: VtfPF) -> None:
|
|||
encoder_args = ("A", 0, 0)
|
||||
elif pixel_format == VtfPF.I8:
|
||||
encoder_args = ("L", 0, 0)
|
||||
im = im.convert("L")
|
||||
elif pixel_format == VtfPF.IA88:
|
||||
encoder_args = ("LA", 0, 0)
|
||||
im = im.convert("LA")
|
||||
elif pixel_format == VtfPF.UV88:
|
||||
encoder_args = ("RG", 0, 0)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user