Re: How to detect an image type with GD



[A complimentary Cc of this posting was sent to
Francesco Moi
<francescomoi@xxxxxxx>], who wrote in article <1163005823.701417.13950@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
Hi.

I want to load an image with GD, but I must know which type is each one
in order to:
my $srcimage = GD::Image->newFromGif("foo.gif");
my $srcimage = GD::Image->newFromJpeg("foo.jpg");
...

How can I detect it?

Do not. Let GD detect it.

Hope this helps,
Ilya




.