corrected wrong offset for "Exif" bytes

This commit is contained in:
ErrorFlynn 2019-03-07 12:42:59 -05:00 committed by GitHub
parent fd8261c6a2
commit 845dda8c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,7 @@ namespace paint
//JFIF
if (bytes > 11 && (0xe0ffd8ff == *reinterpret_cast<const unsigned*>(data)) && 0x4649464A == *reinterpret_cast<const unsigned*>(reinterpret_cast<const char*>(data)+6))
ptr = std::make_shared<detail::image_jpeg>();
else if (bytes > 9 && (0x66697845 == *reinterpret_cast<const unsigned*>(reinterpret_cast<const char*>(data)+5))) //Exif
else if (bytes > 9 && (0x66697845 == *reinterpret_cast<const unsigned*>(reinterpret_cast<const char*>(data)+6))) //Exif
ptr = std::make_shared<detail::image_jpeg>();
#endif
if ((!ptr) && (bytes > 40))