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: Kenny Leung <email@hidden>
- Date: Sun, 23 Apr 2006 10:48:32 -0700
Hi All.
I just discovered that NSImage will also read the same data. I could
have saved myself a bunch of work!
-Kenny
On Apr 23, 2006, at 8:50 AM, Kenny Leung wrote:
Hi All.
Thanks for the pointers on this. I eventually got it to work with
QDPictCreateWithProvider. As it turns out, I got the file format
wrong and started reading the PICT data at the wrong point. The
correct location of the header marker seems to be 10 bytes into the
beginning of the data. The first 10 bytes seem to differ from image
to image, so I don't know what they mean.
-Kenny
On Apr 21, 2006, at 1:20 PM, Scott Thompson wrote:
On Apr 21, 2006, at 11:12 AM, Kenny Leung wrote:
I have been uniformly unsuccessful in trying to read PICT data
embedded in a data file. I have the specs for the data file, so
I'm pretty sure I'm doing things right.
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?
Where is your PICT data coming from? I've had no trouble using
QDPictCreateWithProvider to convert PICT data into PDF files.
I don't know about your particular case, but 96 bytes of 0's
doesn't sound right. Usually PICT data either has a 512 byte
header or no header. However I don't think the version bytes (the
0x001102FF) are the very beginning of the header. I believe you
have to back up a few bytes from there.
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40pobox.com
This email sent to email@hidden
_______________________________________________
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