Re: NSImage get / set Pixels
Re: NSImage get / set Pixels
- Subject: Re: NSImage get / set Pixels
- From: glenn andreas <email@hidden>
- Date: Thu, 16 Mar 2006 09:13:31 -0600
On Mar 16, 2006, at 8:57 AM, goessly wrote:
I'd like to copy a pixel to an NSImage *outputImage (at the NSPoint
*targetCoordinates).
The pixel is to be read from another NSImage *inputImage (at the
NSPoint *sourceCoordinates).
Something like
[outputImage drawAt: targetCoordinates copiedPixelFrom: [inputImage
pixelAt: sourceCoordinates] ]
How can I accomplish this? NSImage seems to lack getters / setters
for pixels at given coordinates.
NSImages don't always have pixels (or can have more than one set of
them). NSImages are a collection of NSImageReps, allowing for
different representation to be used at different resolutions/image
depth/profile. You want to look at the individual image
representations that make up an NSImage, but even then, there may not
be pixels - consider a PDF image, for example.
NSBitmapImageRep, however, have things like get/setPixel.
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
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