I'd like to wean myself off of GWorlds to do image processing on
images in Carbon width Core Graphics, so I'd like to access pixels at
the native resolution. Is there an easy way of doing this? Near as I
can figure out, I need to call :
CGImageSourceCreateWithURL
CGImageSourceCreateImageAtIndex
to read the image file, then call
CGImageGetBitmapInfo
CGImageGetBitsPerComponent(
CGImageGetBitsPerPixel
CGImageGetColorSpace
CGImageGetWidth
CGImageGetHeight
to get enough information to create a Bitmap context with
CGBitmapContextCreate
which is then populated with pixels from the image file with
CGContextDrawImage
Is this right?
Cocoa has a nice method to do this in one line
NSBitmapImageRep *srcImageRep = [NSBitmapImageRep imageRepWithData:
[srcImage TIFFRepresentation]];
Is there something like this for Carbon?
--
Ken Turkowski
turk@real...
Reality Pixels
http://www.realitypixels.com
Computer Graphics 2D 3D Immersive Imagery
Photo-mosaicing Panoramas Computer Vision
Applied Mathematics Numerical Analysis Optimization
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (
Carbon-dev@list...)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/subscriber%40opensubscriber.com
This email sent to
subscriber@open...
opensubscriber is not affiliated with the authors of this message nor responsible for its content.