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 |
int->bit rawImageStream_to_BMPStream(int width, int height)
<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.
<bit>
- Outputs a bitstream suitable for generating a .BMP file 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.
bit->int BMPStream_to_rawImageStream(int width, int height)
<bit>
- Decodes a bitmap file to a raw image
<int>
- Inputs a BMP bitstream, presumably from a .BMP file 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.