Re: Reading Adobe Photoshop header, Obj-C
Re: Reading Adobe Photoshop header, Obj-C
- Subject: Re: Reading Adobe Photoshop header, Obj-C
- From: James Merkel <email@hidden>
- Date: Tue, 28 Jun 2011 16:53:03 -0700
On Jun 28, 2011, at 4:35 PM, John Joyce wrote:
On Jun 28, 2011, at 6:18 PM, James Merkel wrote:
Kevin,
As others have suggested you probably want to step down to more
basic C coding to handle this task.
You can just use C library functions to read data from the file:
fopen(), fseek(), fread(), fgetc(), fclose() etc. as discussed in
Kernighan and Ritchie.
As far as big endian, little endian issues, most image files use
the convention 'MM' for big endian or 'II' for little endian
somewhere in the first few bytes of the file. You then need to load
the data accordingly. For example looking at a Photoshop Elements
file, I see "MM' (two ASCII characters) as the first two bytes of
the file, announcing that the file is big endian.
A tool that may be helpful for you in looking at file data directly
is a Hex Editor. I use HexEdit which is freeware. Beware-- a Hex
Editor is a sharp tool, you can open any file on your system and
modify it.
Jim Merkel
Synalyzeit is a free hex editor that's fabulous.
Thanks, I'll take a look at that. HexEdit is getting a little dated.
Jim Merkel
_______________________________________________
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