We need to determine if the image is a PNG or a JPEG
PNGs are easier to detect because they have a unique signature (http://www.w3.org/TR/PNG-Structure.html)
The first eight bytes of a PNG file always contain the following (decimal) values:
137 80 78 71 13 10 26 10
我们需要确定PNG和JPEG图像png更容易检测,因为他们有一个独特的签名(http://www.w3.org/TR/PNG-Structure.html)
第一个8字节的PNG文件总是包含以下(十进制)值:
137 80 78 71 13 10 26 10