Retrieving Other Types of Files

The fgi_read() and fgi_readnext() functions can retrieve image files from FGI libraries. However, their use is not restricted to image files, and here's where their real value becomes apparent.

The third file stored in EXAMPLE.FGI is a 256-color bitmap file called FISH.MAP containing a picture of a fish. Before proceeding, it might be useful to see how FISH.MAP was created. We first drew the picture in a commercial paint program and saved it as a PCX file. A simple Fastgraph program then displayed the PCX file with fg_showpcx() and retrieved the fish as a mode-specific bitmap with fg_getimage(). The bitmap is 56 pixels wide by 30 bytes high, for 1,680 bytes total. The program then wrote the 1,680-byte bitmap to the FISH.MAP binary file.

<< Prev

Next >>

Contents
Fastgraph Home Page

 

copyright 2001 Ted Gruber Software, Inc.