attachment
attachment

We are all from 5 different states in india so i call my gang ‘5 states’ as in the movie 2 states, edit photo according to this as movie poster, 5 states are from right to left as up telangana Maharashtra mp and haryana

analyse_media
Browsing Directory

~/

Generating Image

A Bollywood-inspired friendship movie poster background, with rich red, gold and deep blue cinematic lighting, subtle Indian map contour line art, celebratory youthful travel vibe, no people, no text

Running Command

mkdir -p "/tmp/workspace/five-states-poster/output" && python -c "import requests; u='https://cdn.orris.care/image-gen/4a408c24f67148df8a978f73a05803dc.png'; open('/tmp/workspace/five-states-poster/background.png','wb').write(requests.get(u,timeout=30).content)" && python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter, ImageEnhance from pathlib import Path src=Path('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/IMG_6451.jpg') out=Path('/tmp/workspace/five-states-poster/output/5_States_Movie_Poster.jpg') W,H=1800,2700 im=Image.open(src).convert('RGB') # Portrait crop using full photo width and fitted height # Background: photo enlarged and blurred bg=im.copy(); bg_ratio=W/H; ir=im.width/im.height if ir>bg_ratio: nw=int(im.height*bg_ratio); left=(im.width-nw)//2; bg=im.crop((left,0,left+nw,im.height)) else: nh=int(im.width/bg_ratio); top=(im.height-nh)//2; bg=im.crop((0,top,im.width,top+nh)) bg=bg.resize((W,H),Image.Resampling.LANCZOS).filter(ImageFilter.GaussianBlur(22)) bg=ImageEnhance.Brightness(bg).enhance(.38) # warm-red cinematic overlay base=bg.convert('RGBA') over=Image.new('RGBA',(W,H),(45,5,18,75)); base=Image.alpha_composite(base,over) # main image fitted nearly full width (keep broad crop) main=im.copy() # crop original mildly to a poster proportion, center group # 2048x? original ~2048 x 1228. use all image, centered from y 0 main=main.resize((W, int(im.height*W/im.width)),Image.Resampling.LANCZOS) # place photo in center vertically with bordered area photo_h=1530 main=main.crop((0, max(0,(main.height-photo_h)//2), W, max(0,(main.height-photo_h)//2)+photo_h)) # cinematic enhancing main=ImageEnhance.Contrast(main).enhance(1.1); main=ImageEnhance.Color(main).enhance(1.12) # vignette pix=main.load(); cx,cy=W/2,photo_h/2 for y in range(0,photo_h,4): for x in range(0,W,4): d=((x-cx)/(W*.75))**2+((y-cy)/(photo_h*.8))**2 if d>.45: a=min(0.42,(d-.45)*.45) r,g,b=pix[x,y]; col=(int(r*(1-a)),int(g*(1-a)),int(b*(1-a))) for yy in range(y,min(y+4,photo_h)): for xx in range(x,min(x+4,W)): pix[xx,yy]=col base.alpha_composite(main.convert('RGBA'),(0,500)) d=ImageDraw.Draw(base) # Fonts font_paths=['/usr/share/fonts/truetype/dejavu/DejaVuSansCondensed-Bold.ttf','/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf'] F=next(p for p in font_paths if Path(p).exists()) reg='/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf' def ft(n): return ImageFont.truetype(F,n) def fr(n): return ImageFont.truetype(reg,n) def centered(txt,y,font,fill,stroke=0,sfill=(0,0,0,255)): box=d.textbbox((0,0),txt,font=font,stroke_width=stroke); x=(W-(box[2]-box[0]))//2 d.text((x,y),txt,font=font,fill=fill,stroke_width=stroke,stroke_fill=sfill) # framing rules d.line((110,450,W-110,450),fill=(218,166,58,220),width=3) d.line((110,2070,W-110,2070),fill=(218,166,58,180),width=3) centered('A FRIENDSHIP FILM',105,fr(38),(242,214,157,255)) centered('5 STATES',160,ft(160),(242,194,65,255),5,(66,12,17,255)) centered('ONE GANG. FIVE ROOTS. ENDLESS STORIES.',350,fr(34),(255,240,208,255)) # bottom credits centered('UP • TELANGANA • MAHARASHTRA • MP • HARYANA',2150,ft(36),(242,194,65,255),1,(50,0,0,255)) centered('UNITED BY FRIENDSHIP',2230,ft(62),(255,239,199,255),2,(50,0,0,255)) centered('INSPIRED BY THE SPIRIT OF BOLLYWOOD FRIENDSHIP',2320,fr(26),(238,215,190,255)) # label badges positioned based on people, actual photo is top embedded 500 labels=[('HARYANA',290,1210),('MP',610,900),('MAHARASHTRA',900,1450),('TELANGANA',1320,910),('UP',1530,1210)] # annotations point to people with corresponding word badges for text,x,y in labels: font=ft(30) bb=d.textbbox((0,0),text,font=font); tw=bb[2]; pad=19 bx=max(35,min(W-tw-2*pad-35,x-tw//2)); by=y d.rounded_rectangle((bx,by,bx+tw+2*pad,by+62),radius=15,fill=(42,10,19,210),outline=(242,194,65,240),width=2) d.text((bx+pad,by+10),text,font=font,fill=(255,226,143,255)) # stars for x in (630,900,1170): d.text((x,2430),'★',font=ft(42),fill=(218,166,58,230)) base.convert('RGB').save(out,quality=95,subsampling=0) print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/five-states-poster/output/5_States_Movie_Poster.jpg'; im=Image.open(p); print(im.size, im.getbbox()) PY

