Re: CIColorMap inputGradientImage?
Subject : Re: CIColorMap inputGradientImage?
From: Martin Wennerberg <email@hidden >
Date: Fri, 19 May 2006 10:08:17 +0200
Delivered-to: email@hidden
Delivered-to: email@hidden
What is the "original spectrum"? Is it the hue component from 0 to
1 after converting RGB to HSB?
I created such an image (below) and it messes up the picture, so I
that guess must be wrong.
NSBitmapImageRep *bitmap = [[NSBitmapImageRep allocWithZone:
[self zone]] initWithBitmapDataPlanes:NULL
pixelsWide:1024
pixelsHigh:1
bitsPerSample:8
samplesPerPixel:4
hasAlpha:YES
isPlanar:NO
colorSpaceName:NSDeviceRGBColorSpace
bytesPerRow:0
bitsPerPixel:0];
int x;
for (x = 0; x < 1024; ++x)
{
NSColor *color = [NSColor colorWithDeviceHue:(float)x /
1024.0f saturation:1.0 brightness:1.0 alpha:1.0];
[bitmap setColor:color atX:x y:0];
}
NSData *data = [bitmap TIFFRepresentation];
[data writeToFile:@"/Users/martin/hue.tiff" atomically:YES];
/Martin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.