On Jun 3, 2008, at 11:03 AM, Randall Meadows wrote:
Except that I'm not going to be able to use jpegexiforient, because the image file apparently isn't in the correct form it wants. This test fails:

/* Read File head, check for JPEG SOI + Exif APP1 */
for (i = 0; i < 4; i++)
exif_data[i] = (unsigned char) read_1_byte();
if (exif_data[0] != 0xFF ||
  exif_data[1] != 0xD8 ||
  exif_data[2] != 0xFF ||
  exif_data[3] != 0xE1)
return 0;

since the 4th byte (exif_data[3]) is 0xE0. I don't really know what that means, other than I guess I'm back to square one trying to rotate an image, and update and preserve all the meta-data.

Guess I'm off to read the spec, unless anyone's got any great ideas for me. Please? Pretty please?

According to...

        http://www.astro.keele.ac.uk/oldusers/rno/Computing/File_magic.html

... the fourth byte should be 0xE0 in a JPEG. A bit of googling reveals that the first four bytes might be either FFD8FFE0 or FFD8FFE1.

b.bum



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to