SixLabors/ImageSharp · error · InvalidIccProfileException
Profile description can only have multi-localized Unicode…
Error message
Profile description can only have multi-localized Unicode or text description entries
What it means
A profile description tag (desc) must be either a multiLocalizedUnicodeType or (legacy) textDescriptionType. When the reader sees any other type signature under a profileDescriptionTag it throws, since the description cannot be interpreted as localizable text.
Solutions
- Re-export the profile with a standards-compliant description (multiLocalizedUnicode).
- Pre-validate the profile with an ICC conformance checker and fix the desc tag.
- If you only need the raw bytes, parse the tag yourself with ReadTagDataEntry instead of ReadProfileDescription.
- Catch InvalidIccProfileException and substitute a placeholder description.
Defensive patterns
Strategy: try-catch
Try / catch
try { profile = IccReader.Read(stream); }
catch (InvalidIccProfileException ex) when (ex.Message.Contains("description"))
{
// use file name or fallback description
return new IccProfileDescription { DeviceManufacturer = "unknown" };
} Prevention
- Regenerate non-conformant profiles with modern tooling
- Pre-validate desc tag type with ICC verification tools
- Do not assume all vendor profiles are spec-compliant
- Store expected descriptions out-of-band for known profiles
When it happens
Trigger: Parsing an ICC profile whose desc tag carries a type signature other than multiLocalizedUnicode or textDescription (e.g. a plain textType or corrupt bytes); reading profiles via ReadProfileDescription from a profile-sequence-desc context.
Common situations: Non-conformant profiles written by buggy tools that store textType in the desc tag; corrupted profile files; very old or exotic profiles with custom description encodings.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Curve has to be either
- ICC conversion supports at most four input and output…
- ICC conversion supports at most four input and output…
- ICC conversion supports at most four tone response curves.
- Invalid calculation type
AI-assisted analysis of SixLabors/ImageSharp@59ce6af6fc (2026-09-13).
Data as JSON: /api/errors/f8dd3ef5d00fc815.
Report an issue: GitHub.
Appendix: source
Thrown at src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.NonPrimitives.cs:150
manufacturer,
model,
attributes,
technologyInfo,
manufacturerInfo.Texts,
modelInfo.Texts);
IccMultiLocalizedUnicodeTagDataEntry ReadText()
{
IccTypeSignature type = this.ReadTagDataEntryHeader();
switch (type)
{
case IccTypeSignature.MultiLocalizedUnicode:
return this.ReadMultiLocalizedUnicodeTagDataEntry();
case IccTypeSignature.TextDescription:
return (IccMultiLocalizedUnicodeTagDataEntry)this.ReadTextDescriptionTagDataEntry();
default:
throw new InvalidIccProfileException("Profile description can only have multi-localized Unicode or text description entries");
}
}
}
/// <summary>
/// Reads a colorant table entry
/// </summary>
/// <returns>the profile description</returns>
public IccColorantTableEntry ReadColorantTableEntry()
{
return new IccColorantTableEntry(
name: this.ReadAsciiString(32),
pcs1: this.ReadUInt16(),
pcs2: this.ReadUInt16(),
pcs3: this.ReadUInt16());
}
/// <summary>View on GitHub (pinned to 59ce6af6fc)