Re: How do I convert data in NSString to NSImage
Re: How do I convert data in NSString to NSImage
- Subject: Re: How do I convert data in NSString to NSImage
- From: Ivan Myrvold <email@hidden>
- Date: Wed, 10 Sep 2003 09:23:12 +0200
Got it working this way:
NSString *picstr; // the string with jpeg data
NSData *picdata = [NSData dataWithBytes:[picstr cString] length:[picstr
cStringLength]]; // now picdata contains the jpeg data
NSImage *myPicture = [[NSImage alloc] initWith
Data:picdata]; // now we
have the NSImage
Ivan
Pe onsdag, 10. september 2003, kl. 08:14, skrev Ivan Myrvold:
I have jpeg that is read in to an NSString. How do I convert this to
an NSImage?\
Ivan
_______________________________________________
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.
_______________________________________________
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.