Page 1 of 1

validating an image

Posted: Mon Sep 18, 2006 9:37 am
by hame22
Hi

I have a form where users can submit an image which is uploaded to the web server.

I am trying to validate this image but am having some difficulties using the getimagesize() function (though this may not be the right way to go about this!)

I am first trying to validate whether the selected files is an image (at best a jpeg or a gif)

and then to validate the images dimensions - I can accept no images greater than 200px X 200px

I would really appricaTE it something could supply some advice as this problem is really bugging me!!

thanks in advance

Posted: Mon Sep 18, 2006 9:42 am
by Oren
Generally, getimagesize() is the best thing you can do - although it's not enough in my opinion.

Posted: Mon Sep 18, 2006 9:46 am
by twigletmac
What kind of difficulties are you having?

Mac