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

Classes to read and write BMP, JPEG and JPEG 2000

0.00/5 (No votes)
1 Feb 2003 1  
Classes to read and write BMP, JPEG and JPEG 2000

Introduction

This sample is an MFC application using the document/view architecture that can load, display and transcode files such as BMP (bitmap), JPEG, JPP (my private format using jpeg algorithm but with fewer overheads), jpc (jpeg 2000 code stream) and jp2 (jpeg 2000 format). It shows:

  1. Two classes, CMiniJpegEncoder and CMiniJpegDecoder, to support .jpp format. JPP is my private format using jpeg algorithm but with few overheads. These two classes are made in 2001 for one application that compress, transmit, and decompress PC screen image. Someone might ask, we have a jpeg format, so what is the JPP format for? The answer is, the jpeg format is a little complex and may have a 600-byte fileheader. So I made a 6-byte header format called .jpp. Also, no FF markers are needed for .jpp. With simple format of .jpp, you could clearly watch the jpeg algorithm, that would be useful to someone learning jpeg.
  2. Two classes, CTonyJpegEncoder and CTonyJpegDecoder, to support baseline jpeg format. I have no time to support other formats such as progressive + Huffman coding. It works for almost jpeg files, just with one-thousand-line codes! But if you want powerful functionality, please use IJG code. In this demo, you could choose the jpeg codec.
  3. To show the capability of JPEG-2000, by Jasper implementation.

Contact

If you have any question, or any comments, please contact me: lintong@cis.pku.edu.cn.

History

  • 1 Feb, 2003 - First revision.

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