On 26 June 2010 09:52,  <marti.ma...@littlecms.com> wrote:
> It is a little bit more complex than lcms1 because the interface
> for v2 and v4 is unified and therefore you can use unicode in your
> texts.

Right.

> Basically you setup a cmsMLU (Multi-localized unicode) structure,
> fills it with the strings you wish and then write it to the profile
> by using cmsWriteTag().

Ahh, I didn't know if cmsWriteTag was clever enough to parse a MLU
struct. Makes sense when you say it now.

> cmsSetProfileVersion(h, 3.4);
> cmsMLU mlu = cmsMLUalloc(0, 1);
> cmsMLUsetASCII(mlu, "EN", "us", "hello, world");
> cmsWriteTag(h, icSigDeviceMfgDescTag, mlu);
> cmsMLUfree(mlu);

Of course, you mean cmsSigDeviceMfgDescTag -- :-)

> I have not directly checked this piece of code, but it should work.

Yes, it does, thanks. This is the private function I've used in GCM,
feel free to steal and put as a convenience function in lcms2 if you
want:

/*
 * _cmsWriteTagTextAscii:
 */
static cmsBool
_cmsWriteTagTextAscii (cmsHPROFILE h, cmsTagSignature sig, const gchar *text)
{
        cmsBool ret;
        cmsMLU *mlu = cmsMLUalloc (0, 1);
        cmsMLUsetASCII (mlu, "EN", "us", text);
        ret = cmsWriteTag (h, sig, mlu);
        cmsMLUfree (mlu);
        return ret;
}

Richard.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to