Forum Moderators: coopster
For example:
That one isn't fully uploaded, so we don't need it
(if you can see there is blank space in the bottom of the picture):
<snipped image>
or like that one:
<snipped image>
But that one is fully uploaded, so we need it:
<snipped image>
There is anyway to check if the image is fully uploaded or not?
I hope you understand what I mean.
Sorry if my English isn't good.
Thanks in advance.
[edited by: coopster at 8:45 pm (utc) on July 27, 2009]
[edit reason] removed external image links [/edit]
function delete_if_broken($imgname)
{
if (!$im=imagecreatefromjpeg($imgname)) unlink($imgname);
imagedestroy($im);
}
header('Content-type: image/jpeg');
$image = "http://i29.tinypic.com/m8eetv.jpg";
$img = delete_if_broken($image);
imagejpeg($img);
imagedestroy($img);
The function 'imagecreatefromjpeg()' doesn't return error when the image is damaged..
and that picture is fine, but return error..
anything else? =\