File BMP.str.pre
Version 1.0


This file contains functions that allow one to encode BMP images. This code is based on several Google searches for "BMP file format" and is based on no specification; nevertheless, it seems to work fairly well.


Component Summary
int->bit rawImageStream_to_BMPStream
          Encodes an image to a bitmap (BMP) file.
bit->int BMPStream_to_rawImageStream
          Decodes a bitmap file to a raw imageasdf

Component Detail

rawImageStream_to_BMPStream

int->bit rawImageStream_to_BMPStream(int width, int height)
Encodes an image to a bitmap (BMP) file.

Input:
<int> - An image consisting of a number of pixels equal to its width height 3. The data is ordered top to bottom, left to right, and RGB color order.
Output:
<bit> - Outputs a bitstream suitable for generating a .BMP file
Parameters:
width - The resolution width of the image. This variable is only needed until the StreamIt language supports dynamically reconfiguring splijtoins.
height - The resolution height of the image. This variable is only needed until the StreamIt language supports dynamically reconfiguring splitjoins.

BMPStream_to_rawImageStream

bit->int BMPStream_to_rawImageStream(int width, int height)
Decodes a bitmap file to a raw image

Input:
<bit> - Decodes a bitmap file to a raw image
Output:
<int> - Inputs a BMP bitstream, presumably from a .BMP file
Parameters:
width - The resolution width of the image. This variable is only needed until the StreamIt language supports dynamically reconfiguring splijtoins.
height - The resolution height of the image. This variable is only needed until the StreamIt language supports dynamically reconfiguring splitjoins.

Please contact the author (Matthew Drake) for more information.