Running Command

fc-list | sed -n '1,20p'; python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter, ImageEnhance from pathlib import Path src=Path('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/IMG_6451.jpg') out=Path('/tmp/workspace/five-states-poster/output/5_States_Movie_Poster.jpg') W,H=1800,2700 im=Image.open(src).convert('RGB') font='/usr/share/fonts/truetype/liberation2/LiberationSans-Bold.ttf' if not Path(font).exists(): font='/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf' reg='/usr/share/fonts/truetype/liberation2/LiberationSans-Regular.ttf' if not Path(reg).exists(): reg=font # background bg=im.resize((W,H),Image.Resampling.LANCZOS).filter(ImageFilter.GaussianBlur(25)) bg=ImageEnhance.Brightness(bg).enhance(.38).convert('RGBA') base=Image.alpha_composite(bg,Image.new('RGBA',(W,H),(52,4,16,110))) # photo horizontal crop made tall body 500-2030 m=im.resize((W,int(im.height*W/im.width)),Image.Resampling.LANCZOS) photo_h=1530; top=max(0,(m.height-photo_h)//2); m=m.crop((0,top,W,top+photo_h)) m=ImageEnhance.Contrast(m).enhance(1.12); m=ImageEnhance.Color(m).enhance(1.1) base.alpha_composite(m.convert('RGBA'),(0,500)) d=ImageDraw.Draw(base) def ft(n): return ImageFont.truetype(font,n) def fr(n): return ImageFont.truetype(reg,n) def centered(txt,y,fon,fill,stroke=0,sfill=(0,0,0,255)): box=d.textbbox((0,0),txt,font=fon,stroke_width=stroke); d.text(((W-(box[2]-box[0]))//2,y),txt,font=fon,fill=fill,stroke_width=stroke,stroke_fill=sfill) # shading gradient around photo boundaries for yy,a in [(500,120),(2030,125)]: d.rectangle((0,yy-45,W,yy+45),fill=(25,0,4,a)) d.line((110,450,W-110,450),fill=(218,166,58,220),width=3); d.line((110,2070,W-110,2070),fill=(218,166,58,180),width=3) centered('A FRIENDSHIP FILM',105,fr(38),(242,214,157,255)) centered('5 STATES',160,ft(160),(242,194,65,255),5,(66,12,17,255)) centered('ONE GANG. FIVE ROOTS. ENDLESS STORIES.',350,fr(34),(255,240,208,255)) labels=[('HARYANA',220,1170),('MP',610,890),('MAHARASHTRA',900,1470),('TELANGANA',1325,920),('UP',1550,1190)] for text,x,y in labels: f=ft(30); bb=d.textbbox((0,0),text,font=f); tw=bb[2]; pad=18; bx=max(30,min(W-tw-2*pad-30,x-tw//2)) d.rounded_rectangle((bx,y,bx+tw+2*pad,y+62),radius=15,fill=(42,10,19,220),outline=(242,194,65,245),width=2) d.text((bx+pad,y+10),text,font=f,fill=(255,226,143,255)) centered('UP • TELANGANA • MAHARASHTRA • MP • HARYANA',2150,ft(34),(242,194,65,255),1,(50,0,0,255)) centered('UNITED BY FRIENDSHIP',2230,ft(62),(255,239,199,255),2,(50,0,0,255)) centered('INSPIRED BY THE SPIRIT OF BOLLYWOOD FRIENDSHIP',2320,fr(26),(238,215,190,255)) for x in (630,870,1110): d.text((x,2430),'*',font=ft(48),fill=(218,166,58,230)) base.convert('RGB').save(out,quality=95,subsampling=0) print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/five-states-poster/output/5_States_Movie_Poster.jpg'; im=Image.open(p); print('VERIFIED',im.size) PY

