Interactive Sequences
GIF Sequence Exchanges for an Interactive Environment
The following sequences are defined for use in mediating control
between a GIF sender and GIF receiver over an interactive communications
line. These sequences do not apply to applications that involve
downloading of static GIF files and are not considered part of a GIF
file.
GIF CAPABILITIES ENQUIRY
The GCE sequence is issued from a host and requests an interactive GIF
decoder to return a response message that defines the graphics
parameters for the decoder. This involves returning information about
available screen sizes, number of bits/colour supported and the amount of
colour detail supported. The escape sequence for the GCE is defined as:
ESC [ > 0 g (g is lower case, spaces inserted for clarity)
(0x1B 0x5B 0x3E 0x30 0x67)
GIF CAPABILITIES RESPONSE
The GIF Capabilities Response message is returned by an interactive GIF
decoder and defines the decoder's display capabilities for all
graphics modes that are supported by the software. Note that this can
also include graphics printers as well as a monitor screen. The general
format of this message is:
#version;protocol{;dev, width, height, colour-bits, colour-res}... <CR>
'#' - GCR identifier character (Number Sign)
version - GIF format version number; initially '87a'
protocol='0' - No end-to-end protocol supported by decoder
Transfer as direct 8-bit data stream.
protocol='1' - Can use an error correction protocol to transfer GIF data
interactively from the host directly to the display.
dev = '0' - Screen parameter set follows
dev = '1' - Printer parameter set follows
width - Maximum supported display width in pixels
height - Maximum supported display height in pixels
colour-bits - Number of bits per pixel supported. The number of
supported colours is therefore 2**colour-bits.
colour-res - Number of bits per colour component supported in the
hardware colour palette. If colour-res is '0'
then no hardware palette table is available.
Note that all values in the GCR are returned as ASCII decimal
numbers and the message is terminated by a Carriage Return character.
The following GCR message describes three standard EGA
configurations with no printer; the GIF data stream can be processed
within an error correcting protocol:
#87a;1 ;0,320,200,4,0 ;0,640,200,2,2 ;0,640,350,4,2<CR>
ENTER GIF GRAPHICS MODE
Two sequences are currently defined to invoke an interactive GIF
decoder into action. The only difference between them is that different
output media are selected. These sequences are:
ESC [ > 1 g Display GIF image on screen
(0x1B 0x5B 0x3E 0x31 0x67)
ESC [ > 2 g Display image directly to an attached graphics printer.
The image may optionally be displayed on the screen as
well.
(0x1B 0x5B 0x3E 0x32 0x67)
Note that the 'g' character terminating each sequence is in lower
case.
INTERACTIVE ENVIRONMENT
The assumed environment for the transmission of GIF image data from an
interactive application is a full 8-bit data stream from host to
micro. All 256 character codes must be transferrable. The establishing
of an 8-bit data path for communications will normally be taken care of
by the host application programs. It is however up to the receiving
communications programs supporting GIF to be able to receive and pass on
all 256 8-bit codes to the GIF decoder software.