Click here to Skip to main content
Licence 
First Posted 1 Feb 2003
Views 343,627
Bookmarked 81 times

Classes to read and write BMP, JPEG and JPEG 2000

By | 1 Feb 2003 | Article
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

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 Pinmemberhoummass12:20 10 Mar '11  
QuestionWhere "J2kDll.dll" comes from? PinmemberZexinDing17:30 15 Sep '09  
QuestionHow to run the program Pinmemberfayefu16:01 26 Jun '09  
Generalthank you Pinmemberfuturejo19:32 5 Jan '09  
GeneralGreat Code, Crap Article! PinmemberSteve_pqr0:35 24 Nov '08  
GeneralSimply Incredible Pinmembersoftware_chotmail0:09 27 Sep '08  
QuestionHow to run the program PinmemberMember 46578055:48 29 May '08  
GeneralJpg decoder PinmemberNIkhilesh Reddy1:22 15 Apr '08  
GeneralThe Lib fails to decode some images PinmemberSilvio Reis Jr1:17 24 Jan '08  
QuestionImageTranscode Pinmemberdejavu20:31 13 Dec '07  
Questionhow to reduce memory usage while loading background image in MFC Application? PinmemberKhathar20:45 8 Aug '07  
GeneralBad quality on Jpeg image Pinmemberdavidlks22:35 11 Jul '07  
Hi Tony,
 
i convert my bmp to jpg but i found that the quality was so bad. This is mainly because i think my image snap by camera then process by Matrox. IF I use Paint to create a bitmap then convert to jpg it looks just normal. Do you have any idea why is that happen? If yes, please email me davidlks83@yahoo.com
 
Thanks
David
Questiontroubles with CminiJpegEncoder/decoder Pinmemberpatkarbo8:41 20 Jun '07  
Generaljpeg progressive Pinmemberedatul muliana21:06 20 May '07  
GeneralMotion PinmemberMrPMorris5:49 6 Mar '07  
GeneralFixed marker problem PinmemberLukeMulder2:30 2 Oct '06  
General16 bits color cannot encoder Pinmembermba60:35 6 Sep '06  
Generalcontrast tiff PinmemberHoangManh16:08 3 Jun '06  
GeneralImageTranscode PinmemberAdi DEDIC0:02 23 May '06  
GeneralNeed JPEG Decoder Pinmemberkiran_siva19:00 13 Mar '06  
GeneralRe: Need JPEG Decoder PinmemberBilloKhan20:38 22 Apr '06  
GeneralCTonyJpegDecoder has a bug: does not work with pictures that have non-even dimensions! Pinmemberherculon2:29 27 Jan '06  
GeneralDemo app encodes 24bpp BMPs only PinmemberVYu20:41 25 Dec '05  
Questionbmp Pinmemberbbiondo23:58 29 Aug '05  
Questionhow about 24-bits CPU PinmemberMike033111: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.120529.1 | Last Updated 2 Feb 2003
Article Copyright 2003 by Tony Lin
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid