C# Imaging - JBIG2 Codec in C#.NET

Comprehensive Visual C# Codes for JBIG2 Codec within .NET Imaging SDK

Visual C#
Home > .NET Imaging SDK > C# > JBIG2 Codec
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

For bi-level images compression and decompression in C#.NET, RasterEdge provides JBIG2 Codec technology with flexible capabilities:
  • Read and decode any page from JBIG2 image
  • Encode a single or multi-page document into JBIG2 image
  • Detect, compress and decompress JBIG2 image form stream
  • Embed JBIG2 image into PDF documents
  • Provide lossy compression and lossless compression modes
You may see detail Visual C# image compression and decompression guide from C# image compression & decompression functions.
How to Compress and Decompress JBIG 2 in C#.NET
This guide tells users how to use JBIG2 codec to encode and decode JBIG2 images with RasterEdge .NET Imaging SDK and JBIG2 Codec in Visual C# projects. Please do as below.
  1. In Visual Studio 2005/2008/2010, create a C#.NET demo project;
  2. Integrate RasterEdge DocImageSDK & RasterEdge.Imaging.jbig2.dll to the C# project by adding project reference;
  3. Activate .NET Imaging SDK license and copy created "RasterEdgeLicense.txt" to the new project folder, together with .NET Imaging SDK DLL(s);
  4. Call RasterEdge .NET Imaging SDK & JBIG2 Imaging Add-On Namespace.
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;
using RasterEdge.Imaging.Jbig2;
For VB.NET developers, please go to JBIG2 Codec for VB.NET. Want to view Image and document in WinForms or Web applications, please go to JBIG2 Codec in WinForms and Web Document Image JBIG2 Codec.
How to Encode JBIG2 Image Using C# Code
The following C#.NET class code shows how to setup .NET Imaging SDK to decode JBIG2 images.
JBIG2Decoder JBIG2 = new JBIG2Decoder();
RegisteredDecoders.Decoders.Add(JBIG2);
How to Get JBIG2 Image Information Using C# Code
The following C#.NET class code shows how to get JBIG2 image information.
JBIG2ImageInfo info = (JBIG2ImageInfo)RegisteredDecoders.GetImageInfo("myimage.jbig2");
Console.WriteLine(info.FileFormat);
How to Reset JBIG2 Decoder Using C# Code
The following code shows how to reset JBIG2 decoder properties.
JBIG2Decoder jpeg =
(JBIG2Decoder)RegisteredDecoders.GetDecoderFromType(typeof(JBIG2Decoder));
JBIG2.ScaleFactor = JBIG2ScaleFactor.Half;
More Tutorials!
Find more user guides with RasteEdge .NET Image SDK using Visual C# sample codings!
Want to install Imaging SDK in Winforms or Web applications, please go to Use Imaging SDK in Winforms and Web Document Image Viewer.


Recommend this to Google+