Running Command

python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter, ImageEnhance from pathlib import Path src=Path('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/IMG_6451.jpg') out=Path('/tmp/workspace/five-states-poster/output/5_States_Movie_Poster.jpg') W,H=1800,2700 im=Image.open(src).convert('RGB') font='/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf' # background from image bg=im.resize((W,H),Image.Resampling.LANCZOS).filter(ImageFilter.GaussianBlur(25)) bg=ImageEnhance.Brightness(bg).enhance(.38).convert('RGBA') base=Image.alpha_composite(bg,Image.new('RGBA',(W,H),(52,4,16,110))) # photo area m=im.resize((W,int(im.height*W/im.width)),Image.Resampling.LANCZOS) photo_h=1530; top=max(0,(m.height-photo_h)//2); m=m.crop((0,top,W,top+photo_h)) m=ImageEnhance.Contrast(m).enhance(1.12); m=ImageEnhance.Color(m).enhance(1.1) base.alpha_composite(m.convert('RGBA'),(0,500)) d=ImageDraw.Draw(base) def ft(n): return ImageFont.truetype(font,n) def centered(txt,y,fon,fill,stroke=0,sfill=(0,0,0,255)): box=d.textbbox((0,0),txt,font=fon,stroke_width=stroke); d.text(((W-(box[2]-box[0]))//2,y),txt,font=fon,fill=fill,stroke_width=stroke,stroke_fill=sfill) for yy in (500,2030): d.rectangle((0,yy-45,W,yy+45),fill=(25,0,4,125)) d.line((110,450,W-110,450),fill=(218,166,58,220),width=3); d.line((110,2070,W-110,2070),fill=(218,166,58,180),width=3) centered('A FRIENDSHIP FILM',105,ft(38),(242,214,157,255)) centered('5 STATES',160,ft(160),(242,194,65,255),5,(66,12,17,255)) centered('ONE GANG. FIVE ROOTS. ENDLESS STORIES.',350,ft(34),(255,240,208,255)) # left to right in actual image: Haryana, MP, Maharashtra, Telangana, UP labels=[('HARYANA',220,1170),('MP',610,890),('MAHARASHTRA',900,1470),('TELANGANA',1325,920),('UP',1550,1190)] for text,x,y in labels: f=ft(30); bb=d.textbbox((0,0),text,font=f); tw=bb[2]; pad=18; bx=max(30,min(W-tw-2*pad-30,x-tw//2)) d.rounded_rectangle((bx,y,bx+tw+2*pad,y+62),radius=15,fill=(42,10,19,220),outline=(242,194,65,245),width=2) d.text((bx+pad,y+10),text,font=f,fill=(255,226,143,255)) centered('UP • TELANGANA • MAHARASHTRA • MP • HARYANA',2150,ft(34),(242,194,65,255),1,(50,0,0,255)) centered('UNITED BY FRIENDSHIP',2230,ft(62),(255,239,199,255),2,(50,0,0,255)) centered('INSPIRED BY THE SPIRIT OF BOLLYWOOD FRIENDSHIP',2320,ft(26),(238,215,190,255)) for x in (630,870,1110): d.text((x,2430),'*',font=ft(48),fill=(218,166,58,230)) base.convert('RGB').save(out,quality=95,subsampling=0) print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/five-states-poster/output/5_States_Movie_Poster.jpg'; im=Image.open(p); print('VERIFIED', im.size, im.mode) PY

