Re: Manipulating images with meta-data
Re: Manipulating images with meta-data
- Subject: Re: Manipulating images with meta-data
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 03 Jun 2008 11:10:16 -0700
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 (email@hidden)
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:
This email sent to email@hidden