You've been given a few excellent answers to your question already, but I'd like to suggest that if you're manipulating images, you might want to do so in a vector sort of way. Check out PDL from CPAN or the PDL home page if you haven't already.
In reply to Re: Extracting pixel values
by duff
in thread Extracting pixel values
by redbeard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |