corrupt image when viewed using PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI all,

We have written an app in PHP4 that receives images from mobile phones that are taken with the camera, we have found a problem that some of the images are corrupt and we have determined that it is because of Nokia VGA cameras that have sent the image, basically the jpegs are fine but the extra info that comes with the jpeg is corrupt, therefore PHP wont open the image, with all other photos its fine.

We found that i PHP 5 there is a setting that you can change to tell PHP how strict to be when opening an image. That will work but now we'd have to change the whole site to be PHP5 compliant and also test it on a new server which is really alot of work and undesireable.

We also found another possible solution being that we use ImageMagick to convert the jpeg to a jpeg, then it will load properly. But now we would have to convert each image that comes in and maybe only 10% of the images come from a Nokia VGA camera, ImageMagick also has to be run from the command line (would this affect the performance of the site?). Would you suggest using ImageMagick to convert the images each time a new one is uploaded? Or does anyone have a better solution for this?

Thanks in advance.
--
------------------------------------------------------------------------
Angelo Zanetti
Systems developer
------------------------------------------------------------------------

*Telephone:* +27 (021) 469 1052
*Mobile:*       +27 (0) 72 441 3355
*Fax:*            +27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* angelo@xxxxxxxxxxxx <mailto:angelo@xxxxxxxxxxxx>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux