| 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 : /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)
y=np.arange(H).reshape(-1,1).astype(np.float32)
band=np.clip((y-0.72*H)/((0.755-0.72)*H),0,1)*255.0
band=np.repeat(band,W,axis=1)
comb=np.maximum(ia,band).astype(np.uint8)
out=oa.copy(); out[:,:,3]=comb
Image.fromarray(out,"RGBA").save("/tmp/smi-shot/person-final.png")
print("ok")