Fix overly restrictive JPEG filter (#81)

See https://github.com/fltk/fltk/issues/81

Fixes #81
This commit is contained in:
Albrecht Schlosser 2020-06-15 02:17:20 +02:00
parent 7a108b3723
commit d4d2136b3b

View File

@ -81,10 +81,8 @@ fl_check_images(const char *name, // I - Filename
#endif // HAVE_LIBPNG
#ifdef HAVE_LIBJPEG
if (memcmp(header, "\377\330\377", 3) == 0 &&
// Start-of-Image
header[3] >= 0xc0 && header[3] <= 0xef)
// APPn for JPEG file
if (memcmp(header, "\377\330\377", 3) == 0 && // Start-of-Image
header[3] >= 0xc0 && header[3] <= 0xfe) // APPn .. comment for JPEG file
return new Fl_JPEG_Image(name);
#endif // HAVE_LIBJPEG