Solved

DrawDib and JPEG

Posted on 1997-03-25
2
423 Views
Last Modified: 2013-11-20
Hi.

I'm using Visual C++ 4.2 and I have a simple(?) question for you:

How can I use the DrawDib routines in Visual C++ to load and display JPEG files?
The help topic on "About the DrawDib functions" says:
"The DrawDib functions support several compression and decompression methods, including run-length encoding, JPEG, Cinepak, 411 YUV, and Indeo™."

I have inspected mmreg.h and found JPEGINFOHEADER and lots of JPEG-stuff. But how do I use it???

Please help!
0
Comment
Question by:Greven
2 Comments
 

Author Comment

by:Greven
ID: 1300642
Edited text of question
0
 
LVL 4

Accepted Solution

by:
mbhakta earned 150 total points
ID: 1300643
JPEG compression though follows most of the encoding/compression techniques you have discussed doesnot mean that DrawDIB will show a JPEG image so easily. You will need to extract the JPEG header and convert it into a DIB to display it on the screen. Looks like a big task. Not really... Mainly because JPEG has been documented pretty well on the net and there are discussion groups available who discuss about JPEG day and night.

There are several ways to procure a JPEG displayer :
- Contact the Independent JPEG group or visit their site. They have ready made cross-platform source code available for your use. Compile it and you are ready. But most of these code/s are to do with conversion from JPEG to BMP etc. So doing the UI and displaying it on the screen is your job.

- The other procurement source is buying a 3rd party imaging package like Accusoft, Imageman, LeadTools etc. They roughly cost between $500 - $1500 and take care of all the head-aches for you.

I would take the first approach and do it myself. Mainly because reading thru the code is absolutely beautiful.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video discusses moving either the default database or any database to a new volume.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now