class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Same deal for me with a PNG file. The file is corrupt I'm sure but this brought my system to a halt. Is there a way to test a file compatibility before doing a process call? So that I can let users know the file is faulty before my system tries to resize it?
There isn't really a way to check whether the file is corrupted or not. It could be possible, but would be a quite large endeavor, and in fact will probably amount to load it with GD to check it, which is actually what seems to be causing problems anyway.
Yes, please, send me the corrupted file, I'll have a look at it.Reply
Do you want me to send you my broken png?
Yes, please, send me the corrupted file, I'll have a look at it.