in reply to Image size in pure perl
Your REGEX need to be:
if $_[0] =~ /^GIF8..(....)/s;
Note that width and height generally, like on BMP, are write in byte integer, in other words, they can have any type of byte, from 0 to 255.
For example, a BMP image with the width of 2570, has the byte integer as "\n\n\0\0".
Graciliano M. P.
"The creativity is the expression of the liberty".
|
|---|