Re: Gif to TIFF and transparency
Re: Gif to TIFF and transparency
- Subject: Re: Gif to TIFF and transparency
- From: Renaud Boisjoly <email@hidden>
- Date: Sun, 30 Jun 2002 21:42:32 -0400
Hi Brian
Thanks for the idea... but I think it didn't work.
What happens is that when I try to put the TIFF representation of this
gif onto the Pasteboard, it still gets a black background...
What I tried which works but is slow, is to load a second image from a
white jpeg file and composite that just before the gif... prtobably not
pretty, but I wanted to see if it would work. It does... and it probably
shows how much of a novice I am at all this ;-)
So now I'm trying to create a bezier path (rect) to fill an NSImage to
render that instead of my large white image because that is too slow...
but I cannot figure it out.
Ca someone point me to the steps required to simply draw a white
rectangle the size of an NSImage I create with initWithSize? It seems a
little convoluted to me...
thanks for your help!
Renaud
On Saturday, June 29, 2002, at 05:37 PM, Brian Webster 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.
_______________________________________________
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.