• 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: Setting a color in a NSBitmapImageRep to white or black
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a color in a NSBitmapImageRep to white or black


  • Subject: Re: Setting a color in a NSBitmapImageRep to white or black
  • From: Graham Cox <email@hidden>
  • Date: Fri, 18 Feb 2011 11:55:46 +1100

On 18/02/2011, at 11:40 AM, John Joyce wrote:

> Instead of -whiteColor is it not possible to simply create a color using 255 a.k.a. FF  for R, G and B respectively?
> This is white in RGB.

Also, this is incorrect.

This assumes two things - that colour components have 8 bits and that all bits set represent full brightness of the component. Both of these things depend on the colour space. Typically, colour components are expressed as a float value between 0 and 1.0 relative to the colourspace, and are mapped to the actual number of bits per component (modulo colour calibration) in a bitmap internally.

The colour model of Windows 3 (and Colour QuickDraw for that matter) are long behind us.

--Graham





_______________________________________________

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

  • Follow-Ups:
    • Re: Setting a color in a NSBitmapImageRep to white or black
      • From: John Joyce <email@hidden>
References: 
 >Setting a color in a NSBitmapImageRep to white or black (From: Eric Gorr <email@hidden>)
 >Re: Setting a color in a NSBitmapImageRep to white or black (From: Graham Cox <email@hidden>)
 >Re: Setting a color in a NSBitmapImageRep to white or black (From: John Joyce <email@hidden>)

  • Prev by Date: Re: Setting a color in a NSBitmapImageRep to white or black
  • Next by Date: Re: How to optimize image loading during core animation?
  • Previous by thread: Re: Setting a color in a NSBitmapImageRep to white or black
  • Next by thread: Re: Setting a color in a NSBitmapImageRep to white or black
  • Index(es):
    • Date
    • Thread