enum {
JPEG_MARKER_SOI = 0xd8,
+ JPEG_MARKER_DQT = 0xdb,
JPEG_MARKER_JFIF = 0xe0,
JPEG_MARKER_EXIF = 0xe1,
JPEG_MARKER_COMM = 0xfe,
JPEG_MARKER_SOF0 = 0xc0,
+ JPEG_MARKER_SOF1 = 0xc1,
+ JPEG_MARKER_SOF2 = 0xc2,
+ JPEG_MARKER_SOF9 = 0xc9,
+ JPEG_MARKER_SOF10 = 0xca,
JPEG_MARKER_SOS = 0xda
};
return -3;
}
- if (buf[1] == JPEG_MARKER_SOF0) {
+ if (buf[1] == JPEG_MARKER_SOF0 ||
+ buf[1] == JPEG_MARKER_SOF1 ||
+ buf[1] == JPEG_MARKER_SOF2 ||
+ buf[1] == JPEG_MARKER_SOF9 ||
+ buf[1] == JPEG_MARKER_SOF10) {
if (_jpeg_sof_process(fd, &info->width, &info->height) != 0)
return -4;
found++;
r = -3;
goto done;
}
- } else if (type == JPEG_MARKER_JFIF) {
+ } else if (type == JPEG_MARKER_JFIF || type == JPEG_MARKER_DQT) {
if (_jfif_data_get(fd, len, &info) != 0) {
fprintf(stderr, "ERROR: could not get JPEG size (%s).\n",
finfo->path);