In this second picture plz add my channel name pharmascriptix with logo which I have mentioned in 1 pic
~/
No generations found in stream.
We encountered an error while processing your request. Please try again or reach out to us for help.
Useless
~/attachments/e601f43e-d683-4148-b7a4-3e234e58b4e0
mkdir -p "/tmp/workspace/pharmascriptix-edit/output" && python - <<'PY' from PIL import Image, ImageChops, ImageDraw, ImageFont, ImageFilter from pathlib import Path src_logo=Path('/tmp/workspace/attachments/e601f43e-d683-4148-b7a4-3e234e58b4e0/IMG_20260313_001948.png') src_img=Path('/tmp/workspace/attachments/e601f43e-d683-4148-b7a4-3e234e58b4e0/IMG-20260905-WA0002.jpg') out=Path('/tmp/workspace/pharmascriptix-edit/output/Teachers_Day_PharmaScriptix.jpg') logo=Image.open(src_logo).convert('RGBA') # Remove white matte from first image and crop meaningful content px=logo.load(); w,h=logo.size for y in range(h): for x in range(w): r,g,b,a=px[x,y] # whiteness-driven transparency, preserve colored logo m=min(r,g,b) if m>232: alpha=max(0, int((255-m)*10)) px[x,y]=(r,g,b,alpha) elif m>205: alpha=int(255*(232-m)/27) px[x,y]=(r,g,b,alpha) # Crop alpha content bbox=logo.getchannel('A').getbbox() logo=logo.crop(bbox) base=Image.open(src_img).convert('RGBA') W,H=base.size # Place a restrained branded badge centered near bottom on the open desk area above frame lower edge badge_w=int(W*0.33); badge_h=int(H*0.075) x=W-badge_w-int(W*0.035); y=H-badge_h-int(H*0.022) # soft shadow layer=Image.new('RGBA',base.size,(0,0,0,0)); d=ImageDraw.Draw(layer) d.rounded_rectangle((x+3,y+4,x+badge_w+3,y+badge_h+4), radius=18, fill=(35,25,20,70)) layer=layer.filter(ImageFilter.GaussianBlur(5)); base=Image.alpha_composite(base,layer) # cream panel panel=Image.new('RGBA',base.size,(0,0,0,0)); d=ImageDraw.Draw(panel) d.rounded_rectangle((x,y,x+badge_w,y+badge_h),radius=18,fill=(255,250,240,225),outline=(104,161,35,210),width=2) base=Image.alpha_composite(base,panel) # scaled logo on left of panel max_lh=int(badge_h*.70); scale=max_lh/logo.height lw,lh=max(1,int(logo.width*scale)),max_lh logo=logo.resize((lw,lh),Image.Resampling.LANCZOS) base.alpha_composite(logo,(x+int(badge_w*.045),y+(badge_h-lh)//2)) # channel label text font_path='/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf' font=ImageFont.truetype(font_path, size=max(16,int(badge_h*.28))) small=ImageFont.truetype('/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf', size=max(10,int(badge_h*.16))) d=ImageDraw.Draw(base) tx=x+lw+int(badge_w*.075) d.text((tx,y+int(badge_h*.18)),'PharmaScriptix',font=font,fill=(8,73,139,255),stroke_width=0) d.text((tx,y+int(badge_h*.57)),'Your pharmacy learning channel',font=small,fill=(91,136,30,255)) # save RGB jpeg base.convert('RGB').save(out,quality=96,subsampling=0) print(out, Image.open(out).size) PY
python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter from pathlib import Path src_logo=Path('/tmp/workspace/attachments/e601f43e-d683-4148-b7a4-3e234e58b4e0/IMG_20260313_001948.png') src_img=Path('/tmp/workspace/attachments/e601f43e-d683-4148-b7a4-3e234e58b4e0/IMG-20260905-WA0002.jpg') out=Path('/tmp/workspace/pharmascriptix-edit/output/Teachers_Day_PharmaScriptix.jpg') logo=Image.open(src_logo).convert('RGBA') p=logo.load(); w,h=logo.size for yy in range(h): for xx in range(w): r,g,b,a=p[xx,yy]; m=min(r,g,b) if m>232: p[xx,yy]=(r,g,b,max(0,int((255-m)*10))) elif m>205: p[xx,yy]=(r,g,b,int(255*(232-m)/27)) bbox=logo.getchannel('A').getbbox(); logo=logo.crop(bbox) base=Image.open(src_img).convert('RGBA'); W,H=base.size badge_w=int(W*.35); badge_h=int(H*.075); x=W-badge_w-int(W*.035); y=H-badge_h-int(H*.022) shadow=Image.new('RGBA',base.size,(0,0,0,0)); d=ImageDraw.Draw(shadow); d.rounded_rectangle((x+3,y+4,x+badge_w+3,y+badge_h+4),radius=18,fill=(35,25,20,80)); base=Image.alpha_composite(base,shadow.filter(ImageFilter.GaussianBlur(5))) panel=Image.new('RGBA',base.size,(0,0,0,0)); d=ImageDraw.Draw(panel); d.rounded_rectangle((x,y,x+badge_w,y+badge_h),radius=18,fill=(255,250,240,230),outline=(104,161,35,220),width=2); base=Image.alpha_composite(base,panel) max_lh=int(badge_h*.68); scale=max_lh/logo.height; lw,lh=int(logo.width*scale),max_lh; logo=logo.resize((lw,lh),Image.Resampling.LANCZOS); base.alpha_composite(logo,(x+int(badge_w*.045),y+(badge_h-lh)//2)) d=ImageDraw.Draw(base); f=ImageFont.load_default(size=max(14,int(badge_h*.28))); fs=ImageFont.load_default(size=max(9,int(badge_h*.15))); tx=x+lw+int(badge_w*.065) d.text((tx,y+int(badge_h*.18)),'PharmaScriptix',font=f,fill=(5,70,135,255)); d.text((tx,y+int(badge_h*.57)),'Your pharmacy learning channel',font=fs,fill=(91,136,30,255)) base.convert('RGB').save(out,quality=96,subsampling=0); print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/pharmascriptix-edit/output/Teachers_Day_PharmaScriptix.jpg' im=Image.open(p); print(im.size, im.format) PY
Teachers Day PharmaScriptix
Image · JPG