• 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
Re: Removing alpha channel (transparency) from NSImage?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Removing alpha channel (transparency) from NSImage? (From: Laurent Daudelin <email@hidden>)
 >Re: Removing alpha channel (transparency) from NSImage? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Using the #import directive
  • Next by Date: Re: Using the #import directive
  • Previous by thread: Re: Removing alpha channel (transparency) from NSImage?
  • Next by thread: Re: Detecting which MKAnnotation Detail Disclosure was touched
  • Index(es):
    • Date
    • Thread