Hi Kai, First, Thanx for the help.
I'll try to explain better what I do. I have several layers 1 to n, each with its own profile (let's call it profile-i). I'm blending them all together (similar to layers in PhotoShop) on a single canvas which has its own profile as well (let's call it profile-c). I use profile-c as the output profile for exported images from my software (the output of the application). Now we also have the screen profile I'm showing the user the data on (let's call it profile-s). What I first did was this: For display, I convert all layers to profile-s, so I have n conversions profile-0->profile-s to profile-n->profile-s. Then I blend layers in profile-s. For output I do the same with the destination profile being profile-c. The problem here is that the blending output is different. That is, the result of the blending depends on the profile I'm blending in. I figured out the proper thing to do, is to always convert layers to profile-c, blend, and then if I'm displaying convert the result to profile-s for display. I hope up to here everything is clear. For this, blending can be done with openGL even if the format is 8-bit. The problem is that if profile-c is CMYK, I need to do 2 passes with openGL, since openGL doesn't support 4 color channels. So that's the problem. I thought of blending in LAB PCS to avoid blending in CMYK and doing 2 passes. However my concern was exactly the one you pointed out. That LAB is a wide space, and I might lose precision and get color stepping. So I guess my worries were justified. :-) and :-(. So I guess my question, is if there's another thing to do what I want to do? I'm using openGL since I use 3D graphics to create the layers. They can be turned and manipulated in 3D space. openGL gives me a robust and easy to use rendering engine which also does depth testing on hardware. I don't think openGL poses any performance problems or bottlenecks. As long as I really give the GPU RGB (or CMYK) data, it does everything fast and accurate. Perhaps giving it LAB data would be asking to much of low-precision GPU's, and that's exactly my question. Yaron > Yaron, > > just some questions back to you: > > Relying on OpenGL's output means most of the time to be dependent on > hardware. While the idea is very nice to let the GPU perform the PCS alpha > blending, are you shure reading from a texture is not a performance > bottleneck? > Are all your supported plattforms able to handle your maximum precision? > Some grafics bords still support 8-bit only (possibly less?). This could > be too narrow for Lab rendering as Lab is pretty large. Colour stepping > could become visible in this case. > > Converting to your canvas profile, whatever this means, at the last stage > should be ok, as all reandering is done before in your concept. So, whats > the problem here? > > regards > Kai-Uwe Behrmann > + development for color management > + imaging / panoramas > + email: [EMAIL PROTECTED] > + http://www.behrmann.name > > > Am 05.12.06, 13:31 +0200 schrieb Yaron Tadmor: > > > Hi, > > > > I'm pretty new to color management, and color profiles. > > I'm writing an application which allows to composite several images on a > > single canvas, and each image can have its own color profile. The global > > canvas also has a color profile (which is the color profile the final > > canvas image will be exported in). > > > > When blending the images I need to blend them in a single profile. The > > most appropriate is the canvas profile. > > Since I'm using openGL to render the layers, there's a problem when this > > profile is a CMYK profile. The problem is that openGL doesn't support > > CMYKA (or CMYK for that matter) so I need to split my rendering to 2 > > parts (CMY and K), which slows down the GUI. > > > > I was wondering if I could somehow use a PCS (say LAB) to perform my > > blending. This way I can convert all input images to the PCS, load them > > to openGL as RGBA textures. Then I can render using openGL letting it do > > the alpha blending on this PCS, and then get the rendered image and > > convert to the canvas profile? > > Could this work? > > > > My main concern is that if the canvas profile is a narrow gamut profile, > > I might lose precision, since the PCS image data will need to be > > converted to unsigned chars in order to give to openGL. > > > > Am I making sense, or am I missing something? > > > > Thanx > > Yaron Tadmor > > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user