Click here to Skip to main content
Licence 
First Posted 1 Feb 2003
Views 335,087
Downloads 15,692
Bookmarked 80 times

Classes to read and write BMP, JPEG and JPEG 2000

By Tony Lin | 1 Feb 2003
Classes to read and write BMP, JPEG and JPEG 2000
3 votes, 5.5%
1
2 votes, 3.6%
2
4 votes, 7.3%
3
8 votes, 14.5%
4
38 votes, 69.1%
5
4.69/5 - 55 votes
5 removed
μ 4.12, σa 1.99 [?]

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

About the Author

Tony Lin

Web Developer

China China

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

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 5 Pinmemberhoummass13:20 10 Mar '11  
QuestionWhere "J2kDll.dll" comes from? PinmemberZexinDing18:30 15 Sep '09  
QuestionHow to run the program Pinmemberfayefu17:01 26 Jun '09  
Generalthank you Pinmemberfuturejo20:32 5 Jan '09  
GeneralGreat Code, Crap Article! PinmemberSteve_pqr1:35 24 Nov '08  
GeneralSimply Incredible Pinmembersoftware_chotmail1:09 27 Sep '08  
QuestionHow to run the program PinmemberMember 46578056:48 29 May '08  
GeneralJpg decoder PinmemberNIkhilesh Reddy2:22 15 Apr '08  
GeneralThe Lib fails to decode some images PinmemberSilvio Reis Jr2:17 24 Jan '08  
QuestionImageTranscode Pinmemberdejavu21:31 13 Dec '07  
Questionhow to reduce memory usage while loading background image in MFC Application? PinmemberKhathar21:45 8 Aug '07  
GeneralBad quality on Jpeg image Pinmemberdavidlks23:35 11 Jul '07  
Questiontroubles with CminiJpegEncoder/decoder Pinmemberpatkarbo9:41 20 Jun '07  
Generaljpeg progressive Pinmemberedatul muliana22:06 20 May '07  
GeneralMotion PinmemberMrPMorris6:49 6 Mar '07  
GeneralFixed marker problem PinmemberLukeMulder3:30 2 Oct '06  
General16 bits color cannot encoder Pinmembermba61:35 6 Sep '06  
Generalcontrast tiff PinmemberHoangManh17:08 3 Jun '06  
GeneralImageTranscode PinmemberAdi DEDIC1:02 23 May '06  
GeneralNeed JPEG Decoder Pinmemberkiran_siva20:00 13 Mar '06  
GeneralRe: Need JPEG Decoder PinmemberBilloKhan21:38 22 Apr '06  
GeneralCTonyJpegDecoder has a bug: does not work with pictures that have non-even dimensions! Pinmemberherculon3:29 27 Jan '06  
GeneralDemo app encodes 24bpp BMPs only PinmemberVYu21:41 25 Dec '05  
Questionbmp Pinmemberbbiondo0:58 30 Aug '05  
Questionhow about 24-bits CPU PinmemberMike033112:49 3 Jul '05  

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.

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