Re: Gif to TIFF and transparency
Re: Gif to TIFF and transparency
- Subject: Re: Gif to TIFF and transparency
- From: Brian Webster <email@hidden>
- Date: Sat, 29 Jun 2002 16:37:52 -0500
On Friday, June 28, 2002, at 02:07 PM, cocoa-dev-
email@hidden wrote:
Is there a way to take this gif image and transform it so that we can
replace the selected transparent pixel to white as it appears when
inserted in a regular View?
I'm not certain this will work, as it depends on whether NSImage
recognizes the transparent pixel when reading in a GIF, but you
could try it and see. Create a new NSImage (using
-initWithSize), lock focus on it, fill it with [NSColor
clearColor], and then composite the GIF onto it using
NSCompositeSourceOver for the operation. If NSImage respects
the transparent pixel when drawing, this should result in an
image with the correct translucency that you can then save to a
file.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.