Click here to Skip to main content
Click here to Skip to main content

Classes to read and write BMP, JPEG and JPEG 2000

, 1 Feb 2003
Rate this:
Please Sign up or sign in to vote.
Classes to read and write BMP, JPEG and JPEG 2000
<!-- Download Links --> <!-- Add the rest of your HTML here -->

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

Share

About the Author

Tony Lin
Web Developer
China China
Dr. Tony Lin, received his PhD degree from Peking University, Beijing, China, in 2001. His interests are in Pattern Recognition, Wavelets, and Programming.

Comments and Discussions

 
Question你能发给我一份技术规范文档吗 Pinmembersurenyufu14-May-13 15:59 
QuestionHow to build the program ? Pinmembervhmau31-Aug-12 0:32 
AnswerRe: How to build the program ? Pinmembersurenyufu12-May-13 0:24 
GeneralMy vote of 5 Pinmemberhoummass10-Mar-11 13:20 
QuestionWhere "J2kDll.dll" comes from? PinmemberZexinDing15-Sep-09 18:30 
QuestionHow to run the program Pinmemberfayefu26-Jun-09 17:01 
Generalthank you Pinmemberfuturejo5-Jan-09 20:32 
GeneralGreat Code, Crap Article! PinmemberSteve_pqr24-Nov-08 1:35 
GeneralSimply Incredible Pinmembersoftware_chotmail27-Sep-08 1:09 
QuestionHow to run the program PinmemberMember 465780529-May-08 6:48 
GeneralJpg decoder PinmemberNIkhilesh Reddy15-Apr-08 2:22 
GeneralThe Lib fails to decode some images PinmemberSilvio Reis Jr24-Jan-08 2:17 
QuestionImageTranscode Pinmemberdejavu13-Dec-07 21:31 
Questionhow to reduce memory usage while loading background image in MFC Application? PinmemberKhathar8-Aug-07 21:45 
GeneralBad quality on Jpeg image Pinmemberdavidlks11-Jul-07 23:35 
Questiontroubles with CminiJpegEncoder/decoder Pinmemberpatkarbo20-Jun-07 9:41 
Generaljpeg progressive Pinmemberedatul muliana20-May-07 22:06 
GeneralMotion PinmemberMrPMorris6-Mar-07 6:49 
GeneralFixed marker problem PinmemberLukeMulder2-Oct-06 3:30 
General16 bits color cannot encoder Pinmembermba66-Sep-06 1:35 
Generalcontrast tiff PinmemberHoangManh3-Jun-06 17:08 
GeneralImageTranscode PinmemberAdi DEDIC23-May-06 1:02 
GeneralNeed JPEG Decoder Pinmemberkiran_siva13-Mar-06 20:00 
GeneralRe: Need JPEG Decoder PinmemberBilloKhan22-Apr-06 21:38 
GeneralCTonyJpegDecoder has a bug: does not work with pictures that have non-even dimensions! Pinmemberherculon27-Jan-06 3:29 
GeneralDemo app encodes 24bpp BMPs only PinmemberVYu25-Dec-05 21:41 
Questionbmp Pinmemberbbiondo30-Aug-05 0:58 
Questionhow about 24-bits CPU PinmemberMike03313-Jul-05 12:49 
GeneralExcellent article PinmemberDuncan1234515-Feb-05 22:43 
Generalj2kdemo PinmemberImageResearcher31-Jul-04 0:41 
GeneralAbout DCT coefficient PinmemberBlack:R31-Mar-04 2:16 
Generalnice code Pinmemberlonic22-Feb-04 20:15 
GeneralFile name error in ImageTranscode API Pinmemberedwm20-Feb-04 18:55 
GeneralAA&amp;N Pinmemberptgeorge10-Jan-04 8:26 
GeneralJpeg 2000 PinmemberDebasish Nath6-Jan-04 2:52 
GeneralRe: Jpeg 2000 PinsussAnonymous22-Sep-05 1:54 
GeneralJPEG2000 Pinmemberligs200111-Nov-03 19:22 
GeneralRe: JPEG2000 Pinmemberedwm19-Feb-04 17:34 
Questionjpeg2000? Pinmembernicebruce4-Oct-03 18:17 
AnswerRe: jpeg2000? PinmemberTony Lin6-Oct-03 4:04 
GeneralRe: jpeg2000? Pinmembernicebruce8-Oct-03 17:16 
QuestionHow to skip the error JPEG frame? PinmemberJames.Newman3-Aug-03 16:17 
GeneralJPEG2000 decoding in memory Pinsussotbfm26-Jun-03 5:21 
GeneralRe: JPEG2000 decoding in memory PinmemberTony Lin26-Jun-03 21:21 
GeneralJpeg-2000 PinsussYuli Kaplunovsky20-Jun-03 0:16 
GeneralRe: Jpeg-2000 PinmemberTony Lin20-Jun-03 19:48 
GeneralA question PinmemberJaneQian5-Jun-03 18:59 
GeneralA question. PinmemberJaneQian5-Jun-03 18:43 
Generalthe quality of the out put jpeg file is poor PinmemberHeway5-Jun-03 3:43 
GeneralRe: the quality of the out put jpeg file is poor PinmemberTony Lin20-Jun-03 19:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 2 Feb 2003
Article Copyright 2003 by Tony Lin
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid