IMG_jpg.c
changeset 109 0d1bd5675598
parent 108 a02f321125f1
child 117 e613cf987897
     1.1 --- a/IMG_jpg.c	Sun Aug 21 07:13:02 2005 +0000
     1.2 +++ b/IMG_jpg.c	Thu Sep 08 07:28:12 2005 +0000
     1.3 @@ -47,6 +47,12 @@
     1.4  	if ( SDL_RWread(src, magic, 2, 1) ) {
     1.5  		if ( (magic[0] == 0xFF) && (magic[1] == 0xD8) ) {
     1.6  			SDL_RWread(src, magic, 4, 1);
     1.7 +
     1.8 +			/* skip IPTC info block if it exists... */
     1.9 +			if ( (magic[0] == 0xFF) && (magic[1] == 0xED) ) {
    1.10 +				SDL_RWseek(src, (((Uint16)magic[2] << 8) |magic[3]) + 2, SEEK_CUR);
    1.11 +			}
    1.12 +
    1.13  			SDL_RWread(src, magic, 4, 1);
    1.14  			if ( memcmp((char *)magic, "JFIF", 4) == 0 ||
    1.15  			     memcmp((char *)magic, "Exif", 4) == 0 ||