• 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: Inverting an NSImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inverting an NSImage


  • Subject: Re: Inverting an NSImage
  • From: email@hidden
  • Date: Sat, 8 Feb 2003 16:51:01 +0100

On samedi, fivrier 8, 2003, at 12:50 PM, Arthur VIGAN wrote:

Hi,

I have a black and white NSImage, and I would like to know if it is possible to invert this image (ie making white pixels black, and black pixels white)?

Link:

http://developer.apple.com/samplecode/Sample_Code/Graphics_2D/ Image_Difference.htm

This code can be optimized I think as it's using:

pixel = 255-pixel;

to invert the value, when this might be faster to do:

pixel=~pixel;

and this might be even 32 bits optimized for B&W Bitmaps.
_______________________________________________
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.

  • Follow-Ups:
    • Re: Inverting an NSImage
      • From: "John C. Randolph" <email@hidden>
References: 
 >Inverting an NSImage (From: Arthur VIGAN <email@hidden>)

  • Prev by Date: Re: Move Mouse
  • Next by Date: Re: Localizable.strings inside framework bundles
  • Previous by thread: Inverting an NSImage
  • Next by thread: Re: Inverting an NSImage
  • Index(es):
    • Date
    • Thread