Classes to read and write BMP, JPEG and JPEG 2000






4.49/5 (55 votes)
Feb 2, 2003
1 min read

2202842

22597
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:
- Two classes,
CMiniJpegEncoder
andCMiniJpegDecoder
, 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. - Two classes,
CTonyJpegEncoder
andCTonyJpegDecoder
, 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. - 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.