Visual C#.NET: Compress, Decompress JPEG2000 Images

How to compress, decompress JPEG2000 images using C#.NET
Yiigo.Image for .NET provides advanced JPEG2000 image compression & decompression support, allowing developers to compress, decompress to and from JPEG2000 format with high-quality, wavelet-based codec supported by this SDK. Find more JPEG2000 image compression and decompression information on Yiigo.Imaging for .NET JPEG2000 Plugin.
Yiigo.Imaging for .NET JPEG2000 Plugin has those following functionalities:
  • Support JPEG2000 files in *.jp2, *.jpc, *.j2k and *.j2c
  • Compress color and grayscale JPEG 2000 image data including 12 and 16 bit grayscale
  • Convert any supported image format into JPEG2000
  • Supports lossless and lossy encoding mode
  • Specify compression ratio ranging from 0 to 100
  • Encoding and decoding support for JPEG2000 image in PDF file
This document provides comprehensive Visual C#.NET samples for guiding developers to compress, decompress color and grey JPEG2000 images using Yiigo.Image for .NET. Find more JPEG2000 image compression & decompression tutorials on VB.NET JPEG2000 Compression & Decompression, Web Imaging Viewer JPEG2000 Compression Support and Compress, Decompress JPEG2000 in .NET Winforms.
JPEG2000 Compression and Decompression with C#.NET Sample Code

Requirements

Before using Yiigo.Imaging for .NET JPEG2000 Plugin in Visual C#.NET, make sure that you have installed.

Start to Compress JPEG2000 Images

  • Open and run your Microsoft Visual Studio;
  • Choose either "Visual C# Projects" in "New Project" dialog box;
  • Choose "Windows Application" in the "Templates" List and name it "YiigoImagingeJPEG2000CompressionDecompressionCsharp";
  • Right-click on the "References" folder, and select "Add Reference..." from the context menu in the "Solution Explorer" window;
  • In the "Add Reference" dialog box, select the ".NET" tab and browse to Yiigo.Imaging.Net.dll library, Yiigo.Imaging.Jpeg2000Codec.Encoder.dll library and Yiigo.Imaging.Jpeg2000Codec.Decoder.dll;
  • Add it to your Visual C# applications;
  • Call Yiigo .NET Image Namespace & Copy those following codes:
using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Jpeg2000Codec.Encoder;


Jpeg2000Encoder Compression = new Jpeg2000Encoder();
Compression.Load(@"C:/1.jp2");
Compression.CompressionMode = CompressionMode.Lossless;
Compression.CompressionRatio= "50";
Compression.save();

Start to Decompress JPEG2000 Images

using System.IO;
using System.Drawing.Printing;
using Yiigo.Imaging;
using Yiigo.Imaging.Processing;
using Yiigo.Imaging.Jpeg2000Codec.Decoder;

Jpeg2000Decoder Decompression = new Jpeg2000Decoder();
Deompression.Load(@"C:/1.jp2");
Deompression.save();
Products
Other Plugins
Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner