From 676c87e116a2b94eae7d368374334447e5abe0be Mon Sep 17 00:00:00 2001 From: Jerry Date: Fri, 10 Mar 2023 16:22:10 +0800 Subject: [PATCH] remove comment --- a.py | 33 --------------------------------- dvd.png | Bin 0 -> 1159 bytes 2 files changed, 33 deletions(-) create mode 100644 dvd.png diff --git a/a.py b/a.py index adc13e9..bd73839 100644 --- a/a.py +++ b/a.py @@ -69,10 +69,6 @@ Y=512 import socket, traceback, time from PIL import Image -#img = Image.open(args.image) -#img = img.resize((X, Y), Image.Resampling.LANCZOS) -#img.save('out.png') -#img = img.convert('RGBA') imgdvd = Image.open('dvd.png') imgdvd = imgdvd.convert('RGBA') @@ -144,29 +140,6 @@ sy = random.randint(0, Y-1-Dy) fx = random.choice((1, -1)) fy = random.choice((1, -1)) -#import numpy as np -#draw_seq = np.arange(X*Y) -#np.random.shuffle(draw_seq) - -#def _spr(rangex): -# maxidx = len(rangex) - 1 -# ret = [] -# mid = maxidx // 2 -# dl = mid -# dr = mid -# ret.append(mid) -# while True: -# if dr < maxidx: -# dr += 1 -# ret.append(dr) -# if dl > 0: -# dl -= 1 -# ret.append(dl) -# if dl <= 0 and dr >= maxidx: -# assert len(ret) - 1 == maxidx -# return ret -#draw_seq = [(i // X, i % X) for i in range(X*Y)] -#draw_seq = [(x, y) for x in _spr(range(X)) for y in _spr(range(Y))] draw_seq = [(x, y) for x in range(X) for y in range(Y)] #random.shuffle(draw_seq) start_bg_task() @@ -176,17 +149,11 @@ def draw(img): send_icmp_q = [] start = time.time() print('draw 1 frame in ', end='') - #for x in range(X): for x, y in draw_seq: - #for y in range(Y): - #if x < skip: - # continue newpix = img.getpixel((x, y)) r, g, b, a = newpix if a and newpix != ldraw.getpixel((x, y)): send_icmp_q.append(f"fdcf:8538:9ad5:3333:{x:x}:{y:x}:11{r:02x}:{g:02x}{b:02x}") - #print(f"fdcf:8538:9ad5:3333:{x:x}:{y:x}:11{r:02x}:{g:02x}{b:02x}") - #time.sleep(slp) startsend = time.time() send_icmp(send_icmp_q) ldraw = img.copy() diff --git a/dvd.png b/dvd.png new file mode 100644 index 0000000000000000000000000000000000000000..2f7479d9ee64b37d47081739ffcd135521e546e2 GIT binary patch literal 1159 zcmV;21bF+2P)EX>4Tx04R}tkv&MmKpe$iQ>7{uK|6>zWT-CMMMWHI6^c+H)C#RSm|XfHG-*gu zTpR`0f`cE6RR6zEMr!ZQt%yL_XzOyF2=L`&;2=i)x5=kfJhu?hG`S86Hjm2 z2Iqa^2rJ1d@j3ChNf#u3;V+0880*#vEd>=bb;{*sk16O*>U#SB#pQP7X zTJ#9$+XgPKTbi;5T^K6w9`H98cwd6AFTlpgNi5)aJ`mUY5bza90QJBgV71eK1T>lBs{uY~J_Tq4 z7Hj?!*a37K`#xYIFk73IOyZ20@NGcydYEf8pjn2wgCHpQ|{x#z!?(&Kxd$GJAlbXr_0C&fUUr8o#abrd#ezh zHx~&Toxp~G{UN8925Ltr)Iy^N*z4=Zc8UhzRe^4kQEpxX?&*V`E(oX*2Cf6%8u=mz zOA-AL5cI(hlZ1RsGl6E+ zf$~ZL)ZL;k*Q=J=qi3(utLQ+hfVINFCSbuhZc$^UkHAwklRFxNA;oRL=MpXsr?t3x zpjsmZECqI{I7_+Q^Z?63Ri6f4cwrHg0_xO_;yUuAcy$g#i={m97G}KY?m