{"record":{"id":"a6e901cf323d5323","repo":"SixLabors/ImageSharp","slug":"invalid-multiprocesselement-type-of-signature","errorCode":null,"errorMessage":"Invalid MultiProcessElement type of {signature}","messagePattern":"Invalid MultiProcessElement type of (.+?)","errorType":"exception","errorClass":"InvalidIccProfileException","httpStatus":null,"severity":"error","filePath":"src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.MultiProcessElement.cs","lineNumber":39,"sourceCode":"        switch (signature)\n        {\n            case IccMultiProcessElementSignature.CurveSet:\n                return this.ReadCurveSetProcessElement(inChannelCount, outChannelCount);\n            case IccMultiProcessElementSignature.Matrix:\n                return this.ReadMatrixProcessElement(inChannelCount, outChannelCount);\n            case IccMultiProcessElementSignature.Clut:\n                return this.ReadClutProcessElement(inChannelCount, outChannelCount);\n\n            // Currently just placeholders for future ICC expansion\n            case IccMultiProcessElementSignature.BAcs:\n                this.AddIndex(8);\n                return new IccBAcsProcessElement(inChannelCount, outChannelCount);\n            case IccMultiProcessElementSignature.EAcs:\n                this.AddIndex(8);\n                return new IccEAcsProcessElement(inChannelCount, outChannelCount);\n\n            default:\n                throw new InvalidIccProfileException($\"Invalid MultiProcessElement type of {signature}\");\n        }\n    }\n\n    /// <summary>\n    /// Reads a CurveSet <see cref=\"IccMultiProcessElement\"/>\n    /// </summary>\n    /// <param name=\"inChannelCount\">Number of input channels</param>\n    /// <param name=\"outChannelCount\">Number of output channels</param>\n    /// <returns>The read <see cref=\"IccCurveSetProcessElement\"/></returns>\n    public IccCurveSetProcessElement ReadCurveSetProcessElement(int inChannelCount, int outChannelCount)\n    {\n        IccOneDimensionalCurve[] curves = new IccOneDimensionalCurve[inChannelCount];\n        for (int i = 0; i < inChannelCount; i++)\n        {\n            curves[i] = this.ReadOneDimensionalCurve();\n            this.AddPadding();\n        }\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/SixLabors/ImageSharp/blob/59ce6af6fc29027cda277ef62d4d1694a8acce91/src/ImageSharp/Metadata/Profiles/ICC/DataReader/IccDataReader.MultiProcessElement.cs#L21-L57","documentation":"The MPE (multiProcessElements) tag is a sequence of process elements each identified by a signature. When reading, a signature the library does not recognize (and does not skip as ACS padding) cannot be decoded, so the reader throws instead of producing an incorrect element.","triggerScenarios":"Reading an mAB / mBA type tag containing a multiProcessElement with a signature outside the set the library implements (e.g. newer AMP-era element types like matrix3x3, color3Array variants not yet supported); corrupt signature bytes.","commonSituations":"Profiles using extended multi-process elements introduced after the library's implemented subset (calculation/collection/curves/matrix/organization clut, bAcs/eAcs); vendor-specific MPE types; corrupt files.","solutions":["Update to the latest ImageSharp version - newer releases add more MPE signatures.","Rebuild the profile using only standard multiProcessElement types supported by the library.","Flatten or rasterize the transform in the profile authoring tool so exotic MPE types are removed.","Catch the exception and skip color transformation for such profiles."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    profile = IccReader.Read(stream);\n}\ncatch (InvalidIccProfileException ex) when (ex.Message.Contains(\"MultiProcessElement\"))\n{\n    logger.LogWarning(ex, \"Profile uses unsupported multiProcessElement type\");\n    // fall back to sRGB or a device link without MPE\n}","preventionTips":["Keep ImageSharp updated for new MPE signature support","Pre-validate profiles with ICC tooling before ingestion","Ask profile authors to use standard element types","Maintain a profile allowlist for automated pipelines"],"tags":["icc","multiprocess-element","unsupported"],"backgroundTag":"unsupported-enum-value","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"}