I have an image field in a MSSQL 2008 R2 database that I am trying to import into into another system using php. My problem is that I need to know the filetype.
I seem to be having a problem when the data is not jpg.
I am using imagecreatefromstring to turn the field contents into an image. And then imagejpeg to save the image to a file. I am getting errors on images that the client says are png.
Is there a way I can find out the filetype of the image?