Re: TXT Records with NSImages
Re: TXT Records with NSImages
- Subject: Re: TXT Records with NSImages
- From: Joe Turner <email@hidden>
- Date: Fri, 13 Mar 2009 07:45:59 -0500
Here:
NSImage *original = [NSImage imageNamed:NSImageNameComputer];
[original setSize:NSMakeSize(10.0f, 10.0f)];
NSData *image = [original TIFFRepresentation];
NSBitmapImageRep *imageRep = [NSBitmapImageRep
imageRepWithData:image];
NSData *finalData = [imageRep representationUsingType:NSPNGFileType
properties:nil];
NSDictionary *txtRecord = [NSDictionary
dictionaryWithObject:finalData forKey:@"image"];
NSData *data = [NSNetService dataFromTXTRecordDictionary:txtRecord];
if (data)
NSLog(@"Data is not nil!");
[netService setTXTRecordData:data];
Joe
On Mar 13, 2009, at 7:30 AM, Michael Ash wrote:
On Fri, Mar 13, 2009 at 8:12 AM, Joe Turner <email@hidden> wrote:
Actually, I am converting it to NSData, and then adding it, and it
still
returns nil
Post code.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden