NSImage vs CGImage
NSImage vs CGImage
- Subject: NSImage vs CGImage
- From: "Barry" <email@hidden>
- Date: Sun, 17 Jun 2007 12:33:15 +0100
I'm writing an app which needs to read an image, convert pixel data to L*a*b
(if not already in this colorspace), do some maths on this data & write a
set of grayscales.
Since I'm very new to cocoa I've trawled the 'net looking for samples.
First ImageApp looked promising - it read & displayed almost every image I
could find (Tiff, JPG, sRGB,WideGamut, L*a*b). It used CGImage's but I could
not get hold of the RAW (original file) data. I tried creating a Lab
colorspace with CGColorSpaceCreateLab and then a CGBitmapContext. Then
CGContextDrawImage & CGBitmapContextGetData but a deadend awaited - cannot
do this with Lab !
Back to another sample app. Thuis time it uses NSImage's
This has the advantage that I can get the bitmapdata from the
NSBitmapImageRep.
Sadly the app does not open images containing L*a*b colorspace data.
Any suggestions very welcome.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden