Rebuild the Drive-In scene from Paul's full-size picture
pauljd/davidson-ci: Davidson CI / quality (push) Failing after 1m59s
pauljd/davidson-ci: Davidson CI / ai-review (push) Failing after 1m21s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-11-02 11:55:21 +00:00
co-authored by Claude Opus 5.5
parent 6003d72b27
commit dfb729ca86
3 changed files with 7 additions and 11 deletions
+7 -11
View File
@@ -85,16 +85,12 @@ def theatre():
clear_board(source, (540, 372, 1400, 562), top + [(1400, 562), (540, 562)])
return source
def drive_in(picture=None):
full = Image.open(HERE / 'references/paul-drive-in.png').convert('RGB')
# The app's Edit and share buttons in the screenshot go under pavement copied from beside them.
for box, to in (((280, 222, 332, 266), (20, 222)), ((390, 226, 430, 266), (436, 226))):
patch = full.crop(box); soft = Image.new('L', patch.size, 0); ImageDraw.Draw(soft).rectangle((3, 3, patch.width - 4, patch.height - 4), fill=255)
full.paste(patch, to, soft.filter(ImageFilter.GaussianBlur(2)))
source = full.crop((12, 7, 482, 271)).resize((W, H), Image.LANCZOS).filter(ImageFilter.UnsharpMask(3, 60, 2))
fill_polygon(source, [(511, 148), (800, 148), (925, 176), (970, 200), (970, 348), (511, 348)], (22, 14, 36), 3)
fill_polygon(source, [(966, 204), (996, 204), (996, 244), (966, 244)], (22, 14, 36), 3)
clear_board(source, (470, 366, 1050, 534), [(470, 372), (620, 366), (764, 366), (1040, 392), (1040, 532), (764, 522), (470, 508)], 20)
corners = [(1338, 340), (1887, 262), (1892, 602), (1338, 606)]
source = Image.open(HERE / 'references/paul-drive-in.png').convert('RGB').resize((W, H), Image.LANCZOS)
fill_polygon(source, [(511, 149), (827, 149), (907, 179), (974, 201), (974, 349), (511, 349)], (22, 14, 36), 3)
fill_polygon(source, [(500, 310), (515, 310), (515, 340), (500, 340)], (22, 14, 36), 3)
fill_polygon(source, [(971, 224), (986, 224), (986, 258), (971, 258)], (22, 14, 36), 3)
clear_board(source, (405, 355, 1065, 550), [(416, 370), (735, 365), (1053, 396), (1053, 540), (735, 528), (416, 511)], 20)
corners = [(1321, 340), (1860, 262), (1866, 591), (1321, 597)]
if picture:
art = Image.open(picture).convert('RGB')
placed = art.transform((W, H), Image.PERSPECTIVE, perspective(corners, [(0, 0), (art.width, 0), (art.width, art.height), (0, art.height)]), Image.BICUBIC)
@@ -114,7 +110,7 @@ if picture:
scene.save(OUT / 'di_theatre.jpg', quality=88)
scene = drive_in(picture)
lit(scene, overlay('d_logo', logo(494, 158, .3, 642, 216, 25, 322, 96)), 9)
scene.paste(l := overlay('d_board', board(764, 430, 50, 472, 28, 506, 24, 250)), (0, 0), l)
scene.paste(l := overlay('d_board', board(745, 430, 52, 476, 30, 512, 26, 250)), (0, 0), l)
scene.paste(l := overlay('d_strip', strip()), (0, 0), l)
scene.save(OUT / 'di_drivein.jpg', quality=88)
else:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 KiB

After

Width:  |  Height:  |  Size: 381 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 2.9 MiB