comparison src/format_fuji.c @ 108:9c355d5c8619

Fri Nov 10 16:11:28 2006 John Ellis <johne@verizon.net> * format_fuji.c (format_fuji_raw): Use exif_byte_get_int32() to get the value, as when that is eventually fixed to be alignment safe, the so shall this.
author gqview
date Fri, 10 Nov 2006 21:15:52 +0000
parents 847e4bc6b54c
children 71e1ebee420e
comparison
equal deleted inserted replaced
107:a01d8c49ca2f 108:9c355d5c8619
47 { 47 {
48 return FALSE; 48 return FALSE;
49 } 49 }
50 50
51 /* offset to jpeg is embedded at bytes 84-87 */ 51 /* offset to jpeg is embedded at bytes 84-87 */
52 io = GUINT32_FROM_BE(*(guint32*)(data + 84)); 52 io = exif_byte_get_int32(data + 84, EXIF_BYTE_ORDER_MOTOROLA);
53 if (io + 4 > len) return FALSE; 53 if (io + 4 > len) return FALSE;
54 54
55 /* verify jpeg marker */ 55 /* verify jpeg marker */
56 if (memcmp(data + io, "\xff\xd8\xff\xe1", 4) != 0) 56 if (memcmp(data + io, "\xff\xd8\xff\xe1", 4) != 0)
57 { 57 {