Bitonal Compression Unexpected Results in C#
IronPDF 2026.10.1+ introduces opt-in bitonal compression, which converts eligible images to 1-bit CCITT Group 4 through AdvancedCompressionOptions on CompressAndSaveAs, covered in the PDF compression guide. Setting BitonalMode = Force can produce three symptoms: colour images turned black and white, scans that look softer than the original, or no change at all.
Why Are My Colour Images Black and White?
BitonalMode = Force thresholds every eligible image to pure black and white, whatever it contains: colour and continuous-tone detail are discarded and cannot be restored.
Fix: leave BitonalMode at Off for PDFs with colour or photographic images, and use Force only for scanned text, faxes and line art.
Why Does My Scan Look Softer Than the Original?
With only BitonalMode = Force set, BitonalResolutionDpi stays null and falls back to TargetImageDpi, which defaults to 150: a 300 DPI scan is downsampled to 150 DPI before thresholding.
Fix: set BitonalResolutionDpi to the scan's DPI, or set TargetImageDpi = null to threshold at the source resolution. Setting BitonalResolutionDpi to 0 does not keep the source resolution: it behaves like null.
var options = new AdvancedCompressionOptions();
options.BitonalMode = BitonalCompressionMode.Force;
options.BitonalResolutionDpi = 300; // Threshold at 300 DPI
pdf.CompressAndSaveAs("output.pdf", options);
Why Did Bitonal Compression Change Nothing?
Bitonal compression skips an image without an error in these cases:
- The CCITT result was not smaller: the image keeps its current encoding. The decision is made per image, so a document can come out partly converted
- The image has a mask: an image with a soft, stencil or colour-key mask keeps its current encoding, and the mask is neither dropped nor flattened
- The image is already 1-bit: existing CCITT and JBIG2 scans are left untouched
- The PDF was compressed in memory:
CompressPdfToBytesandCompressPdfToStreamdo not acceptAdvancedCompressionOptions, so onlyCompressAndSaveAscan produce CCITT Group 4 output

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.