Re: Determining image file types
Re: Determining image file types
- Subject: Re: Determining image file types
- From: Freek Dijkstra <email@hidden>
- Date: Thu, 10 Jun 2004 14:44:37 +0200
On 10-06-2004 13:41, "Michael Becker" <email@hidden> wrote:
>
How can I check a file whether it is a valid JPEG image?
I do not know if there is a nice and clean Cocao method to do this.
However, if there is not, I recommend to look at the file signature.
I'm sure the standard is on the web somewhere -- you should look for "JFIF"
somewhere in the first bytes. Be sure that if you decide to choose this
approach to support all types of JPEG files. I recall there is a new
formatl, JPEG 2000, and you may either explicitly decide to or not to allow
that format. (And if you don't find the specs, have a look yourself with
GraphicConvertor and a simple HexEditor).
Regards,
Freek
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.