• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Transparent Image into Clipboard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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] setData: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.

  • Prev by Date: Programming a game
  • Next by Date: Exception Handling in 10.3
  • Previous by thread: Re: Programming a game
  • Next by thread: Exception Handling in 10.3
  • Index(es):
    • Date
    • Thread