|Create Mandrill BMP||Lab Report|
The purpose of this program, CreateMandrillBMP, is to create the "famous" Mandrill image, which is a 512-by-512 pixel by 24 bits/pixel image, from the Red, Green and Blue Sun raster files.
Materials and Equipment
Delphi 3 (to recompile)
Sun raster files mandrill.blue, mandrill.green and mandrill.red from FTP site
VGA display in high color or true color mode. An 800-by-600 display will allow you to see the whole image at one time.
Three separate FileStreams, StreamRed, StreamGreen, StreamBlue, were used to step through the Sun raster files. After skipping over the 32-byte, each 512-byte scanline was read and put into the TBitmap scanline of a pf24bit TBitmap.
The Show Image program indicates this image has 230,427 unique RGB colors! This is amazing since the image only has 262,144 pixels. Because of the large number of unique colors, this image does not compress well. (See ZIP stats below.)
The Mandrilll.BMP image is a "classic" image that is useful in a variety of image processing and graphics experiments, such as color plane separation.
File Stream, Sun Raster File, TRGBArray, TRGBTriple, pf24bit PixelFormat, TBitmap, Bitmap.SaveToFile
Delphi 3 Source and EXE (113 KB): CreateMandrillBMP.ZIP
Input files: mandrill.red, mandrill.green, mandrill.blue (each 257 KB)
Output file: mandrill.zip (786,486 bytes compressed to 754,464 -- not much)
Updated 18 Feb 2002
since 1 Nov 1998