Solved

Binary data to BMP file format

Posted on 2006-06-19
3
419 Views
Last Modified: 2013-11-19
How to convert binary data to BMP format?
I acquired raw data from a camera 320x240 pixels per frame. I have one binary file containing 3600 frames. I need to write a program in C++ to take the file and convert each frame to a BMP image.

 
0
Comment
Question by:almhuq
[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
3 Comments
 
LVL 12

Accepted Solution

by:
rajeev_devin earned 125 total points
ID: 16939396
0
 
LVL 18

Expert Comment

by:JoseParrot
ID: 16948020
Hi,

Chances to be wrong, as I have a sequence of assumptions.
As you  have 3600 frames, I understand it is a clip, a short film in 320x240 pixels format, BTW a typical small format film. Most film cameras or photo cameras capturing films record the films in mpg format.

If these assumptions are correct, what you need is to convert a MPG or AVI film by exporting each frame to a series of BMP image format. As you tell abot a raw file it icould be also an uncompressed file.

Whatever you have, you must know what format is, to chose the right codec to decode the film. As soon you read the file, your program can convert frame by frame to BMPs. This will be a complicated task, if you are not an experienced graphics programmer. And a tedious task.

A practical way to do it is simple play your film and, at same time, run a program that capture the image at a appropriated rate, say 15 or 30 mframes per second. Such capturing program can be found at
http://www.codeguru.com/cpp/g-m/bitmap/capturing/article.php/c4919/

Things will be simpler if you know the raw film format. And much more simpler if the raw file isn't compressed.

You can share more information with us, if you have more.

Jose
0
 
LVL 18

Expert Comment

by:JoseParrot
ID: 16956801
Please accept my appologies due my mistake. I didn't pay attention on rajeev_devin answer and have suggested the same! Thank you. Sincerely, Jose
0

Featured Post

Technology Partners: 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

Suggested Solutions

Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Not only does Prezi allow you to create non-linear presentations, it also makes it easy to apply transition animations between your frames. Learn how to apply a fade-in transition to select items and entire frames in this tutorial Select "Edit Path"…
Learn how to download your full Prezi presentation for offline presenting. Prezi doesn’t have to be viewed and shared in a web browser, even with a free account you can download your full presentation to share with others. Be sure to download any vi…

756 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