From 006e37c8a062538495bd32c92a50b68769e24428 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 12 Oct 2023 15:57:31 +0200 Subject: [PATCH] Fix opacity stuff --- igel.py | 2 +- pixelflut.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/igel.py b/igel.py index 810c694..38594cf 100755 --- a/igel.py +++ b/igel.py @@ -6,6 +6,6 @@ import numpy as np def igel(): igel = ["aussagend", "fickend", "friedlich-neu", "liebend", "niedlich", "panisch-neu", "peinlich", "schlafend", "unzufrieden", "wissend"] name = np.random.choice(igel) - return f'/opt/docker/nextcloud-dockerized/html/data/maya/files/Bilder/===\ Freizeit\ ===/Kunst/Zeichnungen/Igel/{name}.png' + return f'/opt/docker/nextcloud-dockerized/html/data/maya/files/Bilder/=== Freizeit ===/Kunst/Zeichnungen/Igel/{name}.png' return im diff --git a/pixelflut.py b/pixelflut.py index f1edb64..6c2fc96 100755 --- a/pixelflut.py +++ b/pixelflut.py @@ -61,6 +61,7 @@ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: for w in widthlist: if rnd: np.random.shuffle(heightlist) for h in heightlist: + if pixels[h-starth][w-startw][3] == 0: continue color = '#%02x%02x%02x' % pixels[h-starth][w-startw][0:3] to_send = "px {} {} {}\n".format(w,h,color) sock.sendall(bytes(to_send, "utf-8"))