Constructing an Image
Constructing an Image
- Subject: Constructing an Image
- From: Adam Atlas <email@hidden>
- Date: Thu, 28 Mar 2002 14:36:53 -0500
I finally got my pxm#-handling code working. Thanks to everyone who
responded, aside from those two people who must have accidentally
replied to the wrong message. Now I have one more question: My program
needs to convert the resulting Carbon QuickDraw PixMap handle into an
NSImage. I already found the Carbon API that reads an RGB color from any
given x,y point in the current graphics port, and converting that into
an NSColor is no problem, but then how do I put the resulting color into
the corresponding point in an NSImage of the same size?
I assume the code will use nested for-loops to transfer each pixel, y on
the outside and x on the inside, and then NSMakePoint(x,y), but what do
I do with the point? Or am I going the wrong way? I couldn't find
anything about this in NSImage or NSBitmapImageRep or any of the other
image classes.
Thanks.
--
Adam Atlas
Atomm Software
http://www.atommic.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.