rename invert to reverse

This commit is contained in:
Ahmed 2024-09-02 16:37:38 +00:00 committed by GitHub
parent 7ef110f9c7
commit 9f9a937b37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -313,7 +313,7 @@ async def to_code(config):
) )
transparent = config[CONF_USE_TRANSPARENCY] transparent = config[CONF_USE_TRANSPARENCY]
invert_colors = config.get(CONF_REVERSE_COLORS) reverse_colors = config.get(CONF_REVERSE_COLORS)
dither = ( dither = (
Image.Dither.NONE Image.Dither.NONE
@ -337,7 +337,7 @@ async def to_code(config):
elif config[CONF_TYPE] == "RGBA": elif config[CONF_TYPE] == "RGBA":
image = image.convert("RGBA") image = image.convert("RGBA")
if invert_colors: if reverse_colors:
image = invert_image_colors(image) image = invert_image_colors(image)
pixels = list(image.getdata()) pixels = list(image.getdata())
@ -355,7 +355,7 @@ async def to_code(config):
elif config[CONF_TYPE] == "RGB24": elif config[CONF_TYPE] == "RGB24":
image = image.convert("RGBA") image = image.convert("RGBA")
if invert_colors: if reverse_colors:
image = invert_image_colors(image) image = invert_image_colors(image)
pixels = list(image.getdata()) pixels = list(image.getdata())
@ -379,7 +379,7 @@ async def to_code(config):
elif config[CONF_TYPE] in ["RGB565"]: elif config[CONF_TYPE] in ["RGB565"]:
image = image.convert("RGBA") image = image.convert("RGBA")
if invert_colors: if reverse_colors:
image = invert_image_colors(image) image = invert_image_colors(image)
pixels = list(image.getdata()) pixels = list(image.getdata())