I have a simple images resizing script that works great for JPEGs, but not for GIFs or PNGs. The first step is getting the correct image type so I can process it accordingly.
My question is: It seems that getimagesize() returns both IMAGETYPE and MIME-type… So which should I use to determine if an imagine is JPEG, PNG, or GIF?
It seems strange that PHP gives you two ways of doing this, so I presume they each have their designated uses?
Documentation says that:
I believe IMAGETYPE is valid choice.