Hi,

I have data converted into 16 bit ProPhoto RGB. I want to as fast as
possible convert this to Lab, do some changes in Lab mode and convert back
to ProPhoto RGB again.

The first conversion is fine:
-------------------------------------------------------
      //Convert ProPhotoRGB to ProPhotoLAB  
      lcmsPPProfile :=
cmsOpenProfileFromMem(rStreamProPhoto.Memory,rStreamProPhoto.Size);
      lcmsLABProfile := cmsCreateLabProfile(NIL);
      lcmsTransform := cmsCreateTransform( lcmsPPProfile, TYPE_RGB_16,
                                           lcmsLABProfile, TYPE_Lab_16,
                                           INTENT_PERCEPTUAL, 0 ); //normal
precalc
      for y := 0 to CurrentBitmap.Height-1 do
        cmsDoTransform(lcmsTransform, CurrentBitmap.ScanLine[y],
                                      CurrentBitmap.ScanLine[y],
                                      CurrentBitmap.Width); 
      cmsDeleteTransform(lcmsTransform);

      //Timing inc createTransform on 6MP image
      //1340 ms  w/ 0 in precalc!!
-------------------------------------------------------

and 1340 ms is much faster than I am able to do this... and if I have the
transform cached, the time goes down a little more for the Transform only as
well. The LAB image is verified to be exactly as expected.

BUT, even when doing nothing to the image, I have problems getting this
equally fast back to ProPhoto RGB:

-------------------------------------------------------
      lcmsTransform := cmsCreateTransform( lcmsLABProfile, TYPE_Lab_16, 
                                           lcmsPPProfile, TYPE_RGB_16,
                                           INTENT_PERCEPTUAL, 0 ); //normal
precalc
      for y := 0 to CurrentBitmap.Height-1 do
        cmsDoTransform(lcmsTransform, CurrentBitmap.ScanLine[y],
                                      CurrentBitmap.ScanLine[y],
                                      CurrentBitmap.Width); 
      cmsDeleteTransform(lcmsTransform);

      //Timing inc createTransform on 6MP image
      //3230 ms  w/ 0 in precalc!!
-------------------------------------------------------

Why does that 2nd transform take that much more time? 3230 ms vs. 1340 ms ?

Is this just the nature of things, or am I doing something wrong?

Or - is there any alternative ways of doing this... ?

Any hints would be appreciated...


regards
 
Magne


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to