RsD0p9BK
6/3/2015 - 11:33 AM

check__iamge_corrupted.php

// check if image is corrupted
if (!$img = @imagecreatefromstring(file_get_contents("..."))) {
  die(error_get_last()['message']);
}

// http://stackoverflow.com/questions/24214685/how-to-catch-invalid-image-when-using-php-imagecreatefromstring
// http://stackoverflow.com/questions/1401527/how-do-i-programmatically-check-whether-an-image-png-jpeg-or-gif-is-corrupte