Hi, Glad to know Krita is going to use lcms. Hope you would find in lcms all required tools to get proper color management.
>* With cmsDoTransform, is the fourth parameter the number of pixels in the >buffer, the number of channels in the pixel or the total number of bytes for >the buffer? If not the first possibility, how can I convert between models >that don't have the same number of channels? >>Okay, that one is clear from the API docs... Cannot understand how I came to >>miss that. Please don't hesitate to ask. Maybe your question is obvious for some folks, but not so obvious for others. Sharing questions is a great way for all people to know more about the engine. The fourth parameter is in pixels. And there is a reason for that. A color transform can be from any encoding to any different encoding. There is just one thing in common: the number of pixels. This is sometimes useful above color management and can be used to convert between formats. >* Does it make sense to cache transforms in my application? If you mean caching pixels in a transform, no. There is a one-pixel cache already implemented. If you mean caching yet existing color transforms... hard to say. A transform can take a lot of memory. Creating a transform is a matter of 0.5 seconds on most machines. If you are going to use a lot of simultaneous transforms, maybe. But this is going to make thinks complex. I would first try the easier, non-caching way. If this gives a sluggish feeling to the app, then try caching. >* I load all .icm profiles I have in a data directory on startup. How can I >discover which profile fits with which color space? I'm trying to make sure >that I don't use an RGB profile for cmyk data. There is a function cmsGetColorSpace() that return which color space is implementing each profile. Same for cmsGetDeviceClass() to know if the profile is for printer, scanner, monitor ... > * In the context of working with layers in an application, is something like >CMYK + alpha reasonable or is that just silly? Is reasonable, supported by lcms and used by several applications. Sometimes they call it "matteing". Regards, Marti Maria The little cms project http://www.littlecms.com ----- Original Message ----- From: "Boudewijn Rempt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 13, 2004 12:59 PM Subject: [Lcms-user] Beginner's questions Hi, I'm currently making Krita, the KOffice image app, use littlecms for everything color related, and I'm having a few questions... * With cmsDoTransform, is the fourth parameter the number of pixels in the buffer, the number of channels in the pixel or the total number of bytes for the buffer? If not the first possibility, how can I convert between models that don't have the same number of channels? * Does it make sense to cache transforms in my application? * I load all .icm profiles I have in a data directory on startup. How can I discover which profile fits with which color space? I'm trying to make sure that I don't use an RGB profile for cmyk data. * In the context of working with layers in an application, is something like CMYK + alpha reasonable or is that just silly? -- Boudewijn Rempt http://koffice.kde.org/krita ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Lcms-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/lcms-user
