Hi,

> I want to change the AtoB and BtoA LUT's of an existing profile, and it
> looks like lcms will not do this directly, but it will get me most of the
> way there.
> [...]

That's fine. Another possibility would be:

- open source profile for read: 
  hSrc = cmsOpenProfileFromFile("source.icc", "r");

- create empty destination profile
  dDest = cmsOpenProfileFromFile("dest.icc", "w");

- copy all desired data in header using the 
   cmsGetXXX / cmsSetXXX functions. You have to parse 
   that info anyway to make sure the LUT are proper.

- Copy or replace the LUT by using cmsReadICCLut/cmsAddTag,
you should copy other tags as well (media white, etc.)

There is, however, a limitation using this method. lcms may expand 
curves to tables, so the representation you would obtain may differ 
from original. Otherwise the functionality should be same. 

Incoming versions of the engine would solve that, hopefully.

Regards,
Marti Maria
The little cms project
http://www.littlecms.com




----- Original Message ----- 
From: "Mike Russell" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, February 12, 2005 5:54 AM
Subject: [Lcms-user] profile editing procedure


> I want to change the AtoB and BtoA LUT's of an existing profile, and it
> looks like lcms will not do this directly, but it will get me most of the
> way there.
> 
> Here's my plan:
> 
> 1) copy the header and tags using my own explicit file operations, but leave
> out the tags to be modified.
> 2) create a new, modified LUT in lcms in the usual way.
> 3) serialize the lut to memory using lcms's static function SaveLUT()
> 4) write the serialized lut to the profile as an explicit tag
> 
> I would appreciate any and all comments.
> 
> Thanks to all those who contributed to this wonderful package.
> 
> Mike Russell
> www.curvemeister.com
> www.geigy.2y.net
> 
> 
> 
> 
> -------------------------------------------------------
> 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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Lcms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/lcms-user
> 


-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to