Solved

DrawDib and JPEG

Posted on 1997-03-25
2
425 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Decoding 32 bit binary streams 6 49
Add content to output file 4 67
countEvens challenge 2 112
matchUp  challenge 9 115
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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