Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

WSQ to BMP converter

0.00/5 (No votes)
7 Feb 2013 18  
A WSQ to BMP converter.

Introduction

This is a C# conversion of JNBIS, a decoder library for WSQ images. JNBIS is written in Java. The code basically has been converted from NBIS Version 1.1 which was written in the C programming language. The NBIS (NIST Biometric Image Software) distribution was developed by NIST (National Institute of Standards and Technology) for the FBI (Federal Bureau of Investigation) and DHS (Department of Homeland Security).

Using the code

Using this converter is straightforward:

FileStream fs = File.OpenRead(@"C:\sample_image.wsq");
byte[] fileData = new byte[fs.Length];
fs.Read(fileData, 0, fileData.Length);
 
WsqDecoder decoder = new WsqDecoder();
Bitmap bmp = decoder.Decode(fileData);
bmp.Save(@"C:\sample_image.bmp");

You can use the WSQ sample image file from the Cognaxon website. 

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here