Thread: [Lcms-user] Help with lcms2 Hello World app
An ICC-based CMM for color management
Brought to you by:
mm2
From: Matt L. <ml...@cr...> - 2010-08-05 18:58:49
|
Hello, I'm trying to make very simple hello world app similar to the transicc utility included with the lcms2 source code. It takes a path to a CMYK ICC profile and four values for C,M,Y,K as command line params. Next it transforms that to sRGB and outputs the results. Unfortunately my output R, G, and B are always 0. Here is a link to the source code: http://pastebin.com/1yfpKhua What am I doing wrong? I'm sure I'm just missing something basic, but I've been banging my head against it for too long now. Thanks in advance, Matt |
From: Kai-Uwe B. <ku...@gm...> - 2010-08-05 20:02:59
|
Am 05.08.10, 14:31 -0400 schrieb Matt Long: > It takes a path to a CMYK ICC profile and four values for C,M,Y,K as command > line params. Next it transforms that to sRGB and outputs the results. > Unfortunately my output R, G, and B are always 0. You put the floats into a unsigned char with 8 bit. Try TYPECMYK_DBL instead of TYPE_CMYK_8. Same for TYPE_BGR_8, use TYPE_RGB_DBL . hope it helps, Kai-Uwe Behrmann -- developing for colour management www.behrmann.name + www.oyranos.org |
From: Matt L. <ml...@cr...> - 2010-08-05 20:40:00
|
Thanks! That was it. On Thu, Aug 5, 2010 at 4:01 PM, Kai-Uwe Behrmann <ku...@gm...> wrote: > Am 05.08.10, 14:31 -0400 schrieb Matt Long: > > It takes a path to a CMYK ICC profile and four values for C,M,Y,K as >> command >> line params. Next it transforms that to sRGB and outputs the results. >> Unfortunately my output R, G, and B are always 0. >> > > You put the floats into a unsigned char with 8 bit. Try TYPECMYK_DBL > instead of TYPE_CMYK_8. Same for TYPE_BGR_8, use TYPE_RGB_DBL . > > hope it helps, > Kai-Uwe Behrmann > -- > developing for colour management www.behrmann.name + www.oyranos.org > > -- Matt Long Lead Developer 617-329-1001 crocodoc.com webnotes.net |