5 States Movie Poster

Image · JPG

attachment
attachment

make poster like this but the states are written wrong in this, make correction in previous uploaded photo as We are all from 5 different states in india so i call my gang ‘5 states’ as in the movie 2 states, edit photo according to this as movie poster, 5 states are from left to right as up telangana Maharashtra mp and haryana,

analyse_media
Browsing Directory

~/

Running Command

mkdir -p "/tmp/workspace/five-states-corrected/output" && python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter from pathlib import Path src=Path('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/9E352E9F-CBD5-46A9-91CD-D9A995193AD0.PNG') out=Path('/tmp/workspace/five-states-corrected/output/5_States_Corrected_Poster.png') im=Image.open(src).convert('RGBA') W,H=im.size # consistently use native 1024 x 1536 coordinates # soft parchment patches to conceal five erroneous labels while retaining the movie-poster texture patches=[(20,310,240,392),(225,175,445,255),(625,170,980,260),(835,302,1018,385),(805,720,1022,805)] # build subtly mottled parchment layers for box in patches: x1,y1,x2,y2=box; w,h=x2-x1,y2-y1 p=Image.new('RGBA',(w,h),(238,199,125,220)) noise=Image.effect_noise((w,h),28).convert('L').filter(ImageFilter.GaussianBlur(2)) alpha=noise.point(lambda n: 180+int(n*.27)) p.putalpha(alpha) # feather alpha edges mask=Image.new('L',(w,h),0); md=ImageDraw.Draw(mask); md.rounded_rectangle((4,4,w-5,h-5),18,fill=225) mask=mask.filter(ImageFilter.GaussianBlur(8)); p.putalpha(mask) im.alpha_composite(p,(x1,y1)) d=ImageDraw.Draw(im) font='/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf' def f(sz): return ImageFont.truetype(font,sz) ink=(58,35,22,255); cream=(255,232,181,255) # Five correct labels correspond to people left to right: UP, Telangana, Maharashtra, MP, Haryana # text labels are set in a handwritten-like italic treatment using available font with shadow for separation labels=[ ('UTTAR PRADESH',(31,335),(260,416),(190,410)), ('TELANGANA',(250,193),(323,318),(336,292)), ('MAHARASHTRA',(630,188),(663,315),(654,290)), ('MADHYA PRADESH',(836,325),(842,416),(872,397)), ('HARYANA',(829,742),(847,834),(863,815)), ] for txt,pos,start,end in labels: # compact fit dynamically size=27 if len(txt)<12 else 22 ff=f(size) # gentle light halo then ink d.text((pos[0]+1,pos[1]+2),txt,font=ff,fill=cream,stroke_width=2,stroke_fill=cream) d.text(pos,txt,font=ff,fill=ink) # curved-ish arrow with endpoint d.line([start,end],fill=ink,width=3) ex,ey=end; sx,sy=start d.polygon([(ex,ey),(ex-10,ey-3),(ex-5,ey-11)],fill=ink) # clear explicit ordered line at base to make assignment unambiguous d.rounded_rectangle((142,1110,884,1150),radius=12,fill=(11,69,79,210),outline=(251,215,150,230),width=1) order='LEFT TO RIGHT: UP • TELANGANA • MAHARASHTRA • MP • HARYANA' ff=f(14); bb=d.textbbox((0,0),order,font=ff); d.text(((W-(bb[2]-bb[0]))//2,1121),order,font=ff,fill=(255,232,181,255)) im.save(out) print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/five-states-corrected/output/5_States_Corrected_Poster.png'; im=Image.open(p); print('Verified',im.size,im.mode) PY

Corrected the state labels to match the people from left to right:
UP • Telangana • Maharashtra • MP • Haryana

5 States Corrected Poster

