?
Solved

Binary data to BMP file format

Posted on 2006-06-19
3
Medium Priority
?
432 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 375 total points
ID: 16939396
0
 
LVL 18

Expert Comment

by:Jose Parrot
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:Jose Parrot
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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 …
It’s easy to embed any of your public Prezi presentations on your website or social network to share with others. Learn how simple it is in this tutorial.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Suggested Courses
Course of the Month7 days, 20 hours left to enroll

765 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