Creating NSBitmapImageRep from NSImage
Creating NSBitmapImageRep from NSImage
- Subject: Creating NSBitmapImageRep from NSImage
- From: email@hidden
- Date: Mon, 10 Sep 2001 17:35:50 -0700
A question for the NSImage gurus:
I would like to create an NSBitmapImageRep of the highest resolution,
highest depth representation of an NSImage. The only way I've found to
do this is to create an array of NSBitmapImageReps from the NSData
returned by NSImage.TIFFRepresentation() and search the array of
NSBitmapImageReps for the highest res., deepest one.
This doesn't feel very elegant, and certainly uses effort than should be
necessary, so I must have overlooked something. Obviously NSImage can
create TIFF data from any of its representations, so it seems that I
should be able to search the array of NSImageReps returned by
NSImage.representations() and only convert the one I'm interested in to
TIFF data, but how? Or is there an even better way?
TIA,
barry "the very impressed cocoa newbie"