Manpages

NAME

gif2herc − Program to GIF images on an IBM PC Hercules graphic card.

SYNOPSIS

gif2herc [−q] [−d dither] [−z zoom] [−t bw] [−m map] [−i] [−b] [−h] gif-file

DESCRIPTION

A program to display images saved as GIF files on an IBM PC Hercules graphic card. The program operates as follows:

Read GIF file header and determine size of the image.

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.

Reads the image in. Interlaced images are read correctly, although they are displayed sequentially.

Display first image using the defaults as set by the command line option.

Goes to interactive mode. For full description of the interactive mode see below.

If no gif-file is given, gif2herc will try to read a GIF file from stdin.

OPTIONS

−q

Quiet mode. Defaults off on MSDOS , on under UNIX . Controls printout of running scan lines. Use −q- to invert.

−d dither

Sets size of dithering matrix, where dither can be 2,3 or 4 only (for 2x2, 3x3 and 4x4 dithering matrices). Default is 2. Note: the image will be dithered only if the mapping (see −m) selected dithering mode.

−z zoom

Sets zoom factor of the image. Zoom factor should be power of 2 up to 256. Default is 1 (no zoom).

−t bw

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%.

−m map

Select method to map colors to B&W. Mapping can be:

0

Every non-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.

−i Invert the image, i.e. black −> white, white −> black.
−b
Disable beeps. Every time the image is complete, or a wrong key was
presses, sound is generated. The −b option disables that.
−h
Print one line of command line help, similar to Usage above.

Interactive mode

Once the image is displayed, the program goes into an interactive mode which recognizes the following commands:
C
− get Color and position

In this submenu, a cursor appears and the location and color of the pixel underneath it are printed. The 4 arrows may be used (shifted for faster movement) to move the cursor. Any other key will abort this submode.

D − zoom Down

Zoom down by factor of 2 unless current zoom factor is 1.

H − Increase dither matrix size

...unless current size is maximum (4), in which case size is set to minimum (2).

I − Invert

Invert the image, i.e. white −> black, black −> white.

M − Method

Increment color −> BW mapping method, unless current method is maximum (2), in which case method is set to minimum (0).

R − Redraw

Redraw the image.

S − print Status

Print status of image and program.

U − zoom Up

Zoom up by factor of 2 unless current zoom factor is 256.

arrow keys

The 4 arrow keys can be used to pan in the desired direction, if the image overflows in that direction. If the image fits into the screen, arrow keys are ignored. The panning steps are 1/2 screen if not on image end.

SPC − abort

Space bar may be used to abort current image drawing.

ESC − abort

Escape may be used to abort current image drawing.

SEE ALSO

gif2bgi(1), gif2epsn(1), gif2iris(1), gif2ps(1), gif2rgb(1), gif2rle(1), gif2x11(1), gifasm(1), gifbg(1), gifburst(1), gifclip(1), gifclrmp(1), gifcolor(1), gifcomb(1), gifcompose(1), giffix(1), giffiltr(1), gifflip(1), gifhisto(1), gifinter(1), gifinto(1), gifovly(1), gifpos(1), gifrotat(1), gifrsize(1), gifspnge(1), giftext(1), gifwedge(1), icon2gif(1), raw2gif(1), rgb2gif(1), rle2gif(1), text2gif(1)

COPYRIGHT

The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond

AUTHORS

Gershon Elber

Eric S. Raymond <esr [AT] snark.com>