in reply to Convert JPEG to pixel intensity array
You might want to look at PDL (specifically PDL::IO::Pic). A few of the folks that I work with use it or similar software (IDL, GDL) to analyze images.