Solved

Binary data to BMP file format

Posted on 2006-06-19
3
406 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
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
rajeev_devin earned 125 total points
Comment Utility
0
 
LVL 18

Expert Comment

by:JoseParrot
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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…

772 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

11 Experts available now in Live!

Get 1:1 Help Now