Thread maximum width size image: How do I set a maximum width size in per (5 answers)
Opened by Gast at 2007-07-10 10:17

DarickY
 2007-07-10 11:03
#303 #303
User since
2007-07-10
2 Artikel
BenutzerIn
[default_avatar]
Sorry for not given all info directly. Perl is new for me. Thanks! Best regards,

Ricardo



Code: (dl )
1
2
3
4
5
6
7
8
9
10
    my($file, $x, $y);
($file)= @_;
open(FILE, "<$file") or return (0,0);
binmode(FILE);
if ($file =~ /jpe?g$/i){ ($x,$y) = &jpegsize(\*FILE); }
elsif($file =~ /\.gif$/i){ ($x,$y) = &gifsize(\*FILE);; }
elsif($file =~ /\.xbm$/i){ ($x,$y) = &xbmsize(\*FILE); }
elsif($file =~ /\.png$/i) {($x,$y) = &pngsize(\*FILE); }
close(FILE);
return ($x,$y);

View full thread maximum width size image: How do I set a maximum width size in per