Welcome to WebmasterWorld Guest from 22.214.171.124
I'm working on an upload image script. It works for most .jpg files. The problem is with ones that are from a digital camera I think. In these cases getimagesize() returns false.
I've read that there are a few types of .jpeg files, but can't find a way to convert them all to a type that works with getimagesize().
The files that don't work have large dimensions, like a few thousand px, so I thought it could be a memory problem...but I don't get any error about memory. They also don't return any info for exif_imagetype().
Does anyone know if it's possible to convert these somehow to a format that getimagesize() will accept?
What that means is a compressed file - JPG - is turned into a literal bitmap uncompressed file in memory, which can be huge, and which will definately kill your server on larger images due to memory usage. For large manipulations like this you'll need to use Imagick and ImageMajick.
A third possibility is newer jpg versions may not get recognized, but I don't know a whole lot about the specifics of this (and may be a goose chase.)
upload_max_filesize is set to 24M according to my cpanel. I'm on shared hosting so I guess Imagick and ImageMajick aren't an option because they don't seem to be supported.
Thanks for the suggestions anyway, I'll do some more reading. The images are quite old so maybe they are just freaks and I shouldn't worry about them...just ask users to upload a different kind or something.