12Feb
randomized horizontal bars
Posted 3 years, 10 months ago - 2 comments
I’ve played around with variations of this script before, and it’s always been a favorite. Simple, randomly determined colors arranged in horizontal rows.
Example image created with the script:

Here is the live script. Reload for new combinations.
This is similar to earlier experiments, but use PHP’s image generation functionality to output a PNG image.
What’s interesting is that PHP seems to crap out on the last bar. Note the glitch on the far left,and the run-over on the far right. I’m not sure why it does this, but my guess is that PHP limits the number of variables or operations contained in one script(?). Or loops can only iterate a finite amount…
2 Comments
RSS feed for comments on this post.
reminds me of the old c64 hacker screens
you should be doing imagedestroy at the end to clear out the memory…
from php.net:
imagedestroy() frees any memory associated with image image. image is the image identifier returned by the imagecreate() function.