Re: Creating black and white image
Re: Creating black and white image
- Subject: Re: Creating black and white image
- From: Ricky Sharp <email@hidden>
- Date: Wed, 22 Dec 2004 13:09:55 -0600
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@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden