Fixed JPEG recognition

This commit is contained in:
Matteo Paonessa 2017-03-07 11:33:58 +01:00
parent b54d117c86
commit 52e57259df
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ image_type detect_image_type(FILE *pFile)
return UNKN;
}
if (buffer[0] == 0xFF && buffer[1] == 0xFF) {
if (buffer[0] == 0xFF && buffer[1] == 0xD8) {
return CS_JPEG;
} else if (buffer[0] == 0x89 && buffer[1] == 0x50) {
return CS_PNG;