| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/3951577/root/tmp/ |
Upload File : |
import numpy as np
from PIL import Image
orig = Image.open("/var/www/safemyident.de/web/img/header-safe-my-ident.png").convert("RGBA")
iso = Image.open("/tmp/smi-shot/person-isnet-general-use.png").convert("RGBA")
W,H = orig.size
oa = np.array(orig); ia = np.array(iso)[:,:,3].astype(np.float32)
def band(start,full):
y=np.arange(H).reshape(-1,1).astype(np.float32)
return np.repeat(np.clip((y-start*H)/((full-start)*H),0,1)*255.0, W, axis=1)
for start,full,tag in [(0.62,0.645,"62"),(0.66,0.685,"66"),(0.70,0.725,"70")]:
comb=np.maximum(ia,band(start,full)).astype(np.uint8)
out=oa.copy(); out[:,:,3]=comb
Image.fromarray(out,"RGBA").save(f"/tmp/smi-shot/desk3-{tag}.png")
print("ok",tag)