Image · PNG

make up telangana mp haryana and maharashtra correction from left to right

Browsing Directory

~/five-states-corrected/output

Browsing Directory

~/

analyse_media
Running Command

mkdir -p "/tmp/workspace/five-states-corrected/output" && python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter from pathlib import Path src=Path('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/9E352E9F-CBD5-46A9-91CD-D9A995193AD0.PNG') out=Path('/tmp/workspace/five-states-corrected/output/5_States_Corrected_Order.png') im=Image.open(src).convert('RGBA'); W,H=im.size # Cover only the incorrect state-name text regions with softly feathered parchment panels, preserving rest of artwork regions=[(17,320,220,383),(220,178,430,246),(620,175,982,250),(830,308,1020,378),(800,730,1023,800)] for x1,y1,x2,y2 in regions: w,h=x2-x1,y2-y1 panel=Image.new('RGBA',(w,h),(238,202,136,0)) mask=Image.new('L',(w,h),0) md=ImageDraw.Draw(mask); md.rounded_rectangle((8,8,w-8,h-8),radius=18,fill=225) mask=mask.filter(ImageFilter.GaussianBlur(10)); panel.putalpha(mask) im.alpha_composite(panel,(x1,y1)) d=ImageDraw.Draw(im) font='/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf' def F(s): return ImageFont.truetype(font,s) ink=(55,34,22,255); halo=(251,222,165,255) # Correct order of the five friends in the photo, left to right: UP, Telangana, MP, Haryana, Maharashtra items=[ ('UTTAR PRADESH',(31,335),(184,389),(205,413),22), ('TELANGANA',(248,193),(319,308),(333,293),27), ('MADHYA PRADESH',(626,188),(665,306),(652,291),22), ('HARYANA',(838,326),(842,409),(868,394),27), ('MAHARASHTRA',(812,743),(846,829),(862,811),21), ] for text,pos,p1,p2,size in items: fonti=F(size) d.text((pos[0]+1,pos[1]+2),text,font=fonti,fill=halo,stroke_width=2,stroke_fill=halo) d.text(pos,text,font=fonti,fill=ink) d.line([p1,p2],fill=ink,width=3) ex,ey=p2 d.polygon([(ex,ey),(ex-10,ey-3),(ex-5,ey-11)],fill=ink) # Small confirmation line in the poster footer d.rounded_rectangle((127,1110,897,1152),radius=13,fill=(9,68,79,215),outline=(250,216,150,230),width=1) line='LEFT TO RIGHT: UP • TELANGANA • MP • HARYANA • MAHARASHTRA' f=F(13); bb=d.textbbox((0,0),line,font=f); d.text(((W-(bb[2]-bb[0]))//2,1123),line,font=f,fill=(255,234,185,255)) im.save(out) print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/five-states-corrected/output/5_States_Corrected_Order.png' im=Image.open(p); assert im.size==(1024,1536); print('Verified',im.size) PY

5 States Corrected Order

Image · PNG

Make the title look more like a Bollywood movie poster

analyse_media
Browsing Directory

~/

Browsing Directory

~/five-states-corrected/output

Running Command

