• 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
Making an image NSCalibratedWhiteColorSpace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making an image NSCalibratedWhiteColorSpace


  • Subject: Making an image NSCalibratedWhiteColorSpace
  • From: Gideon King <email@hidden>
  • Date: Tue, 13 Nov 2001 22:51:43 +0800

I need to use an image with just grayscale and alpha in it for image processing.

To create the image, I need to do some drawing, so I use an image with and NSCustomImageRep to do the drawing. I tell that image rep to be NSCalibratedWhiteColorSpace. I then lock focus on the image and use initWithFocusedViewRect: to get the bitmap data. This always returns an image rep with RGBA color in NSCalibratedRGBColorSpace. If I then set it to NSCalibratedWhiteColorSpace, it doesn't do any conversion for me - just leaves it as 4 samples per pixel (RGBA).

Will I need to do the conversion manually, or is there some way that will allow me to get a grayscale alpha image directly?

TIA


Gideon.


  • Follow-Ups:
    • Re: Making an image NSCalibratedWhiteColorSpace
      • From: Andrew Platzer <email@hidden>
References: 
 >Re: render to 128x128 image (From: Don Murta <email@hidden>)

  • Prev by Date: Outline view questions (hide items & multiple line text)
  • Next by Date: Playing sounds without QT
  • Previous by thread: Re: render to 128x128 image
  • Next by thread: Re: Making an image NSCalibratedWhiteColorSpace
  • Index(es):
    • Date
    • Thread