Generating memes and infographics with Pillow (rkblog.dev)
from riklaunim@programming.dev to python@programming.dev on 08 Oct 2023 15:51
https://programming.dev/post/4108626

How to take a few images and create custom graphics with Pillow - memes, info-graphics, custom banners and the like.

#python

threaded - newest

onlinepersona@programming.dev on 08 Oct 2023 21:51 collapse

There seems to be a lot of stuff done manually like wrapping and centering text or expanding the image. There must be an easier way.

My dumb-ass would’ve generated HTML, passed it through a controlled browser, taken a screenshot, and piped that output to a file. But as I said, there must be an easier way…

riklaunim@programming.dev on 09 Oct 2023 19:36 next collapse

Using a browser would be quite heavy, especially for one of those meme sites that handle a rather large flow of new content.

onlinepersona@programming.dev on 09 Oct 2023 19:52 collapse

Possibly. You don’t need to open a new browser each time. You can change the URL of a tab or open a new tab. But yeah, it probably isn’t the best way to do it.

amanaftermidnight@lemmy.world on 21 Oct 2023 18:13 collapse

I think using ffmpeg would be easier.

Yes, I have had generated memes with ffmpeg.