{"record":{"id":"e3a4d056b987340d","repo":"SixLabors/ImageSharp","slug":"multi-process-elements-are-not-supported","errorCode":null,"errorMessage":"Multi process elements are not supported","messagePattern":"Multi process elements are not supported","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"src/ImageSharp/ColorProfiles/Icc/IccConverterbase.Conversions.cs","lineNumber":71,"sourceCode":"            _ => throw new InvalidIccProfileException(\"Invalid conversion method.\"),\n        };\n\n    private static IVector4Calculator InitA(IccProfile profile, IccProfileTag tag)\n        => GetTag(profile, tag) switch\n        {\n            IccLut8TagDataEntry lut8 => new LutEntryCalculator(lut8),\n            IccLut16TagDataEntry lut16 => new LutEntryCalculator(lut16),\n            IccLutAToBTagDataEntry lutAtoB => new LutABCalculator(lutAtoB),\n            IccLutBToATagDataEntry lutBtoA => new LutABCalculator(lutBtoA),\n            _ => throw new InvalidIccProfileException($\"Invalid entry {tag}.\"),\n        };\n\n    private static IVector4Calculator InitD(IccProfile profile, IccProfileTag tag)\n    {\n        IccMultiProcessElementsTagDataEntry entry = GetTag<IccMultiProcessElementsTagDataEntry>(profile, tag)\n            ?? throw new InvalidIccProfileException(\"Entry is null.\");\n\n        throw new NotImplementedException(\"Multi process elements are not supported\");\n    }\n\n    private static ColorTrcCalculator InitColorTrc(IccProfile profile, bool toPcs)\n    {\n        IccXyzTagDataEntry redMatrixColumn = GetTag<IccXyzTagDataEntry>(profile, IccProfileTag.RedMatrixColumn);\n        IccXyzTagDataEntry greenMatrixColumn = GetTag<IccXyzTagDataEntry>(profile, IccProfileTag.GreenMatrixColumn);\n        IccXyzTagDataEntry blueMatrixColumn = GetTag<IccXyzTagDataEntry>(profile, IccProfileTag.BlueMatrixColumn);\n\n        IccTagDataEntry redTrc = GetTag(profile, IccProfileTag.RedTrc);\n        IccTagDataEntry greenTrc = GetTag(profile, IccProfileTag.GreenTrc);\n        IccTagDataEntry blueTrc = GetTag(profile, IccProfileTag.BlueTrc);\n\n        if (redMatrixColumn == null ||\n            greenMatrixColumn == null ||\n            blueMatrixColumn == null ||\n            redTrc == null ||\n            greenTrc == null ||\n            blueTrc == null)","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/SixLabors/ImageSharp/blob/59ce6af6fc29027cda277ef62d4d1694a8acce91/src/ImageSharp/ColorProfiles/Icc/IccConverterbase.Conversions.cs#L53-L89","documentation":"InitD validates the profile's D2B/B2D multi-process-elements entry but then unconditionally throws NotImplementedException because multi-process element processing is not implemented in ImageSharp's ICC converter. This is a deliberate feature gap, not a profile validity issue.","triggerScenarios":"Any converter initialization that routes through InitD — i.e. an ICC profile whose D2B/B2D tags are present and typed as IccMultiProcessElementsTagDataEntry (typical of ICC v5 / extended color profiles, e.g. spectral or HDR profiles).","commonSituations":"Processing ICC v5 (iccMAX) or high-dynamic-range profiles; device profiles exported by tools that emit MPE-based D2B transforms.","solutions":["Replace the profile with a v2/v4 LUT-based (A2B/lut16/lutAtoB) or matrix/TRC profile that ImageSharp supports.","Convert the profile externally with littleCMS/iccMAX tooling to a legacy encoding.","Catch NotImplementedException at converter creation and fall back to another color-management implementation."],"exampleFix":"// before: v5 iccMAX profile -> NotImplementedException\nvar converter = new IccConverter(iccMaxProfile);\n// after: pre-convert the profile to a supported v4 encoding\n// $ iccFromXml / lcms transicc to emit lutAtoB D2B-free profile\nvar converter = new IccConverter(convertedV4Profile);","handlingStrategy":"try-catch","validationCode":"if (profile.Tags.TryGetValue(IccProfileTag.D2B0, out var e)\n    && e is IccMultiProcessElementsTagDataEntry)\n{\n    throw new NotSupportedException(\"Choose a v4 LUT-based profile instead.\");\n}","typeGuard":"static bool UsesMultiProcessElements(IccProfile p) =>\n    p.Tags.TryGetValue(IccProfileTag.D2B0, out var e) && e is IccMultiProcessElementsTagDataEntry;","tryCatchPattern":"try { converter = new IccConverter(profile); }\ncatch (NotImplementedException) { converter = new IccConverter(ConvertToV4LutProfile(profile)); }","preventionTips":["Avoid iccMAX/v5 profiles until MPE support lands; pre-convert them with lcms/iccMAX tools.","Keep a conversion step in your asset pipeline that normalizes profiles to v2/v4.","Feature-detect at startup by attempting converter construction on your profile set."],"tags":["icc","not-implemented","multi-process-elements","color-profile"],"backgroundTag":"method-not-implemented","analyzedSha":"59ce6af6fc29027cda277ef62d4d1694a8acce91","analyzedAt":"2026-09-13T18:34:59.331Z","contentChangedAt":"2026-09-13T18:34:59.331Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}