I'd use ImageMagick, but if you want to do it in plain* Python, here's an example: https://stackoverflow.com/a/79683407
* Well, you'll need pyAPNG.
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
I'd use ImageMagick, but if you want to do it in plain* Python, here's an example: https://stackoverflow.com/a/79683407
* Well, you'll need pyAPNG.
I used pillow. It has apng support now.
On top of the other advice, Pillow is definitely worth considering for this. It’s a solid library that fits this use case perfectly.
I got it to work. Yay!
https://sh.itjust.works/pictrs/image/ae3e684e-dacd-4b98-8306-bc68715e3587.apng
Nice shitpost! What was your code to achieve this?
I currently don't have the code. I didn't save it...
I'll give you a rough idea of what the modified code stack overflow did.
They imported pillow module.
Took the 6 labelled images from their storage.
Appended the images with a set delay of 100ms and saved it as one.
I'm not a coder, so I can't remember the python code.
Don't be shy, you are a coder now. Enjoy the chaos!
I don't remember where the original code is, maybe I forgot to save it but it's fine. I found a site that explains the apng module.