{"record":{"id":"207a86ecdc2de325","repo":"SixLabors/ImageSharp","slug":"ccitt-extensions-are-not-supported","errorCode":null,"errorMessage":"ccitt extensions are not supported.","messagePattern":"ccitt extensions are not supported\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6TiffCompression.cs","lineNumber":253,"sourceCode":"                    a1 = b1 - 2;\n                    scanline[unpacked..a1].Fill(fillByte);\n                    unpacked = a1;\n                    a0 = a1;\n                    fillByte = (byte)~fillByte;\n                    bitReader.SwapColor();\n                    break;\n\n                case CcittTwoDimensionalCodeType.VerticalL3:\n                    a1 = b1 - 3;\n                    scanline[unpacked..a1].Fill(fillByte);\n                    unpacked = a1;\n                    a0 = a1;\n                    fillByte = (byte)~fillByte;\n                    bitReader.SwapColor();\n                    break;\n\n                default:\n                    throw new NotSupportedException(\"ccitt extensions are not supported.\");\n            }\n\n            // This line is fully unpacked. Should exit and process next line.\n            if (unpacked == width)\n            {\n                break;\n            }\n\n            if (unpacked > width)\n            {\n                TiffThrowHelper.ThrowImageFormatException(\"ccitt compression parsing error, unpacked data > width\");\n            }\n        }\n    }\n\n    /// <inheritdoc/>\n    protected override void Dispose(bool disposing)\n    {","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/SixLabors/ImageSharp/blob/59ce6af6fc29027cda277ef62d4d1694a8acce91/src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6TiffCompression.cs#L235-L271","documentation":"During 2D CCITT (G4) scanline decoding, Decode2DScanline switches on the decoded mode word (pass, horizontal, vertical modes, etc.). Any unrecognized/extension mode hits the default case and throws NotSupportedException, meaning the stream uses a CCITT mode this decoder does not implement.","triggerScenarios":"Decompress of a CcittGroup4 strip whose code word decodes to an unsupported extension mode; called from Decompress per scanline.","commonSituations":"Unusual fax-variant TIFFs, files written with non-standard G4 extensions, or corrupt streams whose mode bits decode to invalid values.","solutions":["Re-encode the TIFF with standard G4 compression (tiffcp -c g4) and retry.","Confirm the compression tag actually matches the data (a G3 file labeled G4 decodes garbage that hits this path).","Catch and fall back to an alternative image library for these rare encodings."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    using var img = Image.Load(path);\n}\ncatch (NotSupportedException ex)\n{\n    // message 'ccitt extensions are not supported' → convert file:\n    // tiffcp -c g4 src.tif dst.tif\n}","preventionTips":["Validate compression tag matches actual data with tiffinfo before decode","Re-save producer-side files with standard G4","Batch pipelines: catch NotSupportedException and quarantine such assets"],"tags":["tiff","ccitt","group4","decoding","unsupported"],"backgroundTag":"unsupported-operation","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"}