Solved

DrawDib and JPEG

Posted on 1997-03-25
2
427 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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…
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.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…

688 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