Hi guys, I have an image upload script written in PHP that I would like modifying. Heres a quick description of what the PHP script does:
Resizes images (in proportion)
Transfers image via FTP
Creates a random and unique filename for images
Stores filename in MySQL
It works pretty well however it does have a main problem that I'd like fixing, the problem is this:
When a gif file is uploaded, the image extension is .gif however the file type when viewing the gif image info says that the image is a JPEG. This is a concern and the main problem id like fixing.
when a png file is uploaded, the same problem occurs as above.
When a bmp file is uploaded, I get an error on upload and the image appears black on the website... again the bmp image has the same problem as the above gif and png problem, it has the .bmp file extension but says the file type is a JPEG in the image info properties.
If anyone can help me with these problems, that would be great and also, im open to other suggestions if anything else seems wrong with the script or if they know of better ways of doing things :) I can also point out what I think is causing the errors in the script, I just dont know how to fix it! :) Thankyou.