PHP: Determine Visually Corrupted Images (yet valid) downloaded via Curl with GD/Imagemagick

前端 未结 4 608
执念已碎
执念已碎 2020-12-10 07:54

I\'m using Curl via Proxies to download images with a scraper I have developed.

Unfortunately, it gets the odd image which looks like these and the last one is compl

4条回答
  •  感动是毒
    2020-12-10 08:14

    ImageMagick's identify command will identify far more corrupt images if you call it with the -verbose option. And there's a -regard-warnings option as well, which will make it treat warnings as errors. Try these against a bad image, and see if the result is a non-zero error code.

提交回复
热议问题