Gif2Herc -------- Program to display images saved as GIF files on IBM PC Hercules graphic card. The program has few stages as follows: 1. Reads GIF file header and determines size of it. 2. Dynamically allocate enough memory to hold all the image internally. One byte per pixel is always allocated, so a little bit more than width*height (of screen, not image) bytes are required. 3. Reads all the image in. Interlaced images are read correctly in, although they are displayed sequentially. 4. Display first image using the defaults as set by the command line option. 5. Goes to interactive mode. For full description of the interactive mode see below Usage: ------ Gif2Herc [-d DitherSize] [-z ZoomFactor] [-t BWThreshold] [-m Mapping] [-i] [-b] [-h] GifFile If no GifFile is given, Gif2Herc will try to read stdin for GIF file. Memory required: ---------------- Screen. Options: -------- 1. [-d DitherSize] : Sets size of dithering matrix, where DitherSize can be 2,3 or 4 only (for 2x2, 3x3 and 4x4 dithering matrices). Default is 2. Note image will be displayed in this mode only if Mapping (see -m) selected this mode. 2. [-z ZoomFactor] : Sets zoom factor of the image. Zoom factor should be power of 2 up to 256. Default is 1 (no zoom). 3. [-t BWThreshold] : Sets threshold level for B&W mapping in percent. This threshold level is used in the different mappings as selected via -m. Default is 19%. 4. [-m mapping] : Select method to map colors to B&W. Mapping can be: 0 : Every none background color is considered foreground (white). 1 : 0.3 * RED + 0.59 * GREEN + 0.11 * YELLOW > BWThreshold is considered white. 2 : Colors are mapped as in 1, and use dithering of size as defined using -d option. BWthreshold is used here as scaler. Default is option 0 which is much faster than the other two. 5. [-i] : Invert the image, i.e. black -> white, white -> black. 6. [-b] : Disable beeps. Every time image is complete, or wrong key was presses, sound is generated. -b disables that. 7. [-h] : print one command line help, similar to Usage above. Interactive mode: ----------------- Once the image is displayed, the program goes into interactive mode which recognizes the following commands: 1. C - get Color and Position. In this sub menu, a cursor appears, and the Color of the pixel the cursor is on, with its position in GIF file screen are printed. The 4 arrows may be used (shifted for faster movement) to move the cursor. Any other key will abort this sub mode. 2. D - Zoom Down by factor of 2 unless current zoom factor is 1. 3. H - Increase dither matrix size, unless current size is maximum (4), were size is set to minimum (2). 4. I - Invert the image, i.e. white -> black, black -> white. 5. M - increase Color -> BW mapping method, unless current method is maximum (2), were method is set to minimum (0). 6. R - Redraw the image. 7. S - print Status of image and program. 8. U - Zoom Up by factor of 2 unless current zoom factor is 256. 9. 4 arrow keys can be used to pan to the desire direction, if the image overflow to that direction. If, on the other hand, the image fit into the Hercules device, arrow keys are ignored. The panning steps are 1/2 screen if not on image end. 9. ' ' - Space bar may be used to abort current image drawing. 10. ESC - Escape key may be used to abort the program.