GRID_TO_BMP
Microsoft BMP Image of 2D Grid Data


GRID_TO_BMP is a C++ program which creates a Microsoft BMP color image file that represents scalar data read from a text file.

The text file should contain the values of a quantity on an M by N grid, stored as an M by N array, which we will call "U".

The first two records of the text file should contain the values of M and N, respectively.

There should follow M records, each of length N, containing, in order, the rows of U.

This program can be used to display the output of the HEATED_PLATE program.

Usage:

grid_to_bmp input_file output_file
input_file
the text file whose first two lines record the values of M and N, with each succeeding line containing the N values of the next row of data.
output_file
the name of the output file, a BMP graphics file containing an image of the data.

Source Code:

Examples and Tests:

SOL_100x500 is a solution of the steady state heat equation on a 100x500 grid, computed by the HEATED_PLATE program.

You can go up one level to the FSU OpenMP 2008 page.


Last revised on 15 August 2008.