python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter from pathlib import Path src=Path('/tmp/workspace/five-states-corrected/output/5_States_Corrected_Order.png') out=Path('/tmp/workspace/five-states-corrected/output/5_States_Bollywood_Title.png') im=Image.open(src).convert('RGBA'); W,H=im.size # Preserve the poster and replace only its central title treatment with a dramatic Bollywood-inspired marquee. # A textured teal-gold backing masks the former lettering in the title zone. back=Image.new('RGBA',(W,275),(5,55,66,0)) mask=Image.new('L',(W,275),0); md=ImageDraw.Draw(mask) md.rounded_rectangle((65,14,W-65,258),45,fill=238) mask=mask.filter(ImageFilter.GaussianBlur(11)); back.putalpha(mask) im.alpha_composite(back,(0,820)) d=ImageDraw.Draw(im) # ornamental gold rules for y in (850,1070): d.line((120,y,W-120,y),fill=(244,192,82,210),width=2) d.ellipse((W//2-7,y-7,W//2+7,y+7),fill=(245,197,84,255)) # fonts supplied by image system bold='/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf' def font(sz): return ImageFont.truetype(bold,sz) def ct(text,y,fnt,fill,stroke=0,sfill=(0,0,0,255)): box=d.textbbox((0,0),text,font=fnt,stroke_width=stroke) x=(W-(box[2]-box[0]))//2 d.text((x,y),text,font=fnt,fill=fill,stroke_width=stroke,stroke_fill=sfill) # small classic billing line ct('A TALE OF FRIENDSHIP ACROSS INDIA',865,font(17),(255,224,156,255)) # Separately composed title, big, glossy and theatrical: long offset shadow plus warm outer outline. title='5 STATES' f=font(137) box=d.textbbox((0,0),title,font=f,stroke_width=0); x=(W-(box[2]-box[0]))//2; y=894 # deep offset / extrusion for dx,dy in [(12,18),(10,15),(8,12),(6,9)]: d.text((x+dx,y+dy),title,font=f,fill=(38,11,21,255),stroke_width=5,stroke_fill=(38,11,21,255)) # outer gold then cinematic red inner lettering d.text((x,y),title,font=f,fill=(161,34,31,255),stroke_width=11,stroke_fill=(248,197,76,255)) d.text((x,y-2),title,font=f,fill=(205,53,38,255),stroke_width=3,stroke_fill=(255,231,148,255)) # specular highlight ct('5 STATES',y-6,f,(244,102,65,155),stroke=0) # heart separator and theatrical tag line ct('♥',1030,font(31),(248,201,88,255),stroke=1,sfill=(51,16,22,255)) ct('FIVE ROOTS • ONE UNBREAKABLE GANG',1082,font(15),(255,226,161,255)) # a few star glints for px,py in [(164,890),(846,890),(108,1034),(915,1034)]: d.text((px,py),'✦',font=font(20),fill=(255,220,123,230)) im.save(out) print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/five-states-corrected/output/5_States_Bollywood_Title.png' im=Image.open(p); print('Verified:', im.size, im.mode) PY

5 States Bollywood Title

Image · PNG

Export a high-resolution print-ready version

Browsing Directory

~/five-states-corrected/output

Running Command

python - <<'PY' from PIL import Image, ImageFilter, ImageEnhance from pathlib import Path src=Path('/tmp/workspace/five-states-corrected/output/5_States_Corrected_Poster.png') out_dir=Path('/tmp/workspace/five-states-corrected/print-ready') out_dir.mkdir(parents=True, exist_ok=True) im=Image.open(src).convert('RGB') # 12 x 18 inches at 300 DPI, 2:3 poster ratio hi=im.resize((3600,5400),Image.Resampling.LANCZOS) # restrained sharpening after resampling hi=hi.filter(ImageFilter.UnsharpMask(radius=1.15, percent=115, threshold=4)) hi.save(out_dir/'5_States_Print_Ready_12x18in_300dpi.jpg',quality=98,subsampling=0,dpi=(300,300),icc_profile=im.info.get('icc_profile')) hi.save(out_dir/'5_States_Print_Ready_12x18in_300dpi.png',dpi=(300,300),compress_level=4) for p in out_dir.iterdir(): chk=Image.open(p) print(p.name, chk.size, chk.info.get('dpi'), p.stat().st_size) PY

Print-ready exports are set to 12 × 18 inches at 300 DPI (3600 × 5400 px):

5 States Print Ready 12x18in 300dpi

Image · JPG

5 States Print Ready 12x18in 300dpi

Image · PNG

attachment
attachment

make poster for this also but different design, and states from left to right as telangana maharashtra up haryana and mp

analyse_media
Browsing Directory

~/

Running Command

