Achieve superior compression ratios for scanned documents and bitonal images with GdPicture.NET’s JBIG2 encoder. Read and write single-page or multipage JBIG2 files, embed JBIG2 compression in PDFs, and choose between lossless or lossy encoding for optimal quality across 100+ input formats.
JBIG2 is an image compression standard optimized for bi-level (black and white) images. This engine reads, writes, and converts with both lossless and lossy compression, delivering significantly smaller files than CCITT4 with full multithreading and AnyCPU support.
Read and write single-page and multipage JBIG2 images with complete format compatibility.
Convert documents and images from more than 100 formats to JBIG2 for archiving, storage, and distribution.
Replace CCITT/fax/decode compression in PDFs with JBIG2Decode compression for dramatically reduced file sizes.
Choose lossless compression for exact reproduction, or lossy mode with intelligent pattern matching to minimize undesired artifacts.
Achieve significantly smaller files than CCITT4 while maintaining low memory usage during encoding.
Deploy on AnyCPU with 32-bit and 64-bit support. Process documents in parallel with full multithreading.
DEMO
Upload a document to see JBIG2 compression in action. Compare file sizes and quality with your own files.
GET STARTED
Download and install the GdPicture.NET package to access compiled demo applications and multi-language sample projects with full source code.
\Samples\Bin\.\Samples\WinForm\.This example uses JBIG2 and JPEG2000 schemes to compress images in a PDF document.
using GdPicturePDFReducer gdpicturePDFReducer = new GdPicturePDFReducer();// Configure the metadata of the resulting PDF document.gdpicturePDFReducer.PDFReducerConfiguration.Author = "Nutrient .NET PDF Reducer SDK";gdpicturePDFReducer.PDFReducerConfiguration.Producer = "GdPicture.NET 14";gdpicturePDFReducer.PDFReducerConfiguration.ProducerName = "Nutrient";gdpicturePDFReducer.PDFReducerConfiguration.Title = "Image Compression";
// Specify the version and the conformance level of the output PDF document.gdpicturePDFReducer.PDFReducerConfiguration.OutputFormat = PDFReducerPDFVersion.PdfVersionRetainExisting;
// Enable automatic color detection.gdpicturePDFReducer.PDFReducerConfiguration.EnableColorDetection = true;
// Repair characters.gdpicturePDFReducer.PDFReducerConfiguration.EnableCharRepair = true;
// Control image compression.gdpicturePDFReducer.PDFReducerConfiguration.EnableJPEG2000 = true;gdpicturePDFReducer.PDFReducerConfiguration.EnableJBIG2 = true;gdpicturePDFReducer.PDFReducerConfiguration.JBIG2PMSThreshold = 0.65f;
// Run the compression process.gdpicturePDFReducer.ProcessDocument(@"C:\temp\source.pdf", @"C:\temp\output.pdf");Using gdpicturePDFReducer As GdPicturePDFReducer = New GdPicturePDFReducer() 'Configure the metadata of the resulting PDF document. gdpicturePDFReducer.PDFReducerConfiguration.Author = "Nutrient .NET PDF Reducer SDK" gdpicturePDFReducer.PDFReducerConfiguration.Producer = "GdPicture.NET 14" gdpicturePDFReducer.PDFReducerConfiguration.ProducerName = "Nutrient" gdpicturePDFReducer.PDFReducerConfiguration.Title = "Image Compression"
'Specify the version and the conformance level of the output PDF document. gdpicturePDFReducer.PDFReducerConfiguration.OutputFormat = PDFReducerPDFVersion.PdfVersionRetainExisting
'Enable automatic color detection. gdpicturePDFReducer.PDFReducerConfiguration.EnableColorDetection = True
'Repair characters. gdpicturePDFReducer.PDFReducerConfiguration.EnableCharRepair = True
'Control image compression. gdpicturePDFReducer.PDFReducerConfiguration.EnableJPEG2000 = True gdpicturePDFReducer.PDFReducerConfiguration.EnableJBIG2 = True gdpicturePDFReducer.PDFReducerConfiguration.JBIG2PMSThreshold = 0.65F
'Run the compression process. gdpicturePDFReducer.ProcessDocument("C:\temp\source.pdf", "C:\temp\output.pdf")End UsingJBIG2 is an image compression standard for bi-level (black and white) images, developed by the Joint Bi-level Image Experts Group. It offers superior compression ratios, achieving 2 to 5 times more compression than the CCITT Group 4 standard, which significantly reduces file sizes and optimizes storage and transmission efficiency.
The library provides a range of features, including:
Efficiency — Low memory usage and compatibility with multithreaded applications.
Reading and writing — Support for single-page and multipage JBIG2 images.
Format conversion — Ability to convert more than 100 document formats to JBIG2.
PDF compression enhancement — Use of the JBIG2Decode filter to improve PDF compression.
Compression modes — Options for both lossless and lossy compression, with a sophisticated pattern matching and substitution engine to minimize undesired substitutions.
The GdPicture.NET JBIG2 library integrates the JBIG2Decode filter into PDF documents, replacing less efficient compression methods like CCITTFaxDecode. This integration results in significantly reduced PDF file sizes without compromising image quality.
JBIG2 compression is specifically designed for bi-level (black and white) images, making it ideal for documents such as scanned text, line art, and technical drawings. While it offers both lossless and lossy modes, careful consideration is necessary when using lossy compression, as it may lead to unexpected substitutions in sensitive data.
The library is designed for cross-platform deployment, supporting:
Development environments — Compatible with .NET applications, including WinForms, WPF, ASP.NET, and COM/ActiveX components.
Operating systems — Windows (32-bit, 64-bit, and AnyCPU), Linux x86-64, Linux ARM-64, and macOS Universal (Intel and M series CPU based).
Frameworks — .NET Framework 4.5 and higher, .NET Core 3.1, and .NET 5.0 or higher.
60-day free trial