Re: Removing alpha channel (transparency) from NSImage?
Re: Removing alpha channel (transparency) from NSImage?
- Subject: Re: Removing alpha channel (transparency) from NSImage?
- From: Laurent Daudelin <email@hidden>
- Date: Thu, 1 Apr 2010 16:57:48 -0700
On Apr 1, 2010, at 16:38, Jens Alfke wrote:
> On Apr 1, 2010, at 4:29 PM, Laurent Daudelin wrote:
>
>> Anybody has a quick way to remove the alpha channel from an NSImage before I save it as a PNG? I've looked everywhere I didn't find anything obvious.
>
> I think you can draw a solid white rectangle over it using the proper compositing mode and it will replace the transparent parts. I can never keep the different compositing modes straight, but I think NSCompositeDestinationOver might work.
Thanks, Jens. That seems to have done the trick!
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org
Logiciels Nemesys Software email@hidden
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden