Re: NSImageView PICTRepresentation?
Re: NSImageView PICTRepresentation?
- Subject: Re: NSImageView PICTRepresentation?
- From: George Lawrence Storm <email@hidden>
- Date: Fri, 8 Oct 2004 14:36:07 -0700
On Oct 8, 2004, at 8:39 AM, Robert Clair wrote:
Unlike TIFFRepresentation which is part of both NSImage and
NSBitmapImageRep, PICTRepresentation is only part of NSPICTImageRep.
How can access it so I can get a copy of my PICT data?
That's your problem right there - you don't *have* any PICT data.
- [NSPICTImageRep PICTRepresentation] will only return you the data
from
an NSPICTImageRep that was created from a PICT in the first place.
Baring that, the only way (at least that I know) to get PICT data
would be
to get the bitmap pixels directly and then use Quickdraw to make a
PICT with that
data. Of how to do that, I remain cheerfully innocent.
Bob Clair
Based on your response I assume that NSImage will create an instance of
NSBitmapImageRep if I feed NSImage a PICT to begin with and will not
create one if any other type is feed to it.
That brings up my next assumption/question:
If there may or may not be an instance of NSBitmapImageRep at the time
of my drag operation I assume I need to search the NSArray returned by
-representations: to find if it exists if I am asked to return PICT
data on my pasteboard. I also assume I will have to do the same when I
declare types for my pasteboard.
Q: Is there an equivalent to NSArray -firstObjectCommonWithArray: for
classes (-firstClassCommonWithArray:?) or do I need to roll my own?
-----
George Lawrence Storm
Macintosh Applications Development
Snohomish (Seattle), Washington
E-mail: <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