[Lcms-user] ICC Profile description tag not read correctly
An ICC-based CMM for color management
Brought to you by:
mm2
From: Angel S. <sal...@gm...> - 2018-09-17 12:12:39
|
Hello folks! We are using LCMS to read some profile descriptions from images and with this one looks like it can't read the Unicode part of the tag, and instead reads the ASCII one. Here is the code we are using: ------------ wchar_t desc[2048]={0}; if (m_cmshProfile != NULL) { cmsMLU * pDescTag = (cmsMLU *) cmsReadTag(m_cmshProfile, cmsSigProfileDescriptionTag); if (!cmsGetProfileInfo(m_cmshProfile, cmsInfoDescription, cmsNoLanguage, cmsNoCountry, desc, sizeof(desc))) return NULL; } ------------ In this case desc gets this characters: ASCII sRGB IEC61966-2.1 And instead it should be Unicodé sRGB IEC61966-2.1 This happens on windows using Visual Studio 2017 and macOS. If I extract the ICC profile with ImageMagick and convert to xml with IccXML ( https://sourceforge.net/projects/iccxml/ ), I can see the following tags: --------- <textDescriptionType> <TagSignature>desc</TagSignature> <ASCII><![CDATA[ASCII sRGB IEC61966-2.1]]></ASCII> <Unicode><![CDATA[Unicodé sRGB IEC61966-2.1]]></Unicode> </textDescriptionType> --------- Looks like it is getting the ASCII tag instead the Unicode one. How we should read the Unicode tag? I have attached the ICC profile. Feel free to contact me for any questions, suggestions and advice. Thanks, Angel |