|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||LCMS2||MBS Images Plugin||11.3||Yes||Yes||Yes||Yes||No|
MLU funtions are the low-level interface to access the localization features of V4 ICC profiles. Little CMS does offer a high-level interface for easy operation. You may want, however, handle those objects by yourself.
Obtaining localized info from profiles
In versions prior to 4.0, the ICC format defined a required tag 'desc' which stored ASCII, Unicode, and Script Code versions of the profile description for display purposes. However, this structure allowed the profile to be localized for one language only through Unicode or Script Code. Profile vendors had to ship many localized versions to different countries. It also created problems when a document with localized profiles embedded in it was shipped to a system using a different language. With the adoption of V4 spec as basis, Little CMS solves all those issues honoring a new tag type: ‘mluc' and multi localized Unicode. There is a full part of the API to deal with this stuff, but if you don't care about the details and all you want is to display the right string, Little CMS provides a simplified interface for that purpose.
Note that ASCII is strictly 7 bits, so you need to use wide chars if you want to preserve the information in the profile. The localization trick is done by using the lenguage and country codes, which you are supposed to supply. Those are two or three ASCII letters. A list of codes may be found here:
In practice, "en" for "english" and "US" for "united states" are implemented in most profiles. It is Ok to set a language and a country even if the profile does not implement such specific language and country. Little CMS will search for a proper match.
If you don't care and want just to take the first string in the profile, you can use:
For the language:
For the country:
This will force to get the very first string, without any searching. A note of warning on that: you will get an string, but the language would be any, and probably that is not what you want. It is better to specify a default for language, and let LittleCMS to choose any other country (or language!) if what you ask for is not available.
- 2 properties
- 7 methods
- method Constructor(context as LCMS2ContextMBS, items as UInt32)
- method getASCII(LanguageCode as string, CountryCode as string) as string
- method getTranslation(LanguageCode as string, CountryCode as string, byref ObtainedLanguageCode as string, byref ObtainedCountryCode as string) as boolean
- method getUnicode(LanguageCode as string, CountryCode as string) as string
- method setASCII(LanguageCode as string, CountryCode as string, ASCIIString as string) as Boolean
- method setUnicode(LanguageCode as string, CountryCode as string, UnicodeString as string) as Boolean
- method translationsCodes(index as Integer, byref LanguageCode as string, byref CountryCode as string) as boolean
- 2 constants
This class has no sub classes.
Some methods using this class:
- LCMS2DictionaryMBS.AddEntry(Name as String, Value as String, DisplayName as LCMS2MLUMBS, DisplayValue as LCMS2MLUMBS) as boolean
- LCMS2ProfileMBS.ReadMLU(tag as Integer) as LCMS2MLUMBS
- LCMS2ProfileMBS.WriteMLU(tag as Integer, o as LCMS2MLUMBS) as boolean
- LCMS2UcrBgMBS.Constructor(Ucr as LCMS2ToneCurveMBS = nil, Bg as LCMS2ToneCurveMBS = nil, Desc as LCMS2MLUMBS = nil)
Some properties using for this class:
- LCMS2DictionaryEntryMBS.DisplayName as LCMS2MLUMBS
- LCMS2DictionaryEntryMBS.DisplayValue as LCMS2MLUMBS
- LCMS2SequenceDescriptionMBS.Description as LCMS2MLUMBS
- LCMS2SequenceDescriptionMBS.Manufacturer as LCMS2MLUMBS
- LCMS2SequenceDescriptionMBS.Model as LCMS2MLUMBS
- LCMS2UcrBgMBS.Desc as LCMS2MLUMBS
Some examples which use this class:
- /Images/LCMS2/Create a CMYK Profile
- /Images/LCMS2/Create a CMYK Profile 2
- /Images/LCMS2/Create a DeviceN Profile
- /Images/LCMS2/Create Profile
- /Images/LCMS2/Profile Info
The items on this page are in the following plugins: MBS Images Plugin.
MBS Xojo tutorial videos