且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

有效检测损坏的jpeg文件?

更新时间:2023-11-29 16:22:28

在命令行中,您可以使用jpeginfo来确定jpeg文件是否正常.

From the command line you can use jpeginfo to find out if a jpeg file is OK or not.

$ jpeginfo -c test.jpeg

$ jpeginfo -c test.jpeg

test.jpeg 260 x 264 24位JFIF N 15332 [确定]

test.jpeg 260 x 264 24bit JFIF N 15332 [OK]

从php调用jpeginfo应该很简单.

It should be trivial to call jpeginfo from php.