Wrong Exif Id in io-jpeg.c?

2009-03-16 Thread Paul Stuart
Hi,
 Per the Exif specification, and the comments within io-jpeg.c, the 6 byte Exif 
Marker (APP1 marker) should be  0x45786966, or Exif\0\0.

But, in  io-jpeg, they've defined:
#define EXIF_IDENT_STRING  Exif\000\000

which in hex would be 0x457869660030 by my count.

In the code that follows, we see:
.
.
.
/* The Exif APP1 marker should contain a unique 
identification string (Exif\0\0). Check for it. */
if (!memcmp (cmarker-data, EXIF_IDENT_STRING, 6)) {
exif_marker = cmarker;
}
.
.
.
So, the author of the comment alluded to the correct identification string, but 
wasn't using it for the check. 

Since this is still in the most recent code, I'm wondering if I'm missing 
something, or if this is a bug.


thanks!
paul
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


Re: Wrong Exif Id in io-jpeg.c?

2009-03-16 Thread Robert Pearce

On Mon, 16 Mar 2009, Paul Stuart paul_stu...@seektech.com wrote :

But, in  io-jpeg, they've defined:
#define EXIF_IDENT_STRING  Exif\000\000

which in hex would be 0x457869660030 by my count.


I'm not quite sure how you reckon that. Escaped numbers in C strings are 
evaluated as octal, so seeing three digits is quite normal. The compiler 
will regard \000 as a single zero byte.

--
Rob Pearce   http://www.bdt-home.demon.co.uk

The contents of this | Windows NT crashed.
message are purely   | I am the Blue Screen of Death.
my opinion. Don't| No one hears your screams.
believe a word.  |
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: Wrong Exif Id in io-jpeg.c?

2009-03-16 Thread Paul Stuart
Huh, didn't know that. Thanks!

From: gtk-list-boun...@gnome.org [gtk-list-boun...@gnome.org] On Behalf Of 
Robert Pearce [...@bdt-home.demon.co.uk]
Sent: Monday, March 16, 2009 2:29 PM
To: gtk-list@gnome.org
Subject: Re: Wrong Exif Id in io-jpeg.c?

On Mon, 16 Mar 2009, Paul Stuart paul_stu...@seektech.com wrote :
But, in  io-jpeg, they've defined:
#define EXIF_IDENT_STRING  Exif\000\000

which in hex would be 0x457869660030 by my count.

I'm not quite sure how you reckon that. Escaped numbers in C strings are
evaluated as octal, so seeing three digits is quite normal. The compiler
will regard \000 as a single zero byte.
--
Rob Pearce   http://www.bdt-home.demon.co.uk

The contents of this | Windows NT crashed.
message are purely   | I am the Blue Screen of Death.
my opinion. Don't| No one hears your screams.
believe a word.  |
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list