{"record":{"id":"f8dd3ef5d00fc815","repo":"SixLabors/ImageSharp","slug":"profile-description-can-only-have-multi-localized-unicode-or","errorCode":null,"errorMessage":"Profile description can only have multi-localized Unicode or text description entries","messagePattern":"Profile description can only have multi-localized Unicode or text description entries","errorType":"exception","errorClass":"InvalidIccProfileException","httpStatus":null,"severity":"error","filePath":"src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.NonPrimitives.cs","lineNumber":150,"sourceCode":"            manufacturer,\n            model,\n            attributes,\n            technologyInfo,\n            manufacturerInfo.Texts,\n            modelInfo.Texts);\n\n        IccMultiLocalizedUnicodeTagDataEntry ReadText()\n        {\n            IccTypeSignature type = this.ReadTagDataEntryHeader();\n            switch (type)\n            {\n                case IccTypeSignature.MultiLocalizedUnicode:\n                    return this.ReadMultiLocalizedUnicodeTagDataEntry();\n                case IccTypeSignature.TextDescription:\n                    return (IccMultiLocalizedUnicodeTagDataEntry)this.ReadTextDescriptionTagDataEntry();\n\n                default:\n                    throw new InvalidIccProfileException(\"Profile description can only have multi-localized Unicode or text description entries\");\n            }\n        }\n    }\n\n    /// <summary>\n    /// Reads a colorant table entry\n    /// </summary>\n    /// <returns>the profile description</returns>\n    public IccColorantTableEntry ReadColorantTableEntry()\n    {\n        return new IccColorantTableEntry(\n            name: this.ReadAsciiString(32),\n            pcs1: this.ReadUInt16(),\n            pcs2: this.ReadUInt16(),\n            pcs3: this.ReadUInt16());\n    }\n\n    /// <summary>","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/SixLabors/ImageSharp/blob/59ce6af6fc29027cda277ef62d4d1694a8acce91/src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.NonPrimitives.cs#L132-L168","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { profile = IccReader.Read(stream); }\ncatch (InvalidIccProfileException ex) when (ex.Message.Contains(\"description\"))\n{\n    // use file name or fallback description\n    return new IccProfileDescription { DeviceManufacturer = \"unknown\" };\n}","preventionTips":["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"],"tags":["icc","profile-description","profile-validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"59ce6af6fc29027cda277ef62d4d1694a8acce91","analyzedAt":"2026-09-13T18:34:59.331Z","contentChangedAt":"2026-09-13T18:34:59.331Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}