mkdir -p "/tmp/workspace/five-states-night-poster/output" && python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageEnhance, ImageFilter from pathlib import Path src=Path('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/IMG_0407.JPG') out=Path('/tmp/workspace/five-states-night-poster/output/5_States_Night_Premiere_Poster.jpg') im=Image.open(src).convert('RGB') W,H=1800,2700 font='/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf' def F(n): return ImageFont.truetype(font,n) # Use original as full-length cast image in the upper 2/3, with a blurred cinematic version behind it bg=im.resize((W,H),Image.Resampling.LANCZOS).filter(ImageFilter.GaussianBlur(28)) bg=ImageEnhance.Brightness(bg).enhance(.27).convert('RGBA') base=Image.alpha_composite(bg,Image.new('RGBA',(W,H),(3,11,35,135))) # source's 3:4 photo, centered in a tall composition. Keep all five people and crop excess pavement lower edge. ratio=W/2050 photo=im.resize((W,int(im.height*ratio)),Image.Resampling.LANCZOS) # visible 2100 px: crop only pavement from bottom photo=photo.crop((0,0,W,min(photo.height,2090))) photo=ImageEnhance.Contrast(photo).enhance(1.08) photo=ImageEnhance.Color(photo).enhance(1.18) base.alpha_composite(photo.convert('RGBA'),(0,470)) # dark gradient across title and footer shade=Image.new('RGBA',(W,H),(0,0,0,0)); sd=ImageDraw.Draw(shade) for y in range(0,600,8): sd.rectangle((0,y,W,y+8),fill=(2,8,25,max(0,220-int(y*.32)))) for y in range(2020,H,8): sd.rectangle((0,y,W,y+8),fill=(2,8,25,min(235,int((y-2020)*.36)))) base=Image.alpha_composite(base,shade) d=ImageDraw.Draw(base) def ct(text,y,f,fill,stroke=0,sfill=(0,0,0,255)): bb=d.textbbox((0,0),text,font=f,stroke_width=stroke); d.text(((W-(bb[2]-bb[0]))//2,y),text,font=f,fill=fill,stroke_width=stroke,stroke_fill=sfill) # Vertical art-deco / premiere design, intentionally unlike parchment earlier poster # top lights for x in [180,360,1440,1620]: d.line((x,70,x,360),fill=(239,183,72,120),width=2) d.ellipse((x-9,65,x+9,83),fill=(255,221,117,230)) ct('PRESENTING',67,F(26),(244,211,133,255)) ct('F I V E S T A T E S',120,F(73),(254,206,75,255),3,(40,10,30,255)) ct('THE NIGHT PREMIERE',218,F(30),(243,231,194,255)) d.line((215,303,720,303),fill=(239,184,73,220),width=3); d.line((1080,303,1585,303),fill=(239,184,73,220),width=3) d.polygon([(900,290),(914,303),(900,316),(886,303)],fill=(239,184,73,255)) # People label badges in correct left->right order, placed low enough not to obscure faces states=['TELANGANA','MAHARASHTRA','UTTAR PRADESH','HARYANA','MADHYA PRADESH'] centers=[205,530,900,1225,1515] y=1900 for state,x in zip(states,centers): f=F(23 if len(state)<13 else 20) bb=d.textbbox((0,0),state,font=f); tw=bb[2]-bb[0]; ww=tw+45 x1=max(22,min(W-ww-22,x-ww//2)) d.rounded_rectangle((x1,y,x1+ww,y+65),radius=19,fill=(8,20,47,225),outline=(245,194,75,255),width=2) d.text((x1+(ww-tw)//2,y+15),state,font=f,fill=(255,226,145,255)) d.line((x,y-35,x,y),fill=(250,201,85,225),width=2) d.ellipse((x-5,y-40,x+5,y-30),fill=(250,201,85,255)) # Footer ct('FIVE PEOPLE • FIVE PLACES • ONE EPIC CREW',2115,F(30),(255,229,166,255)) ct('5 STATES',2200,F(122),(225,62,68,255),6,(253,196,74,255)) ct('UNITED IN EVERY FRAME',2360,F(32),(253,231,184,255)) # page-like film perforations for yy in range(2450,2625,45): d.rounded_rectangle((80,yy,116,yy+22),radius=4,fill=(245,199,85,190)); d.rounded_rectangle((1684,yy,1720,yy+22),radius=4,fill=(245,199,85,190)) ct('TELANGANA • MAHARASHTRA • UP • HARYANA • MP',2495,F(24),(241,212,142,255)) base.convert('RGB').save(out,quality=96,subsampling=0) print(out) PY python - <<'PY' from PIL import Image p='/tmp/workspace/five-states-night-poster/output/5_States_Night_Premiere_Poster.jpg'; im=Image.open(p); print('Verified',im.size,im.info.get('dpi')) PY

