Fair enough.
Even if reading/writing is converted to LCMS code I still need/want the internal simplified profio_icc format as it will complexify the code dealing with a generic do-it-all ICC in the internals so the difference will be very small. Just as little as if Argyll would switch to using LCMS for reading and writing profiles DcamProf won't automatically gain ICCv4
I don't think we are still on the same page here. LCMS2 usage is not about complexity dealing with all ICC stuff it is about not writing the code to parse ICC. Whether you use it to access more complex areas is up to you. Opening a profile, checking the version and getting a matrix out of it for example is done in 3 calls. Creating profile from scratch is also simple. I kept pointing to dcp2icc tool - here is a snippet from there that creates a complete LUT profile (the lut creation are done with callbacks to dcp2iccc routines so these are all LCMS2 calls):
int CreateICC(char *fname, Sampler *smp, char *name, char *model)
{
cmsHPROFILE h;
LPLUT clut;
h=cmsOpenProfileFromFile(fname,"w");
if (!h) {
printf("Error creating '%s'\n", fname);
return -1;
}
cmsSetDeviceClass(h, icSigInputClass);
cmsSetColorSpace(h, icSigRgbData);
cmsSetPCS(h, icSigXYZData);
cmsSetRenderingIntent(h, INTENT_PERCEPTUAL);
cmsAddTag(h, icSigProfileDescriptionTag, name);
cmsAddTag(h, icSigCopyrightTag, "(c) Nobody");
cmsAddTag(h, icSigDeviceModelDescTag, model);
clut=cmsAllocLUT();
cmsAlloc3DGrid(clut, 33, 3, 3);
if (!cmsSample3DGrid(clut, dcpTest1, smp, 0)) {
printf("Error creating CLUT\n");
}
if (!cmsSample3DGrid(clut, dcpTest2, smp, 0)) {
printf("Error creating CLUT\n");
}
if (!cmsSample3DGrid(clut, dcpSampler, smp, 0)) {
printf("Error creating CLUT\n");
}
if (!cmsAddTag(h,icSigAToB0Tag, clut)) {
printf("Error adding CLUT\n");
}
cmsFreeLUT(clut);
cmsCloseProfile(h);
}