SixLabors/ImageSharp · error · NotSupportedException
ccitt extensions are not supported.
Error message
ccitt extensions are not supported.
What it means
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.
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.
Defensive patterns
Strategy: try-catch
Try / catch
try
{
using var img = Image.Load(path);
}
catch (NotSupportedException ex)
{
// message 'ccitt extensions are not supported' → convert file:
// tiffcp -c g4 src.tif dst.tif
} Prevention
- 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
When it happens
Trigger: Decompress of a CcittGroup4 strip whose code word decodes to an unsupported extension mode; called from Decompress per scanline.
Common situations: Unusual fax-variant TIFFs, files written with non-standard G4 extensions, or corrupt streams whose mode bits decode to invalid values.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- ccitt extensions 1D codes are not supported.
- ccitt extensions 2D codes are not supported.
- Not supported decoder compression method
- Images with components are not supported.
- Image color space could not be deduced.
AI-assisted analysis of SixLabors/ImageSharp@59ce6af6fc (2026-09-13).
Data as JSON: /api/errors/207a86ecdc2de325.
Report an issue: GitHub.
Appendix: source
Thrown at src/ImageSharp/Formats/Tiff/Compression/Decompressors/T6TiffCompression.cs:253
a1 = b1 - 2;
scanline[unpacked..a1].Fill(fillByte);
unpacked = a1;
a0 = a1;
fillByte = (byte)~fillByte;
bitReader.SwapColor();
break;
case CcittTwoDimensionalCodeType.VerticalL3:
a1 = b1 - 3;
scanline[unpacked..a1].Fill(fillByte);
unpacked = a1;
a0 = a1;
fillByte = (byte)~fillByte;
bitReader.SwapColor();
break;
default:
throw new NotSupportedException("ccitt extensions are not supported.");
}
// This line is fully unpacked. Should exit and process next line.
if (unpacked == width)
{
break;
}
if (unpacked > width)
{
TiffThrowHelper.ThrowImageFormatException("ccitt compression parsing error, unpacked data > width");
}
}
}
/// <inheritdoc/>
protected override void Dispose(bool disposing)
{View on GitHub (pinned to 59ce6af6fc)