6.5.2. CONVERTING BINARY IMAGE FILES WITH BIN2GIF

next, previous Section / Table of Contents / Index Raw binary format files representing BALSAC screen graphics as pixel images, see Sec. 6.4.7, can be converted with utility BIN2GIF to GIF type files. The format "GIF" (graphics interchange format) was developed and registered originally by CompuServe Inc. for interchanging graphics information between computers in wide area networks. It is now widely accepted as a standard pixel image format and is implemented in a large variety of network and image processing software. While GIF has been published as a standard format the internal LZW (Lempel-Ziv-Welch) compression algorithm is patented and its free use may conflict with patent/copyright laws. Public domain utility BIN2GIF included in the Unix/X.11 version of BALSAC has been written by K. Hermann and H. Junkes (FHI). It is based on a file output subroutine written by Michael Mauldin and David Rowley for the xv image processing software available as a public domain package. BIN2GIF is started from the unix command line using the command bin2gif binfile giffile where binfile is the name (up to 72 characters) of a raw binary format input file and giffile (up to 72 characters) denotes the GIF type output file which will be generated by conversion from binfile. The conversion includes an analysis of the pixel image reading Number of colors = NOCOLT Graphics array size = LGIMX x LGIMY = NPIXL pixels where NOCOLT refers to the number of different colors in the pixel image and LGIMX, LGIMY describe the image size with NPIXL = LGIMX*LGIMY. The conversion finishes with a message "GIF file giffile written" confirming the output. Possible errors during conversion exit bin2gif with an error message "BIN2GIF: open binfile fails ..." if the input file (= binfile) is missing or corrupt. "BIN2GIF: malloc fails ..." if the conversion requires more internal memory than is available at present. "BIN2GIF: save gif giffile fails ..." if the conversion failed (wrong input file format) or the output file (= giffile) could not be saved. Note that this utility is available only with the Unix/X.11 version of BALSAC. next, previous Section / Table of Contents / Index