mirror of
https://github.com/esphome/esphome.git
synced 2024-11-12 18:27:46 +01:00
Formating
This commit is contained in:
parent
9f9a937b37
commit
f8426feb61
1 changed files with 2 additions and 0 deletions
|
@ -260,6 +260,7 @@ def load_svg_image(file: bytes, resize: tuple[int, int]):
|
|||
|
||||
return Image.open(io.BytesIO(svg_image))
|
||||
|
||||
|
||||
def invert_image_colors(image):
|
||||
from PIL import Image
|
||||
|
||||
|
@ -271,6 +272,7 @@ def invert_image_colors(image):
|
|||
r, g, b = map(invert, (r, g, b))
|
||||
return Image.merge(image.mode, (r, g, b, a))
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
# Local import only to allow "validate_pillow_installed" to run *before* importing it
|
||||
from PIL import Image
|
||||
|
|
Loading…
Reference in a new issue