in reply to Using GD in a CGI script to randomly select images fails...
You don't guard ->new against potential failures (e.g. wrong pathes).
And try to print the header as early as possible (it's always 'Content-Type: image/png', it seems) to facilitate debugging.
|
|---|