From 2c74770588b0b9dec03c82ba7dc4bcce355500d5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 21 Aug 2005 07:13:02 +0000 Subject: [PATCH] Date: Fri, 05 Aug 2005 16:52:24 +0900 From: Toshio KATO Subject: Jpeg file load error I can not load Jpeg file format except JFIF or Exif. My Jpeg file is as following; FF D8 FF E2 00 0E 56 56 4C 00 30 30 0A 00 00 00 00 00 FF DB 00 84 00 0C 08 09 0A 09 07 0C 0A 0A 0A 0D 0D 0C 0E 12 1E 13 12 10 10 12 25 1A 1C 16 1E 2B 26 2E 2D 2B 26 2A 29 30 36 45 3A 30 33 41 34 29 2A 3C 52 3D 41 47 49 4D 4E 4D 2E 3A 55 5B 54 4B 5A 45 4C 4D 4A 01 0D 0D 0D 12 10 12 23 13 13 23 4A 31 2A 31 4A 4A 4A 4A 4A 4A 4A ....................... 56 56 4c="VVL" For the present I patched the IMGjpeg.c and compile. load and disp ok! --- IMG_jpg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IMG_jpg.c b/IMG_jpg.c index 4a0e9279..114f4a7d 100644 --- a/IMG_jpg.c +++ b/IMG_jpg.c @@ -49,7 +49,8 @@ int IMG_isJPG(SDL_RWops *src) SDL_RWread(src, magic, 4, 1); SDL_RWread(src, magic, 4, 1); if ( memcmp((char *)magic, "JFIF", 4) == 0 || - memcmp((char *)magic, "Exif", 4) == 0 ) { + memcmp((char *)magic, "Exif", 4) == 0 || + memcmp((char *)magic, "VVL", 3) == 0 ) { is_JPG = 1; } }