Re: Tiff conversion
Re: Tiff conversion
- Subject: Re: Tiff conversion
- From: Clyde McQueen <email@hidden>
- Date: Fri, 3 Aug 2001 14:55:10 -0700
On Wednesday, August 1, 2001, at 02:33 PM, Ivan Salina Fernandes wrote:
Dear friends,
I'm trying to convert a tiff image, from CMYK (4 components) to RGB (3
components). I'm using Cocoa, but I couldn't find any kind of "way" to
do this. Can anybody HELP me ?
You'll have to do it yourself. Create a 2nd NSBitmapImageRep with 3
planes using the rather hairy method:
- (id)initWithBitmapDataPlanes:(unsigned char **)planes
pixelsWide:(int)width
pixelsHigh:(int)height
bitsPerSample:(int)bps
samplesPerPixel:(int)spp
hasAlpha:(BOOL)alpha
isPlanar:(BOOL)isPlanar
colorSpaceName:(NSString *)colorSpaceName
bytesPerRow:(int)rowBytes
bitsPerPixel:(int)pixelBits
Then walk the source & destination data pixel by pixel and convert CMYK
to RGB using the standard conversion algorithm.
/Clyde