5 States Night Premiere Poster

Image · JPG

dont change the orientation of photo

analyse_media
Running Command

mkdir -p "/tmp/workspace/five-states-night-poster/original-orientation" && python - <<'PY' from PIL import Image, ImageDraw, ImageFont, ImageFilter from pathlib import Path src=Path('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/IMG_0407.JPG') out=Path('/tmp/workspace/five-states-night-poster/original-orientation/5_States_Original_Portrait_Orientation.jpg') im=Image.open(src).convert('RGBA') W,H=im.size # Exact original canvas and orientation retained - only poster typography/lighting overlays are added. over=Image.new('RGBA',(W,H),(0,0,0,0)); d=ImageDraw.Draw(over) # Subtle navy overlays only in the natural empty sky and lower pavement for y in range(0,int(H*.25),6): a=int(150*(1-y/(H*.25))) d.rectangle((0,y,W,y+6),fill=(2,10,30,a)) for y in range(int(H*.80),H,6): a=int(130*((y-H*.80)/(H*.20))) d.rectangle((0,y,W,y+6),fill=(2,10,30,a)) im=Image.alpha_composite(im,over) d=ImageDraw.Draw(im) font='/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf' def F(s): return ImageFont.truetype(font,s) def center(t,y,ft,fill,stroke=0,sc=(0,0,0,255)): box=d.textbbox((0,0),t,font=ft,stroke_width=stroke) d.text(((W-(box[2]-box[0]))//2,y),t,font=ft,fill=fill,stroke_width=stroke,stroke_fill=sc) # Bollywood premiere-style header in blank night sky center('A FRIENDSHIP FEATURE',45,F(25),(252,221,153,255)) center('5 S T A T E S',85,F(77),(242,186,65,255),3,(46,9,25,255)) center('THE NIGHT PREMIERE',178,F(26),(255,237,193,255)) d.line((155,226,W-155,226),fill=(242,186,65,215),width=2) # State badges placed across pavement immediately below the cast, matching actual left-to-right order states=['TELANGANA','MAHARASHTRA','UP','HARYANA','MP'] centers=[160,450,765,1085,1370] y=1585 for state,cx in zip(states,centers): fs=20 if len(state)>10 else 23; f=F(fs) bb=d.textbbox((0,0),state,font=f); tw=bb[2]-bb[0]; bw=tw+40 x=max(22,min(W-bw-22,cx-bw//2)) d.rounded_rectangle((x,y,x+bw,y+60),radius=16,fill=(8,19,48,220),outline=(245,193,75,255),width=2) d.text((x+(bw-tw)//2,y+14),state,font=f,fill=(255,227,151,255)) d.line((cx,y-30,cx,y),fill=(245,193,75,215),width=2) # Footer title and credits preserve original portrait frame center('5 STATES',1710,F(105),(205,51,48,255),5,(249,194,73,255)) center('FIVE ROOTS • ONE GANG • ENDLESS MEMORIES',1828,F(24),(255,230,171,255)) center('TELANGANA • MAHARASHTRA • UP • HARYANA • MP',1900,F(20),(245,214,149,255)) im.convert('RGB').save(out,quality=97,subsampling=0) print(out, im.size) PY python - <<'PY' from PIL import Image s=Image.open('/tmp/workspace/attachments/b7b3eefc-8372-4c2e-917b-383be5745d2c/IMG_0407.JPG') o=Image.open('/tmp/workspace/five-states-night-poster/original-orientation/5_States_Original_Portrait_Orientation.jpg') print('Original:',s.size,'Output:',o.size,'orientation preserved:',s.size==o.size) assert s.size==o.size PY

Browsing Directory

~/five-states-night-poster

Kept the original photo’s exact orientation and dimensions, with only poster-style overlays added.

5 States Original Portrait Orientation

Image · JPG

This is a shared conversation. Sign in to Orris to start your own chat.