Skip navigation.
 
mlRe: Creating black and white image
FROM : Ricky Sharp
DATE : Wed Dec 22 20:09:55 2004

On Dec 22, 2004, at 1:00 PM, Osamu Shigematsu wrote:

> I'm now checking "IconFamily" source code.
>
> I found a silly mistake in my code:
>
>     colorSpaceName:@"NSCalibratedWhiteColorSpace"
>
> This should be:
>
>     colorSpaceName:NSCalibratedWhiteColorSpace
>
> I have fixed that mistake but the result was not changed.
>
> I also tested to change drawing method of source image, such as 
> "compositeToPoint" or "dissolveToPoint", but nothing was changed in 
> the output image.


Check out the following example:

<http://developer.apple.com/samplecode/Monochrome_Image/
Monochrome_Image.html
>

Specifically, look at the NSImage_monochrom.m file.

Note that the code uses NSReadPixel which is quite slow.  I've since 
optimized a local copy of it by directly accessing the pixels.  I hope 
to one day submit this code.  Currently, it doesn't yet support bitmap 
reps that contains alpha or is planar.

___________________________________________________________
Ricky A. Sharp        mailto:<email_removed>
Instant Interactive(tm)  http://www.instantinteractive.com

Related mailsAuthorDate
mlCreating black and white image Osamu Shigematsu Dec 22, 19:02
mlRe: Creating black and white image Chuck Soper Dec 22, 19:17
mlRe: Creating black and white image Osamu Shigematsu Dec 22, 20:00
mlRe: Creating black and white image Ricky Sharp Dec 22, 20:09
mlRe: Creating black and white image Osamu Shigematsu Dec 22, 20:57
mlRe: Creating black and white image Clark Cox Dec 22, 21:19
mlRe: Creating black and white image Osamu Shigematsu Dec 23, 08:05