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

Re: Making an image NSCalibratedWhiteColorSpace


  • Subject: Re: Making an image NSCalibratedWhiteColorSpace
  • From: Nat! <email@hidden>
  • Date: Thu, 15 Nov 2001 00:25:06 +0100

On Mittwoch, November 14, 2001, at 11:58 Uhr, Andrew Platzer wrote:

> On Tuesday, November 13, 2001, at 06:51 , Gideon King wrote:
>> 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?
>
> initWithFocusedViewRect: reads from the window's backing store
> buffer and that is always RGB or RGBA. This is true even in images
> which you lock focus on since it creates an offscreen window to
> record the bits.
>
> You will have to do the conversion manually.
>
> Andrew

Are there any plans that AppKit can do this for us ? It seems that
the machinery at least partly (-> RGB, RGBA) must already be in
place.

Nat!
------------------------------------------------------
Some people drink deep from the fountains of life, and
some just gargle. -- DLR


  • Follow-Ups:
    • Re: Making an image NSCalibratedWhiteColorSpace
      • From: Andrew Platzer <email@hidden>
    • Re: Making an image NSCalibratedWhiteColorSpace
      • From: Marcel Weiher <email@hidden>
References: 
 >Re: Making an image NSCalibratedWhiteColorSpace (From: Andrew Platzer <email@hidden>)

  • Prev by Date: Re: Making an image NSCalibratedWhiteColorSpace
  • Next by Date: Scope of Cocoa?
  • Previous by thread: Re: Making an image NSCalibratedWhiteColorSpace
  • Next by thread: Re: Making an image NSCalibratedWhiteColorSpace
  • Index(es):
    • Date
    • Thread