| 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/self/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)
b=np.clip((y-start*H)/((full-start)*H),0,1)*255.0
return np.repeat(b,W,axis=1)
# höher + kürzere Feather-Zone (=klarere waagerechte Kante)
for start,full,tag in [(0.56,0.585,"56"),(0.60,0.625,"60"),(0.64,0.665,"64")]:
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/desk2-{tag}.png")
print("ok",tag)