py5coding on Nostr: #py5's new `to_pil()` method returns the frame as a PIL Image, making it easy to ...
#py5's new `to_pil()` method returns the frame as a PIL Image, making it easy to implement a Droste effect with a loop:
size(1024, 1024)
background('w')
image(Image.open('logo.png'), 512, 512)
for _ in range(9):
image(to_pil().resize((595, 595)), 0, 0)
#genuary #genuary3 #processing #python #art
Published at
2024-01-03 20:53:25Event JSON
{
"id": "1bd15ad0d03e1c74b65502d1cbd05f806b7d673d24e97d42bf65df3ab7395784",
"pubkey": "84ee38e8a3fd005f79ad54ce399885a0a0493f3345fcfcdd92353994b25bc89b",
"created_at": 1704315205,
"kind": 1,
"tags": [
[
"t",
"py5"
],
[
"t",
"GENUARY"
],
[
"t",
"genuary3"
],
[
"t",
"processing"
],
[
"t",
"python"
],
[
"t",
"art"
],
[
"proxy",
"https://fosstodon.org/users/py5coding/statuses/111694001293874148",
"activitypub"
]
],
"content": "#py5's new `to_pil()` method returns the frame as a PIL Image, making it easy to implement a Droste effect with a loop:\n\nsize(1024, 1024)\nbackground('w')\nimage(Image.open('logo.png'), 512, 512)\nfor _ in range(9):\n image(to_pil().resize((595, 595)), 0, 0)\n\n#genuary #genuary3 #processing #python #art\n\nhttps://cdn.fosstodon.org/media_attachments/files/111/693/997/057/922/534/original/2e3adbd612b1ac4e.png",
"sig": "2f56391c208e9dd2adde5791138d316b3a6717834fb0ec0e884e38de55c8690ce262405ba61e6e791bcbda321c20d51ac3893b0af53f4c39d20e1a5b9dcb4d08"
}