Getting NSData out of an NSImage
Getting NSData out of an NSImage
- Subject: Getting NSData out of an NSImage
- From: "Bobby B" <email@hidden>
- Date: Fri, 7 Apr 2006 19:38:31 -0400
Hey guys!
I feel bad posting this so soon after my fiasco with the tooltips..
Here's what I want to do.
I have an NSImage that I load from a file. I load it, and I draw on
it. Now, I want to take this image and put it into a NSData format,
to store it as a binary attribute in a CoreData program.
I can't seem to figure out how to get an NSData representation of
NSImage. I can do it the other way (get an NSImage from NSData), but
that doesn't help. I looked at NSBitmapImageRep, but that didn't help
because it didn't allow me a way to draw to it like I did in NSImage
(I just used drawAtPoint withAttributes:, I just needed to draw a
string.)
The point of all this is to draw a little string on a graphic and put
it into a coredata database so that it can be recalled later.
I could even get this all to work if I could somehow save an NSImage
as a file. Or, maybe it's possible to copy the NSImage to the
clipboard and paste it as NSData?
I hope everyone is doing ok,
Bobby
_______________________________________________
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