?
Solved

DrawDib and JPEG

Posted on 1997-03-25
2
Medium Priority
?
428 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 450 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

777 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