Not sure this was solved.

On 13.Mar, 2009, at 5:45 , Joe Turner wrote:

NSImage *original = [NSImage imageNamed:NSImageNameComputer];
                [original setSize:NSMakeSize(10.0f, 10.0f)];

-> this will not make your bitmap 10x10 pixels, but just change the DPI settings to make sure it is seen as 10x10 points in size. So it might be the reason you are running into size restrictions, if your original image is large (in terms of pixels).

                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];


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to