Transparent Image into Clipboard?
Transparent Image into Clipboard?
- Subject: Transparent Image into Clipboard?
- From: David Dauer <email@hidden>
- Date: Sun, 16 Nov 2003 14:47:05 +0100
Hello
I want to store an NSImage (gif, WITH transparent areas) in the clipboard.
I'm doing
[code]
NSData *tiffData;
NSImage *image = [[NSImage alloc] initWithContentsOfFile:[[self bundle]
pathForImageResource:@"icon_lol"]];
iffData = [image TIFFRepresentation];
[[NSPasteboard generalPasteboard] declareTypes:[NSArray
arrayWithObjects:NSTIFFPboardType, nil] owner:nil];
[[NSPasteboard generalPasteboard] set
Data:tiffData
forType:NSTIFFPboardType];
[/code]
But the image will be gray in the area which should be transparent.
How to avoid this?
Thanks
David
_______________________________________________
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.