Date: Fri, 05 Aug 2005 16:52:24 +0900
authorSam Lantinga <slouken@libsdl.org>
Sun, 21 Aug 2005 07:13:02 +0000
changeset 108a02f321125f1
parent 107 9e398cda415f
child 109 0d1bd5675598
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
     1.1 --- a/IMG_jpg.c	Sun May 15 16:29:13 2005 +0000
     1.2 +++ b/IMG_jpg.c	Sun Aug 21 07:13:02 2005 +0000
     1.3 @@ -49,7 +49,8 @@
     1.4  			SDL_RWread(src, magic, 4, 1);
     1.5  			SDL_RWread(src, magic, 4, 1);
     1.6  			if ( memcmp((char *)magic, "JFIF", 4) == 0 ||
     1.7 -			     memcmp((char *)magic, "Exif", 4) == 0 ) {
     1.8 +			     memcmp((char *)magic, "Exif", 4) == 0 ||
     1.9 +			     memcmp((char *)magic, "VVL", 3) == 0 ) {
    1.10  				is_JPG = 1;
    1.11  			}
    1.12  		}