in reply to Verifying File Type Using Only Modules from basic distribution of Perl
Figuring out whether a .JPG is really a JPEG or a .GIF is really a GIF is very easy. All you have to do is open the file, read the first few bytes, and look at the signature. Reverse engineer Image::Size or steal code from it for your script.
|
|---|