mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
rename invert to reverse
This commit is contained in:
parent
7ef110f9c7
commit
9f9a937b37
1 changed files with 4 additions and 4 deletions
|
@ -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())
|
||||||
|
|
Loading…
Reference in a new issue