Re: Trying to read PICT data using Quartz functions
Re: Trying to read PICT data using Quartz functions
- Subject: Re: Trying to read PICT data using Quartz functions
- From: glenn andreas <email@hidden>
- Date: Wed, 26 Apr 2006 09:14:27 -0500
On Apr 26, 2006, at 5:39 AM, Uli Kusterer wrote:
Am 21.04.2006 um 18:12 schrieb Kenny Leung:
I have tried extracting the data and sending it to the functions
QDPictCreateWithProvider and CGImageCreateWithJPEGDataProvider,
which both return NULL. The PICT data seems to have all 0's in the
beginning and start with the PICT header code 0x001102FF at 0x60
into the data. I have tried starting at 0 and at the PICT header
and neither have worked.
Does anyone have more experience with PICTs?
Perhaps you are running afoul of the 512-byte PICT File header?
While PICTs themselves don't have this header, PICT files left 512
bytes free at the start of each file to store application-specific
data. AFAIK nobody ever used this, but it's there. So if your file
format just imported the file straight, you may have to strip off
that header for it to work.
MacDraw kept the document specific set of patterns there (and it was
the first publicly available app to be able to create a PICT file),
and I seem to remember seeing stuff there from other things as well.
Later app specific comments were added to allow application to add
their own information.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden