Have you read the existing nodes about GD on Perl Monks? You might find some useful information there.
From a quick glance at your code, I notice you don't use strict or CGI. You might find several of the Tutorials here useful, such as use CGI or die; and CGI Help Guide.
Although you check for errors when opening file.jpg, you don't check for errors elsewhere, such as when you call GD::Image->newFromJpeg(). You have no way of knowing whether these methods succeed or fail.
In reply to Re: Understanding GD.pm
by tomhukins
in thread Understanding GD.pm
by cal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |