Why the use of two different random number generators and drawing these images one pixel at a time? Why not swap the entire image colorspace to black/white for black/white? Why the choice of using imageio to create the gif when Pillow (imported at the beginning) can already do that as well?
These are questions that are discussable, maybe the author isn't yet very familiar with generating images :)
I like the part where the author calls numpy.random.uniform(low=0.0, high=1.0, size=None), explicitly passing size=None.
They have the parameter that they want to immediately generate the entire image in one shot, and proceed to ignore it to generate the image pixel by pixel.
I abandoned PIL/Pillow a couple of years ago for OpenCV (a lot faster, and loads 16/32 bit int/float TIFs without problems), but I remember there were a couple of "utility functions" whose job was to translate from PIL.Image into a numpy.ndarray and back. I guess you'd convert every frame from the corresponding ndarray, and then save them into a list to build the GIF in memory.
The last time I used Pillow to create GIFs [1], I also noticed that the files aren't exactly small. But instead of using a different library, I simply optimized the generated GIFs using gifsicle [2].
Would this eventually produce all images? Including a photo of me. And the Queen nude, riding a dragon. All the worlds porn. A text description of GUT. And more.
If you put some contact information in your profile I'd love to share with you a funny anecdote related to your comment. (Being of a purely humorous and whimsical nature, I'll respectfully decline from sharing it here as it doesn't fit the guidelines of HN.)
You've caught my interest, and probably that of others who read your reply. Maybe it'd be easier to just share it with the community? If it doesn't go along the rules, we could simply ignore your comment, at worst downvote it or flag it, and that'd be it.
These are questions that are discussable, maybe the author isn't yet very familiar with generating images :)