COMPUTER GRAPHICS
GIF and Animated GIF Files


Table of Contents


Review readings, homework, previous learning module


Learning objectives for Module 5

Upon successful completion of this module, students should be able to:


7.1 GIF file specifications.


7.2 Animated GIF file specifications.

THE FOLLOWING DISCUSSION IS TAKEN FROM THE GIF CONSTRUCTION SET DOCUMENTATION


HEADER BLOCK

SCREEN WIDTH and SCREEN DEPTH: These are the dimensions in pixels of the screen the GIF file would like to be displayed on. They can be any value greater than zero. Note that the screen dimensions do not affect the dimensions of images displayed from a GIF file, but they may affect where on your screen the images are placed in a fully compliant GIF viewer. For GIF files destined for web pages, these fields should define a rectangle which just encloses all the other elements in your file. Left to its own devices, GIF Construction Set will set these fields correctly each time you save a file.

BACKGROUND: The background is the colour of the area around the images to be displayed if the images in question don't fill your screen. The background is actually a number drawn from the current global colour palette... if the palette is changed, the actual colour displayed may change too. To change the background colour, click on the colour button in the Edit Header dialog and select a new colour. The number in the Background colour button is the actual palette index being used.

GLOBAL PALETTE: The global palette flag tells GIF viewers whether a GIF file includes a global palette. If you change this flag, GIF Construction Set for Windows will look at the GIF file you're working on to see if there are images which expect a global palette and prompt you accordingly. In most applications of GIF files, it's desirable to have a global palette. You can save palettes from GIF Construction Set for Windows to disk files and load them in as new global or local palettes. The size of the current palette is shown to the right of the Load button.

The SORTED FLAG of Edit Header box allows you to set the state of the sorted palette flag in the header of GIF files. This flag has no affect on how GIF Construction Set for Windows displays images – it may be of importance to other applications which read your GIF files.


IMAGE BLOCKS

LEFT and TOP: These fields determine where the image in question will be displayed on your screen relative to the upper left corner. The values are in pixels.

INTERLACED: This flag determines whether the image in question will be stored interlaced or normally. If you have enabled the Display Interlaced item in the Setup dialog this will affect how GIF Construction Set for Windows displays images. It will also change how images appear in applications which display them one line at a time. Interlaced images are commonly used in World Wide Web pages.

LOCAL PALETTE: You can enable a local palette for any image block in a GIF file. By default, the palette for the image in question will be used. You can also load and save palettes, as in the Edit Header field. Be careful doing this... you might wind us with an image having very weird colours. The Load and Save buttons will only be active if you have switched on the local palette option. The number of colours in the current image palette will be displayed below the Local Palette switch.

The VIEW BUTTON of the Edit Header dialog will display the image in question. Specifically, it will display it against a solid colour background – grey by default – with a set of purple guides indicating where the screen area defined by the screen width and screen depth fields of the current header block would fall. This assumes that your screen area and image are smaller than your screen. The background colour can be defined through the GIF Construction Set for Windows Setup dialog, discussed elsewhere in this document.

When you create a new GIF file, a header block will be created automatically. The colour depth is set by the Default Colour Depth item in the GIF Construction Set Setup dialog. This value can subsequently be modified by loading a palette with a different colour depth.


COMMENT BLOCKS

A COMMENT BLOCK consists entirely of text. The Edit Comment Block dialog is a text editing window in which you can add, modify and delete the text of a comment block. Under GIF Construction Set for Windows , a comment block can include up to 32,767 characters.

The FORMAT BUTTON of the Edit Comment Block dialog will toggle between displaying text in the conventional chunky Windows font and displaying it in a monospaced font. The former is better for editing a lot of text, while the latter is useful if you'd like to create formatted comment blocks.


PLAIN TEXT BLOCKS

PLAIN TEXT blocks consist of text and some information about how to display it. The text can be edited the same way comment block text is handled. The following fields define how plain text blocks will be displayed:

Text left and text top: These fields define where the text will appear on your screen, relative to the upper left corner of the viewing area. These values are defined in pixels.

Grid wide and grid deep: These fields define a rectangle in which your text will be drawn. A grid ten wide and twelve deep would allow for twelve lines of up to ten characters each. Text which doesn't fit in the grid defined by a plain text block is not displayed.

Cell wide and cell deep: These fields define the dimensions of the characters used to display text. In theory, a GIF viewer should look at these fields and create a suitable monospaced font to display the text in question. In most cases this is not so – GIF Construction Set for Windows included. Most GIF viewers will use a font which is eight pixels wide and anywhere from eight to 32 pixels deep.

Foreground and background: These are the colours used to display the text in question. Note that if a plain text block is preceded by a control block which defines a transparent colour, one of these colours can become transparent. You can select these colours either by clicking on their colour buttons or by using the eyedropper tool to pick colours from the previous image block if one is present. The eyedropper tool will not be active if there is not at least one image block before the current plain text block.

Block title: This item will be enabled if the Write Directory Block item in the Setup dialog is checked. If you enter some text in this field, it will apear in the IMAGE line corresponding to the block in question in the main window of GIF Construction Set. By default this field will contain the name of the file from which the image was drawn if you imported the image with GIF Construction Set.

The View button will display the image preceding the plain text block being edited with the text in question superimposed over it. Note that the View buttons in the edit dialogs will not display an entire complex GIF file. They'll only display the current block. If your image does not display correctly, please read the section of this document that deals with the About dialog for a discussion of Windows screen drivers. Hit Esc or click the right button of your mouse to exit the View mode.


CONTROL BLOCKS

Transparent colour: If this switch is turned on, one of the global palette colours in subsequent image or plain text blocks will be regarded as being transparent by GIF Construction Set for Windows when you view a complete GIF file. This means that rather than displaying areas of this colour, it will allow whatever is underneath the displayed image or text to show through. You can select this colour either by clicking on the colour button to the right of the switch or by using the eyedropper tool to pick a colour from the next image block if one is present. The eyedropper tool will not be active if there is not at least one image block after the current plain text block.

Wait for user input: If this switch is turned on, a GIF viewer displaying your GIF file will display the next image or plain text block and pause for user input. User input is usually a key press or a mouse click.

Delay: This is the number of 100ths of a second a GIF viewer will pause after displaying the next image or plain text block. If Wait for User Input is also enabled, the delay can be interrupted by a key press.

Remove by: This tells a GIF viewer what do with an image after it has been displayed. Be careful of the Previous Image option... some GIF viewers have problems with this if you ask a really big image to be removed this way.

The View button will display the image preceding the control block being edited with any transparent effects that you've defined. Note that the View buttons in the edit dialogs will not display an entire complex GIF file. They'll only display the current block. If your image does not display correctly, please read the section of this document that deals with the About dialog for a discussion of Windows screen drivers. Hit Esc or click the right button of your mouse to exit the View mode.


LOOP BLOCKS

A loop block includes one field, to define the number of times the images in the GIF file in question will repeat. Note that a Loop block will always appear as the second block in a GIF file, no matter where you insert it. Only one Loop block can appear in a GIF file.


PALETTE EDITORS

The Header and Image block dialogs include facilities to edit the palettes of their respective blocks. This can be a very powerful feature or a very destructive one, depending on whether you understand what it's up to.

Every pixel in a GIF image is drawn in one of the colours in the image's palette. If you change the colour of one of the palette entry, all the pixels referenced by that palette entry will change.

In a multiple-image GIF file with a global palette, changing the colour in one palette entry in the global palette will change the colour of all the pixels referenced by that palette entry in all the images in the file.


INSERTING BLOCKS

You can add blocks to a GIF file with the Insert button of the GIF Construction Set for Windows button bar. A dialog will appear to allow you to select the type of block you wish to insert. Inserted blocks are always inserted immediately after the currently selected block.

If you attempt to insert an image block into an existing GIF file, a dialog will appear prompting you for the file to insert. Images can be drawn from files in the following formats:

PNG..........These are compressed graphics created to replace GIF

PC Paintbrush PCX..........The native file format of Z-Soft's PC Paintbrush software

CompuServe GIF..........Among the most widely used PC image file formats

Truevision Targa..........Supports all Targa files

Windows /OS2 BMP.......... Supports all BMP files, including those from OS/2

JPEG JPG..........All JPEG files will be displayed in 256 colours

You can insert multiple images into a GIF file at once – each one will appear as a separate Image block. Select multiple images in the Open dialog by holding down the Ctrl key and clicking on each image you want to insert. Hold down the Shift key and click to select a range of images.

Note that if you import an image from a GIF file using the Insert function, the first image in the file will be read, even if the file actually contains multiple images. Use the Merge command of GIF Construction Set for Windows, discussed later in this document, for an alternate approach to importing images from GIF files.

If you attempt to insert an image which has a different palette from the current global palette of your GIF file, a dialog will appear asking how you'd like to handle the new image's palette. These are the available options:

Use a local palette for this image. If you do this, no colour shifts or dithering effects will be introduced into the image, but very nasty things may happen if you attempt to display this image concurrently with other images in the file. You can't use plain text blocks with local palette images. Local palettes are usually not a very good idea for conventional display applications. If you attempt to import a true colour image with this option, it will be dithered to a 256-colour image internally.

Use a local grey palette for this image. The image will be converted to grey scale and installed with a local palette. All of the foregoing considerations for local palettes still apply.

Remap this image to the global palette. This is a good choice for mechanical images... drawings and such... and a really bad choice for photographs. Each colour in the source image will be replaced by the closest match from the global palette. This will usually make photographs look posterized.

Dither this image to the global palette. This is a good choice for photographs. It will give you the best colour match... and usually the most attractive results... with a slight loss in detail resolution.

Use this image as the global palette. This option will only be available if no other image blocks currently exist in your GIF file, such as when you create a new file. The global palette for the header of the file will be drawn from your imported image. If you attempt to import a true colour image with this option, it will be dithered to a 256-colour image internally.

Use it as is. No checking or correction will be performed, and the colours in your imported image will fall where they may. This option is useful if you know that certain colours in your imported image correspond to colours in the current global palette, such as for images created to be overlays with transparent colours. Plan on radical colour shifts and Andy Warhol's worst nightmare if this is not the case.

If you insert other types of blocks... specifically control, comment or plain text blocks... default blocks will be created which you can subsequently edit, as has been discussed.

The Use This Selection for Subsequent Images option will save time if you're importing multiple images into a GIF file in one pass. It will apply the current selection in the dialog to the remainder of the images to be imported. Note that this item will not be enabled if you have selected Use This Image as the Global Palette, as a GIF file can only have one global palette.

See the section elsewhere in this document on Inserting Images through Drag and Drop for an alternate technique for inserting Image blocks.


MERGING BLOCKS

The Merge feature in the GIF Construction Set for Windows File menu will allow you to import all the blocks in a GIF file... except for the header block... into the current file. They will be inserted starting just after the currently selected block. Image blocks will be handled using the same logic discussed previously for inserting individual image blocks... a dialog may appear prompting you to choose a strategy for handling palette conflicts.

You can use the Merge function to import selected images from a multiple-image GIF file. Merge the whole file and delete the blocks you don't need.


EXTRACTING BLOCKS

The Extract feature in GIF Construction Set for Windows will allow you to select one or more blocks in an existing GIF file and have them written out to a new GIF file. GIF files created by Extract must contain at least one Image block – the Save button will not be active until at least one Image block is selected. The Header block will automatically be adjusted to define a rectangle that encloses the images in the extracted file. The other parameters of the new Header block will duplicate those of the source Header block.


DELETING BLOCKS

You can delete any block save for the header by selecting it and clicking on the Delete button. Note that once a block is deleted, it's gone for good.


MANAGING BLOCKS

The Manage function in the Block menu will let you globally change the Control blocks in your GIF files. It's useful for adding lots of Control blocks at one time, deleting lots of Control blocks without wearing your mouse down to a puddle of molten plastic and for changing the characteristics of lots of Control blocks.

Depending on the options you select, the Manage function's file selector will deal with Image or Control blocks. Specifically:

Insert Before Selected Images: This option will insert a new Control block before each of the selected Image blocks.

Insert Where Required: This option will insert a new Control block before each of the selected Image blocks which is not presently preceded by a Control block.

Set All Existing Controls: This option will change the parameters of each of the selected Control blocks. Note that this pertains to all control blocks, even if they precede Plain Text blocks, rather than Image blocks.

Delete Selected Controls: This option will remove all the selected Control blocks. No other blocks will be affected.

Image Block Position options: This section allows you to set the Left and Top fields of all the selected image blocks. If you enable the Absolute option, all the blocks will be set to the values specified in the two spin button fields. Otherwise, the left and top values will be incremented by the values in the spin button fields, beginning with the left and top values for the first selected block.

Note that if you click on the titles for the spin button fields when the Absolute switch is not enabled, they'll change, allowing you to decrement the initial values as well. These fields cannot have values less than zero.

Note that you can only select Control and Image blocks in the file selector list for the Manage function. You can select multiple items in this dialog – hold down Ctrl and click on multiple items, hold down Shift and click on the beginning and then on the end of a range of items or hold down your mouse button and drag it over a range of items.

Inserting Images through Drag and Drop

An alternate way to insert image blocks into a GIF file is to drag your source images from File Manager, Explorer or any other Drag and Drop-compliant file shell to the GIF Construction Set main window. Simply select the files you wish to insert and click and drag them to GIF Construction Set. The files will be treated as if you had selected them through Insert Image. An Image block will be created for each dropped file and inserted after the currently selected block in your GIF file.

By default, GIF Construction Set will add a Control block to your GIF file for each Image block it inserts through Drag and Drop. If you do not wish to have Control blocks added automatically, open the Setup dialog and switch off Add Controls for Drop.

You can only drop files into an open GIF file, or into an empty GIF file created by selecting New from the File menu. If you attempt to drop files into GIF Construction Set while it's displaying file and directory names, rather than the blocks of an open file, it will automatically create an empty GIF file to begin receiving image files.

GIF Construction Set will ignore files with extensions other than those it recognizes as graphic files.


VIEWING GIF FILES

The View button in the main window of GIF Construction Set for Windows will display a GIF file using a fully compliant viewing function. The viewing area, as defined by the screen dimensions of the file header, will be centred in the main window of your screen if it's bigger than your screen. Each displayable block will appear in the order it's defined in the GIF file. You can terminate the display any time you like by clicking the right button of your mouse or hitting the Esc key.

The background of the view mode may appear dithered on systems with colour mapped screen drivers. This can be changed using the Setup dialog of GIF Construction Set for Windows, as discussed elsewhere in this document.

If the screen dimensions defined by a GIF file's header block are greater than the dimensions of your screen, scroll bars will appear to allow you to pan over the displayed image.


CREATING NEW GIF FILES

To create a blank GIF file, select New from the File menu. A blank GIF file always includes a header block. You can add blocks to a new GIF file with the Insert and Merge functions.


OPENING AND SAVING GIF FILES

Any GIF 87a or 89a file can be opened into GIF Construction Set for Windows. Files created with GIF 87a headers will be converted internally to GIF 89a files. As discussed previously, you can open a GIF file either by selecting the Open item from the File menu of GIF Construction Set for Windows or by double clicking on the name of a GIF file in the main list of the application window. It's possible that extremely complex GIF files... those with lots of blocks... may not open completely. See the section of this document dealing with the Setup dialog for information about getting around this.

If you enable the Write Thumbnail option of the Save As dialog, each file written by GIF Construction Set for Windows will be accompanied by a thumbnail. Thumbnails are stored in files with the extension .THN. As such, the thumbnail for PICTURE.GIF would be called PICTURE.THN. The thumbnails created by GIF Construction Set for Windows are compatible with those used by Graphic Workshop for Windows and other Alchemy Mindworks applications which support thumbnails.

Thumbnails will appear in the application window of GIF Construction Set for Windows if you select a GIF file prior to opening it. A thumbnail always represents the first image in a multiple-image GIF file.

Unregistered copies of GIF Construction Set for Windows will add a comment block to any GIF file you save. This comment block will not appear once you register GIF Construction Set for Windows.


EXPORTING GIF FILES

The Export function will create a new, single-image GIF file which contains all the display elements of a multiple image GIF file. It will export what you would see on your screen if you were to click on View. Note that it will ignore image blocks which would be removed to the background image.

The Courier New TrueType font that accompanies Windows must be installed for Export to render Plain Text blocks correctly.


CUTTING, COPYING AND PASTING BLOCKS

You can cut or copy the current block of a GIF file to the Windows clipboard using the appropriate items of the Edit menu. A block copied to the Windows clipboard will have its block structure stored as hexadecimal data defined in OEM text. Plain text and comment blocks will have their text stored as conventional Windows text. Image blocks will have their image information stored as conventional Windows device-independent bitmaps.

It's a really bad idea to mess with the OEM text objects copied from GIF Construction Set for Windows and then paste them back into GIF files.

You can copy a bitmap from another application onto the clipboard as a device-independent bitmap and paste it into a GIF file through GIF Construction Set for Windows. It will be given an image block on the way in, which you can subsequently edit if you like.


CLOSING GIF FILES

If you select the Close item of the File menu of GIF Construction Set for Windows, the current GIF file will be closed and the list in the main application window will revert to showing you the names of all the GIF files in your current directory. Opening a new GIF file automatically closes the current one.


CONVERTING MOVIES TO GIF FILES

GIF Construction Set for Windows will convert an AVI video clip file into an animated GIF file. There are two possible catches to using this feature – GIF files so created can get very large, and may take a while to create. The latter will be especially true if your source AVI file has a lot of frames, or frames with relatively large pixel dimensions. Ten-megabyte AVI files aren't uncommon – ten megabyte GIF files are not well regarded as adjuncts to web pages.

To convert an AVI file to GIF, select Convert Movie to GIF from the File menu of GIF Construction Set for Windows. Select a source AVI file. A dialog will appear to let you choose a colour management strategy for your GIF file. Here are the choices and what they mean:

Dither to the Netscape 216-colour palette: This will preserve the photographic quality of a photorealistic movie if it's viewed on a machine running Netscape and a 256-colour driver. This is technically the safest choice for movies which will be displayed in web pages – it will introduce some dithering into your movies, but it will avoid radical colour shifts even on cheap computers from Sears.

Remap to the Netscape 216-colour palette: This is technically the best choice for line art movies, such as those created by digital animation software, if you want them to look right in web pages which might be displayed by 256-colour machines.

Dither to the 256-colour orthogonal palette: This will do a slightly better job of dithering movies, especially 24-bit movies, than the Netscape 216-colour palette option. At least, it will if your movies will be displayed on a machine with a 32,768-colour or better screen driver. Machines with 256-colour drivers will cause Netscape to introduce some colour shifts into movies with this palette.

Remap to the 256-colour orthogonal palette: This uses a slightly larger palette for line-art movies. It will give you slightly better results for movies shown on a machine with a 32,768-colour screen driver or better, and slightly worse results for 256-colour machines.

Use source image palette: This option makes no attempt to adjust the source palette of the movie being converted, and it doesn't dither anything. This will unquestionably produce the best-looking results for movies to be displayed by GIF Construction Set's View mode and by Netscape for machines with 32,768-colour screen drivers or better. Machines with 256-colour drivers will probably introduce some colour shifts into movies converted with this option. Life's a bitch this way. This option is also vastly quicker than the previous four, as it doesn't have to process each frame of the source image. You can't use this option with 24-bit source movies.

All of the foregoing notwithstanding, you should probably use the source image palette option unless you have a good reason for doing otherwise. The resolution of most movie files at the moment isn't all that impressive as it is, and introducing dithering into them will noticeably degrade them. Plan to experiment with this a bit.

Note: Converting movie files to GIF files can create a lot of blocks. Plan on two blocks per frame, plus at least a header and possibly a loop block. If you encounter memory or block access errors during conversion, increase the Maximum Blocks value in Setup and try it again. A good start for Maximum Blocks is 1024.


SUPERCOMPRESSOR

The Supercompression option of the GIF Construction Set File menu will squeeze a bit more compression out of the GIF file format. It applies several technques to GIF images to allow you to store them in less disk space, and hence to download them in less time.

Note that in some cases the supercompressor will actually modify the images in your files. They will display as if nothing has happened to them, but they may prove difficult to edit or use in other applications. It's a very good idea to save your supercompressed images to a new file name, and keep your original files as they were.

Supercompression applies the following techniques to your files. Not all these options will be available all the time -- in files which will not benefit by using them, they will be disabled.

Palette Compression: This function analyses all the images in a GIF file and figures out how many palette colours are being used by them. Unused colours can be discarded from the global palette. If enough unused colours turn up, the image can be compressed with fewer bits per pixel, saving some space. Note that this feature often manages to reduce the colour depth of images without making their file sizes all that much smaller. Unused bits in GIF pixels compress very effectively, and as such don't contribute all that much to file sizes when they're present.

Prune Compression: This function, also called "dirty rectangle" compression, will prune away the exterior of an image if the area below it has the same pixels. It only works on GIF files having multiple images, and then only if the images have identical edges. Having pruned an image, it will relocate the new image to place it correctly over the underlying image, with the result that nothing will appear to have changed when the GIF file is displayed. This feature will not be available if your GIF file includes one or more Control blocks with transparency enabled or with their Remove By fields set to Background or Previous Image.

Comment Block Deletion: This function removes all the Comment blocks in a GIF file. Please don't use this feature indiscriminately, such as to remove the copyright notice of someone else's GIF file. Note that Comment blocks added automatically by GIF Construction Set, such as identity and unregistered shareware blocks, will be deleted by this dunction but they will reappear when you save your file.

Plain Text Block Deletion: This function removes all the Plain Text blocks and their associated Control blocks from a GIF file. At present, most web browsers do not support Plain Text blocks, so these elements can be removed if they're found without changing the appearance of a displayed GIF file.

The supercompressor can often reduce your GIF files considerably -- but it won't turn a behemouth file into something reasonable. In some cases it won't do anything at all -- check its status display for an indication of how effective it has been.

Note that you must Save a supercompressed file once compression is complete.


FLIP AND ROTATE

The Flip and Rotate function will allow you to rotate some or all of the blocks in a GIF file in 90-degree increments, and flip them horizontally and vertically. To use it, select Flip and Rotate from the Block menu. In the dialog that appears, select the blocks you wish to modify, or click on Select All to modify all the image blocks in your GIF file. Select the function you wish to use and click on Apply. Click on OK to return to the main GIF Construction Set window.


CROP

The Crop function will remove the area outside a selected rectangle for some or all of the images in a GIF file. Because the frames in animated GIF files tend to be fairly small, Crop will let you set the cropping rectangle dimensions numerically.

In using the Crop function, the Crop dialog will show you the first selected image. If the image is too large to fit in the available space, it will be scaled to fit. This only affects what you see -- your actual images will remain at their original size and resolution, minus whatever you decide to crop off them.

Be careful in using the crop function -- it's fairly easy to crop the first of several frames correctly only to find that subequent frames used to have things that extended outside the crop area, but don't any longer.

Once an image has been cropped, the cropped-off areas are gone for good. It's a really good idea to Save As your cropped GIF files to a new name.

Cropping supports all the section features of the Manage function, discussed elsewhere in this document.


SCALE

The Scale function will allow you to change the size of one or more images in a GIF file. You can scale images by size or factor -- that is, you can scale them to specific pixel dimensions or you can scale them by a percentage. Note that scaling to a factor of 100 percent has no effect. Scaling to a factor of 50 percent will result in a graphic which is half the size of the original. Scaling to a factor of 200 percent will result in a graphic which is twice the size of the original.

In scaling down, the Scale function throws away some of the pixels in your source image. In scaling up, it duplicates some of the pixels. As such, scaling always introduces some image degradation into your graphics. Use it carefully.

Once an image has been scaled, the changes made to it are permanent. It's a really good idea to Save As your scaled GIF files to a new name.

Scaling supports all the section features of the Manage function, discussed elsewhere in this document.


SCRIPTING

Note: the Scripting feature of GIF Construction Set is quite technical and is in no way part of the primary function of the software. Unless you specifically need to have another program create GIF files automatically by calling GIF Construction Set, you are strongly advised to be nice to your mind and skip this section.

The scripting feature of GIF Construction Set allows another application to use GIF Construction Set as a GIF-building engine. In its script mode, GIF Construction Set will not display anything unless you ask it to. It reads a list of instructions from a text file, its "script", and builds a GIF file accordingly. When it's done, it terminates.

Unregistered users of GIF Construction Set will see the GIF Construction Set shareware beg notice when the script mode terminates. No notice will appear for registered users.

To run GIF Construction Set in script mode, you must pass it a path to your script file and append /S to the file name. For example, here's how you would run GIF Construction Set and have it execute the script called MYSCRIPT.SCR in the directory \TEXT.

C:\GIFConstructionSet\GIFCON32.EXE C:\TEXT\MYSCRIPT.SCR/S

A script file consists of commands for GIF Construction Set, with one command per line. Most commands generate GIF blocks. Commands usually have arguments which set parameters in the GIF blocks being created. An argument consists of the argument name, an equal sign and the argument data. For example, this argument defines a file path:

PATH=C:\PICTURES\VENUS.GIF

Here are the legal commands for a script file and their arguments. The commands and arguments shown in bold are mandatory -- if they're not present, your script will not execute. If you omit the optional arguments, default values will be used. If a script fails to execute, no GIF file will be created and GIF Construction Set will return a non-zero error code.

Script arguments which include spaces must be surrounded by quotation marks, like this:

TEXT="This is a comment block"

Comment lines can be added to a script by preceding them with a semicolon. These lines will be ignored by GIF Construction Set.

STATUS

The STATUS command does not create a block in your GIF file. It's used to help you work out the problems in scripts that don't seem to be behaving themselves. It can be added to a script to create a log of what's happening when your script exectutes. It recognizes the following arguments:

PATH

The PATH argument should define a path to a text file which GIF Construction Set will create and write its log to. The log will include each of the script lines processed until the script is complete or until an error occurs. In the latter case, an error message will be the last entry in the log.

SHOWERROR

The SHOWERROR argument can be either TRUE or FALSE. If it's TRUE, a message window will appear when GIF Construction Set finishes processing a script or encounters an error.

FILENAME

The FILENAME command defines the file name and path for the file to be created by the script. It recognizes the following argument:

PATH

The PATH argument defines the destination file name.

HEADER

The HEADER command creates a Header block. The must be one HEADER command in every script file, and it must precede all other commands with the exception of STATUS and FILENAME. It recognizes the following arguments:

PATH

The PATH argument defines a file from which the global palette of the GIF file should be extracted. This can be either a GIF Construction Set CMP colour map file or an image file in any supported format. If PATH specifies a 24-bit image, the 256-colour orthogonal palette will be used. The PATH argument should not be used if the PALETTE argument is present. If neither PATH nor PALETTE are used, the default palette type as set in GIF Construction Set's Setup dialog will be used.

BACKGROUND

The BACKGROUND argument defines the colour index number of the background colour for the file. Its argument can be a number between zero and 255. Make sure that you don't specify a background value larger than the size of the global palette.

PALETTE

The PALETTE argument will select one of GIF Construction Set's default palette types. Its value must be one of the following:

PALETTE2 -- Two colours

PALETTE16 -- Sixteen-colour Windows reserved

PALETTE32 -- 32-colour orthogonal

PALETTE64 -- 64-colour orthogonal

PALETTE128 -- 128-colour orthogonal

PALETTE216 -- 216-colour Netscape

PALETTE256 -- 256-colour orthogonal

PALETTE256G -- 256-colour orthogonal with 32 greys

PALETTE256GREY -- 256-level grey scale

LOCAL -- No palette

The PALETTE argument should not be used if the PATH argument is present. If neither PATH nor PALETTE are used, the default palette type as set in GIF Construction Set's Setup dialog will be used.

IMAGE

The IMAGE command adds an Image block to your GIF file. It recognizes the following arguments:

PATH

The PATH argument defines a path to the source file for the Image block being created. The source image can be in any of the graphic file formats supported by GIF Construction Set.

MODE

The MODE argument tells GIF Construction Set how to manage the palette of this image if it doesn't match the global palette. The values for the MODE argument can be:

DITHER -- Dither to the global palette

REMAP -- Remap to the global palette

LOCAL -- Use a local palette

COMMENT

The COMMENT command adds a comment block to your GIF files. It recognizes the following arguments:

TEXT

The TEXT argument defines the literal text to be used in the Comment block being created. It should be fairly short -- command lines in Script mode are limited to 256 characters. The TEXT argument should not be used if the PATH command is present.

PATH

The PATH argument specifies a path to a plain ASCII text file from which text for a larger Comment block can be read. Formatted word processing documents and other sorts of files are not suitable. Up to 32767 characters can be included in a comment block, although few users of your GIF files will thank you if you include anything like this much text in them. The PATH argument should not be used if the TEXT command is present.

LOOP

The LOOP command adds a LOOP block. For proper operation, this command must appear immediately after the HEADER command. It recognizes the following argument:

ITERATIONS

The ITERATIONS argument defines the number of times your GIF file will loop. It must have a value between zero and 32767.

CONTROL

The CONTROL command adds a Control block to your GIF file. A GIF file should have one Control block before each Image block. The CONTROL command recognizes the following arguments:

DELAY

The DELAY argument specifies the number of 1/100ths of a second for the following image to be visible before it's removed. This number can range between zero and 32767.

TRANSPARENT

The TRANSPARENT argument specifies a transparent colour index. It must range between zero and 255. Make sure you don't specify a colour beyond the range of your image palette.

WAITFORINPUT

The WAITFORINPUT argument can be either TRUE or FALSE. It defines whether the Wait for User Input flag will be enabled in this Control block. Note that at present Netscape ignores this flag.

REMOVEBY

The REMOVEBY argument defines the method by which your image will be removed from the screen when the delay period has expired. It can be one of the following values:

NOTHING -- The image is left unremoved

ASIS -- The image is left unremoved

PREVIOUS -- The image is replaced by the previous image

BACKGROUND -- The image is replaced by the background

Note that under Netscape, only NOTHING and BACKGROUND are recognized.

Here's an example script file:


;
; EXAMPLE SCRIPT
;
STATUS PATH="c:\test.txt" SHOWERROR=TRUE
LOOP ITERATIONS=10000
FILENAME PATH="c:\test.gif"
HEADER BITS=8 PATH="C:\GIF\APR89.GIF"
CONTROL INTERLACE=TRUE
IMAGE PATH="C:\GIF\APR89.GIF" MODE=DITHER
COMMENT TEXT="This is an example comment block."
COMMENT PATH="c:\text\textfile.txt"
CONTROL DELAY=1000 REMOVEBY=PREVIOUS
IMAGE PATH="C:\GIF\WINGS.GIF" MODE=DITHER INTERLACE=TRUE
;
;END OF SCRIPT
;

Keep in mind that the script mode has fairly limited sanity checking -- if you fill its brain with monkey dandruff, you'll probably find monkey dandruff in your GIF file.


THE SETUP DIALOG

The GIF Construction Set for Windows Setup dialog can be called up through the Setup item of the File menu. It includes the following fields.

- Display Interlaced: If this switch is enabled, image blocks with interlaced images will appear in interlaced order.

- Draw Frame Guides: It this switch is enabled, purple guides will appear to define the image area of a GIF file being viewed using the View buttons of the edit dialogs. Guides do not appear in the main View function.

- Use Image Offsets: If this item is not enabled, images will be displayed centred on your screen, rather than where the position fields of their image blocks say they're supposed to be. There are few good reasons for doing this.

- Dither View Background: This item is ignored on systems with screen drivers that can display more than 256 colours. If your current Windows screen driver can display 256 or fewer colours, setting this switch on will cause the background of the main View mode to be dithered to approximate the setting of the background field of the header block of the GIF file being displayed. Setting it off will cause the closest match from the current global palette to be used, allowing for Window's somewhat funky palette management strategy. See the section of this document which deals with the About dialog of GIF Construction Set for Windows for information about how to determine the number of colours your current Windows screen driver can display.

- True Transparency: If this item is enabled and you're using a Windows screen driver with better than 256 colours, you'll see transparent GIF files displayed correctly. If it's disabled – or if you have a sixteen- or 256-colour Windows screen driver installed in your system – GIF Constrcution Set will use Windows' GDI calls to handle transparency, which are less than wholly reliable. They are somewhat faster, however. If you find the length of time it takes GIF Construction Set to display transparent elements in GIF files excessive, try disabling this feature. This switch will be ignored if you have a sixteen- or 256-colour driver installed.

- Write directory block: If this item is enabled, GIF Construction Set will preserve the titles of the image blocks in your GIF file in a Block Title block written after all the other blocks in the file. This is helpful in keeping track of the images in an animation sequence, for example. This item should be disabled if you are creating GIF files for use on web pages.

- Interlace Delay: This is the number of milliseconds GIF Construction Set waits after it display one line of an interlaced image.

- Dither contrast and dither brightness: These values only affect monochrome dithering in the image block import function. If you attempt to import a colour image into a monochrome GIF file, it may be dithered to two colours, depending on the palette option you select. These fields can be used to fine tune the dithering.

- Maximum blocks: When a GIF file is opened in GIF Construction Set for Windows, a fixed number of blocks will be allocated for it. If you exceed this number, no new blocks will be accepted. The default value, 255, will suffice for all but the most complex GIF files. You can increase this number if you run out of blocks or if GIF Construction Set for Windows refuses to open a very complex GIF file because it has more than 255 blocks. Note that changes to this field will not take effect until the next time you open or create a GIF file. If you run out of blocks you must save your current GIF file, change this field and open the file again.

Setting the Maximum Blocks field higher than it needs be will tie up excessive memory and probably slow down Windows and applications running under it.

- Default Palette: This item sets the initial palette size for the header of blank GIF files created with the New function of the File menu. There are a number of palette options:

- 256 colours: This palette has an even dispersal of colours between black and white.

- 256 colours with grey: This palette has an even dispersal of colours between black and white, but it includes 32 levels of grey.

- 216 colours/Netscape: This is the palette Netscape uses to remap colour images to for a 256-colour machine. This should be the default palette setting for creating photorealistic GIF files for use with Netscape.

- 32, 64 and 128 colours: These are evenly dispersed palettes. The 32-colour palette is a bit dificient in blues.

- 16 colours: This is the sixteen-colour Windows palette.

- 2 colours: This palette includes all the colours of the rainbow, provided they're black and white.

- Adjust Header on Save: If this item is enabled, GIF Construction Set will calculate the correct Screen Width and Screen Depth values for every GIF file it saves to disk. It's a really good idea to let it do this.

- Check Animations: If this item is enabled, GIF Construction Set will analyze GIF files which have more than one image as it saves them to disk and warn you if they contain elements that might cause problems under Netscape. You can ignore these warnings for non-animated GIF files. The EXAMPLE.GIF file that comes with GIF Construction Set will set off lots of warnings if you attempt to save it to disk – this is nothing to be concerned about, as it's not an animated GIF file.

- File Identification: If this option is enabled, GIF Construction Set will add a comment block to each GIF file it writes. The comment block will identify of the owner of the copy GIF Construction Set that wrote the file. If you're a registered user of the software, this will be your registration name and the company you work for, as entered when you installed Windows. If you're using an unregistered copy of GIF Construction Set, this will be your name and company as entered when you installed Windows, or a message stating that this information could not be found. Alternately, you can supply your own text for this block. To do this:


1. Make sure GIF Construction Set is not running.
2. Use the Notepad application to edit \WINDOWS\GIFCON.INI
3. Locate the entry IdentificationFile and add a path to the text file to use.
4. Save the file.

The text file pointed to by IdentificationFile must be pure ASCII text, not a word processor document. It can contain up to 16000 characters, although few users of your GIF files will thank you for including anything like this much comment text in them. Tabs will be replaced by single spaces.

GIF Construction Set will only add one identification block to a GIF file -- if it finds one in the file it's editing, it will not add a second one. This assumes that the text of the one it finds matches the text it would otherwise have written, of course.

You can use this feature to automatically add a copyright message to files that you create with GIF Construction Set -- make sure that this message does not accidentally get added to files which you did not create, but merely opened and meddled with a bit.

If this item is disabled, no identification comment block will be added to your files.

- Add Controls for Drop: If this item is enabled, a Control block will be added automatically for each mage block created when image files are dragged to GIF Construction Set.

- Registration Name: You can turn a shareware copy of GIF Construction Set for Windows into a registered copy by entering your name in the registration field and clicking on Accept. A dialog will appear prompting you for the key word provided with the receipt for your registered copy of GIF Construction Set. Enter this word and click on OK.

Once you have successfully registered GIF Construction Set for Windows, you will no longer see the beg notice when the application terminates and the extra comment block added when you save a file will not appear. In addition, you'll have great karma and our leather-winged demon of the night won't regard you as a handy source of protein... something well worth considering.


THE ABOUT DIALOG AND WINDOWS SCREEN DRIVERS

The About button in the button bar of GIF Construction Set for Windows will display a beg notice for unregistered versions and a grey dialog with a unicorn for registered versions. The latter dialog will also tell you several useful things about your computer, such as the amount of memory Windows thinks is free and the number of colours your current Windows screen driver can display without dithering. The latter is very important... if you attempt to view a 256-colour GIF file on a system with a sixteen-colour driver installed, the resulting images will look posterized and ugly. This does not mean that GIF Construction Set for Windows is misbehaving... you must update your Windows screen driver to see 256-colour images correctly.

If you have an unregistered copy of GIF Construction Set for Windows, you can see the latter dialog by holding down the shift key and clicking on the Ok button in the beg notice dialog. You should do this if you are not seeing 256-colour images displayed correctly to check if the problem is with your screen driver.

As an aside, this works the other way, too... should you have reason to wish to see the unregistered beg notice dialog after you've registered, hold down the shift key and click on the Ok button.


ABOUT THE BLOCK NAME BLOCKS

At times it's convenient to know which files the source images in a multiple image GIF file have come from, or to otherwise add titles to the Image blocks in a GIF file. The GIF specification doesn't allow for this to be done per se, but GIF Construction Set provides this facility through its Block Name blocks. If the Write Block Titles option in Setup is enabled, GIF Construction Set will add an extra Application block to GIF files it writes with title information for the Image blocks in the files in question.

By default, the title for an image will be the name of the file the image was read from when you imported the image into GIF Construction Set with the Insert function. You can change this by editing the title in the Edit Image dialog.

If you turn off the Write Block Title option, delete the Block Name block from a GIF file and then save the file, the Name Block will go away. This will delete the names and free up whatever space they occupy. It's probably a good idea to do this if your GIF files are bound for a web page.

The Block Name blocks associate text with blocks based on the block position in your GIF files. If you use another application to add or delete blocks to a GIF file, the block information probably won't appear, or won't appear correctly.


CREATING BANNERS

Banners are GIF files which contain text. This can be simple text – that is, a single image GIF file with words painted on it – or it can be an animated GIF file with text which scrolls from right to left.

Banner text can be painted with one of three effects:

Simple: the text is painted in the foreground colour against the background colour.

Shadow: The text is painted in the foreground colour against the background colour with a shadow in the shadow colour.

Embossed: The text is painted as an embossed object in the foreground colour against the background colour.

Backlight: The text is painted in black against a black background. A glow appears around the outline of the text. The glow colour is set by the Backlight button.

Neon: The text is outlined in the Foreground colour and a glow in the Backlight colour appears around it. For the most attractive results, the Foreground colour should be black, white or something close to the Backlight colour -- other combinations may look ugly enough to mutate bacteria.

Soft Shadow: The text is drawn in the Foregound colour with a grey soft shadow. The density of the shadow can be set with the Grey Level button. The displacement between the text and its shadow is set by the Offset button. Note that this function does some internal cheating with the palettes of the images it creates -- its images may look a bit dithered if you display them on a 256-colour machine. If the Extra Soft item is enabled, the shadow will appear more diffused -- this effect becomes increasingly noticeable as the shadow density becomes darker. Soft Shadow text is always drawn against a white background.

Banners almost always use the current default palette, as set in the GIF Construction Set Setup dialog. The exception is the Soft Shadow effect, which uses a grey-scale palette. Changing the default palette resets the colours in the Banner dialog. Also, note that only the Simple text option is available if the two-colour default palette is selected.

The Rolling option determines whether a banner will be a single static image or a sequence of images in which the text appears to move from right to left. Note that rolling banners with large fonts can create very large GIF files.

The Cells option determines the number of frames in a rolling GIF banner.

The Delay option sets the number of 100ths of a second between cells for a rolling banner.

The Loop option determines whether a rolling banner will repeat indefinitely or only display once.

The Offset control sets the offset in pixels between text and its drop shadow or the size of embossed text. Banners with a drop shaodw of one or two pixels and a a drop shadow colour of black or another very dark colour look pretty cool.

The Font button selects the font to be used in creating a banner.

The Transparent Background option sets the background colour to be transparent for the banner you're creating. This effect won't really be visible in the Test mode, as the default background of your GIF file will be the same as the background colour – banners with transparent background will appear as such in web pages.

The Foreground, Background and Shadow colour buttons set the colour values to be used in creating banners.

The Test button will let you preview your banner.

The Sample Text window will show you the font size and colours for your banner – drop shadow and emboss effects will not appear in this window.

If the palette compression option is enabled, your GIF file will be stored with the least possible colour depth.


CREATING TRANSITIONS

Transitions are single image GIF files which have been augmented with special-effect transitions to make them appear and disappear in interesting ways. To create a transition, begin by selecting the source image with the Select button. Note that Transition doesn't modify your source image – it creates a new copy of it.

Transitions with large source images can create unworkably large final GIF files. Be careful how you use this feature if you're creating images for web pages.

Here are the current special effects supported by the Transitions feature:

Adam Seven Interlace: This will display your image one pixel at a time, in complex interlace order. This effect simulates the interlacing used by PNG files.

Horizontal Split: Your image will appear in two sections, with half rolling in from the left of your frame and half rolling in from the right.

Sandstorm: Your image will appear one pixel at a time, in random order.

Tile: Your image will appear in small squares, in random order.

Vertical Split: Your image will appear in two sections, with half rolling in from the bottom of your frame and half rolling in from the top.

Wipe in From Bottom: Your image will roll in from the bottom of your frame.

Wipe in From Left: Your image will roll in from the left side of your frame.

Wipe in From Right: Your image will roll in from the right side of your frame.

Wipe in From Top: Your image will roll in from the top of your frame.

The Select button will allow you to choose the source image for your transition. Source images can be in any of the file formats GIF Construction Set supports for import, as discussed elsewhere in this document.

The Cells option determines the number of frames in a transition.

The Delay option sets the number of 100ths of a second between cells for a transition.

The Loop option determines whether the transition will repeat indefinitely or only display once.

The Transparent Background option sets the background colour to be transparent for the transition you're creating. This effect won't really be visible in the Test mode, as the default background of your GIF file will be the same as the background colour – transitions with transparent background will appear as such in web pages.

The Remap to Default Palette option will cause your source image to be adjusted to use the currently selected default palette, as configured in the Setup dialog. This may result in noticeable dithering artifacts if your source image has already been dithered once, but it improves Netscape's colour reproduction for 256-colour systems.

The Background colour button sets the background to be used in creating transitions.

The Test button will let you preview your banner.

The Pause After Cycle option causes a transition to pause when it has completed its image, and before it begins to remove it. The pause also occurs after an image has been completely removed if the Loop option is enabled. The duration of the pause is set by the Pause spin button.

The Appear and Disappear options determine whether your transition will include an appearing sequence, a disappearing sequence or both. One or both options must be enabled.

If the palette compression option is enabled, your GIF file will be stored with the least possible colour depth.

Note that you can modify transitions once they've been created and opened in GIF Construction Set, just as you would other animated GIF files. For example, you can combine different transitions by merging a file with just the Appear phase enabled with one having just the Disappear phase enabled.


CREATING LED SIGNS

The LED Sign function of GIF Construction Set for Windows will allow you to create scrolling banners which resemble the LED signs found in subways, video stores, airports and many up-market churches. You can program GIF Construction Set's signs for colour changes, adjustable playback speed and varying sign dimensions.

The text for an LED sign is displayed in white LEDs by default. Technical sorts will observe that there's no such thing as white LEDs -- we would note that this is only true in the real world, with which LED signs have as little contact as possible. You can change the display colour at any point in the text by embedding a colour code. Colour codes consist of the @ sign followed by a letter. Here are the legal colour codes:


@R -- red
@G -- green
@B -- blue
@C -- cyan
@M -- magenta
@Y -- yellow
@W -- white

Here's some example coded text:

This text is @Rred, @Ggreen, @Bblue, @Ccyan, @Mmagenta, @Yyellow, @Wand white.

This is what the colours would appear as in the LED sign function:

You can include as many colour changes as you like in a sign, as long as the total text length including the colour codes is no greater than 260 characters.

LED signs can generate a large number of individual images, and hence potentially large GIF files. Mitigating this to some extent is the nature of the individual images in a sign. They're sixteen-colour graphics, and use simple, predictable shapes that compress well. As such, it's possible to create fairly complex signs without necessarily making them unworkably long to download. Note the observations about file size below.

Here's what the controls in the LED Sign function do:

Loop: If this item is enabled, the sign will continually repeat itself. If it is not enabled, this sign will cycle once and go dark.

Show Dark Pixels: If this item is enabled, LEDs that are not lit up will be displayed as dark grey. Note that this will typically increase the file size of a GIF file containing an LED sign -- you will probably want to leave this one disabled.

Smooth Scroll and Columns per Frame: If the Smooth Scroll option is enabled, the sign text will scroll smoothly, moving by the number of pixels defined in the Columns per Frame control. This should be set to one for the smoothest scrolling. If Smooth Scroll is disabled, the sign text will scroll by the width of one character per frame. This is arguably less attractive, but it will typically create signs with far fewer images, and as such much smaller file sizes. If you do create signs with smooth scrolling enabled and you need to reduce the final file size, try increasing the Columns per Frame value slightly. This will result in somewhat less smooth scrolling, but will reduce the number of images involved in displaying a complete sign quite a lot.

Compact Sign: If this item is enabled, GIF Construction Set will create small signs. If it's disabled, it will create large signs. Large signs look slick, but they result in much larger files.

Columns Wide: This field sets the number of vertical columns of LEDs in the sign to be created. Large values will result in wider signs, capable of displaying more text at once, but also in larger final files.

Delay: This field sets the delay in 1/100ths of a second between images. Increase this value to slow down the scrolling of an LED sign. Note that if you adjust the Smooth Scroll or Columns per Frame items in the LED Sign dialog, you'll probably have to change this value as well.

Palette Compression: If this option is enabled, your GIF file will be stored with the least possible colour depth.

The text in a sign can consist of any printable ASCII characters between ASCII 32, a space, and ASCII 126, a tilde. Any other characters will be displayed as a double dagger symbol.


CREATING WIDE PALETTE GIF FILES

Wide palette GIF files can only be created by the 32-bit version of GIF Construction Set.

The Wide Palette GIF File option will let you create GIF files which can display more than 256 colours. This probably sounds much more useful than it really is -- while it genuinely works, it embodies some serious catches. Before you use this feature, please take a moment to understand what it's up to so you don't wind up bashing your head against a wall in frustration.

A GIF image can only store a maximum of 256 colours. However, a GIF file can store any number of images. If each image has its own local palette, it's possible to have more than 256 different colours stored in the file.

This is what wide palette GIF files do. If the source image you wished to store in one had 510 distinct colours, GIF Construction Set would create a GIF file with two Image blocks. The first Image block would have a local palette with the first 255 colours of your source image in it. The second Image block would have a local palette with the second 255 colours from your source image. Each palette would also have one colour that did not appear anywhere in your source image, to be used as a transparent colour.

In discussing wide palette GIF files, the Image blocks that your source image will be split into are called "panes".

The actual images would be constructed such that those pixels of your source image which appeared in their palettes would appear in the images in question, and the transparent colour would appear everywhere else.

When such a GIF file is displayed, the first Image block will take care of the first 255 colours, and the second Image block will take care of the second 255 colours. Because the "unused" pixels are transparent, the two frames would essentially be merged when the display was completely updated, with the result that 510 distinct colours would be displayed.

In practical terms, a 24-bit source image must be "quantized" to derive a suitable list of colours, that is, a large palette must be derived from it based on the dispersal of source colours. The Wide Palette GIF function of GIF Construction Set lets you select how large this palette can get.

Wide palette GIF files allow you to enjoy lossless images having lots of colours in a format which is compatible with existing web browsers. However, they embody some important catches, as follows:

- Wide palette GIF files tend to get large, as they require that a single 24-bit image be split into multiple 256-colour images, each of which must be stored separately.

- While Netscape, Explorer 3.0 and GIF Construction Set will display wide palette GIF files correctly, almost nothing else will. This includes most GIF viewers and paint packages.

- If a wide palette GIF file is displayed on a system running with a 256-colour screen driver, it will look really awful.

- Wide palette GIF files cannot include transparency, as they use transparent colours for their own purposes. They could in theory be animated, if you wanted to push the envelope, but the results would be very, very slow and quite ugly.

- Netscape does occasionally refuse to display GIF files with local palettes if it's really starved for resources, and some of its betas have been known to crash under these conditions. Be warned.

Wide palette GIF files are created through the Wide Palette GIF option of the edit menu of GIF Construction Set. Here's what its options do:

Maximum number of colours: This sets the maximum possible wide palette size. If your image turns out to have fewer distinct colours than this, the palette may get smaller. As each pane in a wide palette GIF file can hold a maximum of 255 colours -- plus one transparent colour -- this also defines the maximum number of panes.

Interlace: If this option is enabled, the pane images of your wide palette GIF file will be written interlaced. This looks really slick in GIF Construction Set, but it will typically have no effect in Netscape, which does not display interlaced images as interlaced when they occur in multiple image GIF files.

Add Initial Sketch Image: If this option is enabled, the panes of your wide palette GIF file will be preceeded by a fairly coarse sixteen-colour version of the image, which will eventually be wholly overwritten by the following panes. It's something to look at in the mean time, however. Turn this feature off if you want to create slightly smaller GIF files. The sketch image ignores the Interlace option, and is always non-interlaced.

Fifteen-bit Quantize: This option will allow the wide palette GIF function to choose a better wide colour palette. It takes a lot longer to complete its work, however.

Wide Palette Dither: This option allows the wide palette GIF function to dither its images, minimizing the banding effects of colour remapping. Dithering with several thousand colours looks really sharp.

Select: Use this button to load a source image. Source images must be stored as 24-bit files -- that is, as true-colour BMP, JPG, TGA, PCX and PNG files, and other suitable formats. You cannot use a GIF file as the source for the Wide Palette GIF function.

Sorted Palette: If this option is enabled, the wide palette created by the Wide Palette GIF function will be sorted, such that the brightest colours appear first, and turn up in the first panes. If it's not enabled, the palette colours will appear randomly. This won't affect how your wide palette GIF images look when they're finally displayed, but ti does affect what they look like as they're being built up on your screen. This is especially true if you enable the Interlaced switch.

Test: This feature will test a wide palette GIF image. Considering the time it takes to create one of these things, you might want to skip the Test function.

Click on OK to create a wide palette GIF file. This feature takes a fairly long time to run -- it can be aborted by clicking anywhere within the GIF Construction Set window. When it's complete, your wide palette GIF file will have been opened in the main list box of GIF Construction Set. Click on View to see what it looks like -- mind the earlier warning that it will look pretty ugly on a system with a 256-colour screen driver.

By default, the background colour of a wide palette GIF file will be white -- you can change this by editing its Header block. This doesn't matter to a web browser, which ignores the background colour values in GIF files.

Select the maximum colour size carefully. More colours will produce much better looking final images, but they'll also create much larger final GIF files.

Note: If you save a wide palette GIF file, open it into GIF Construction Set and then save it again -- for example, to add a comment block to it after the fact -- you will probably see some animated GIF warnings. Ignore these -- they're valid warnings, but wide palette GIF files are designed to break some of the rules for well-behaved web page animations.


CREATING IMAGE STRIPS

You can export a multiple-image GIF file to a single image GIF file image strip through the Image Strip item in the Block menu. This will result in each of the images of your source GIF file being arranged one after the other in a long, narrow GIF file, much like the imges on a strip of movie film.

When the size of an image strip is calculated, GIF Construction Set will allow a space equal to the largest frame in the source file for each image. In a file with images of varying sizes, smaller images in the resultant image strip will be centered in a frame of the current background colour of the file, as derived from the current background colour of the source GIF file.

This feature is useful for creating Java applets which display images. You will require the Sun Microsystems Java development kit to compile Java applet source code.

Here's what the options do:

Horizontal strip: Creates an image strip in which the images are laid out horizontally.

Vertical strip: Creates an image strip in which the images are laid out vertically.

Tranparent background: This will make the background colour of the image strip transparent. Use this feature carefully, as it might make some pixels in your images transparent too, if they happen to be the same as the background colour.

Descriptive comment: This feature will add a comment block to your image strip GIF file which specifies the number of cells in the file and the dimensions of each cell.


CREATING ANIMATED GIF FILES

GIF Construction Set for Windows offers two approaches to creating animated GIF files. You can use the Animation Wizard feature of the File menu, or you can create animated GIF files by hand. The former is much easier and will not create animated GIF files which are wildly inappropriate for use with Netscape and other web browsers. The latter will avail you of much more control over the animated GIF files you create.

Keep in mind that animated GIF files created with Animation Wizard can subsequently be edited in the main window of GIF Construction Set.

Note that Animaton Wizard will allow you to import images from most popular bitmapped file formats. You will enjoy much better results if you import your source images from a 24-bit format, such as BMP, PCX, PNG or JPG, rather than from GIF files. Note also that Animation Wizard only imports images -- it does not include transparency information from your source files.


USING ANIMATION WIZARD

The Animation Wizard feature of GIF Construction Set for Windows will walk you through creating an animated GIF file. It offers fewer options than you'd have if you were to create an animated GIF file from scratch, but it's dead easy to use. It will prompt you for information about the animation you want to create, assemble all the necessary blocks and finally open the file in GIF Construction Set's main window. You can edit it further, or just save it to disk.

To create a GIF file with Animation Wizard, simply select this feature from the File menu of GIF Construction Set for Windows and follow the prompts. You can fine tune your GIF file after it has been created by Animation Wizard. The most important questions are:

- Do you want to create an animated GIF file for use in World Wide Web Page?

If you answer Yes to this question, Animation Wizard will choose a palette for your GIF file which is optimally compatible with Netscape Navigator.

- Are the images for your GIF file photorealistic or drawn?

Photorealistic images are scanned graphics and computer generated art which has gradients. Anything that looks as if it might have started life as a photograph should be regarded as photorealistic. Drawn images are graphics with hard lines, such as text and line art. Draw images with sixteen colours are text and line art which are constrained to use the default Windows palette, that is, graphics with very few colours.

The Match to First Palette option of Animation Wizard will match all the colours in all the images you select to the palette of the first image. This will eliminate dithering problems when you assemble an animation from source GIF files as long as you choose the first image appropriately. Note that if the first image is a 24-bit graphic, its palette will be the current default palette, as selected in Setup.

Especially if you're new to using animated GIF files in a web page, it's a really good idea to start with Animation Wizard.


CREATING ANIMATED GIF FILES BY HAND

You can create animated GIF files by hand in GIF Construction Set for Windows – this approach is more time consuming, but it will give you more control over how your animated GIF files look and behave.

It's also noble as hell, of course – hard stuff always is.

Here's how to do it:

1. Check the Setup dialog to make sure you have an appropriate default palette. For animated GIF files to be used on the web, this should be either the sixteen-colour Windows palette or the 216-colour Netscape palette. Other palette options will work, but they may produce less attractive images in a web page viewed on a 256-colour system.

2. Select New from the File menu.

3. Click on Insert and select Image.

4. When the Open dialog appears, select the image files that will appear in your animation. You can select more than one file at a time by holding down the Ctrl key and clicking on each file in turn, or by selecting the first file to be part of your animation, holding down the Shift key and then selecting the last file. Click on OK when you're done.

5. When the Palette dialog appears, select Dither to Global Palette if your source images are photorealistic or Remap to Global Palette if they're drawn. Enable the Use This Selection for Subsequent Images item. Click on OK.

6. When all your images have been inserted, click on Insert and select Loop if you want your animation to loop continuously. Note that as of this writing, the Iterations counter of a Loop block is ignored by Netscape. All animated GIF files with Loop blocks will loop forever.

7. You must insert a Control block in front of each Image block in your GIF file. The easiest way to do this to select Manage from the Block menu. Click on Select All and enable the Insert Before Selected Images item. Click on Apply. A dialog will appear to let you set the parameters of your new Control blocks.

You should set a Delay value – this varies with the intended speed of your animation. Netscape's animation drivers are a bit machine-dependent as I write this – absolute speed settings are largely impractical. Start with something around 100. You can change this later with the Manage function.

If you'll have transparent elements in your GIF file, you should set them now, as discussed elsewhere in this document.

The Remove By option should be set to Nothing if your GIF files are all the same size, have no transparent elements and will overlay each other perfectly, or to Background otherwise.

Click on OK when you're done.

8. Your animated GIF file is complete. Click on View to see what it looks like, and on Save As to save it to disk. Note that Netscape's animation playback runs at anywhere from five to ten times faster than real time – as of this writing, it's usually necessary to make animated GIF files run artificially slowly under GIF Construction Set to get them to run at something like the right speed in Netscape. Also note that the Background value in the Header block of your GIF file defines the background colour for the View feature under GIF Construction Set – it's ignored by Netscape.


SECRETS, TRICKS AND COMMON APPLICATIONS

Here are a number of useful things you might want to know about using GIF Construction Set for Windows.

Animated GIF files: As of this writing, Netscape's command of multiple-image GIF files has a few catches. Here are some of the ones you might want to keep in mind:

- The iteration count in Loop blocks is ignored by Netscape 2.0, although it appears to work in the 3.0 Atlas beta. Your animations will loop forever under 2.0 no matter what value you put in this field.

- Animations are supported by versions of Netscape 2.0 or better and versions of Microsoft's Explorer 3.0 or better. No other browsers we know of supports them as of this writing.

- If any of the cells in your animation extend outside the rectangle defined by the Screen Width and Screen Depth field in the Header block of your GIF file, Netscape will more than likely crash. The Adjust header on Save feature of GIF Construction Set will prevent this from happening if you leave it enabled.

- Netscape 2.0 pauses momentarily at the end of an animation sequence before it loops. There's nothing you can do about this.

- Netscape does not implement Wait for User Input or Remove by Previous Image as of this writing.

- A web page with animated GIF file on it will never be "done" in Netscape – that is, the Stop button will always be active.


CREATING TRANSPARENT GIF FILES

Creating transparent GIF files: A transparent GIF file is one in which an image block displays with one transparent colour. Anywhere the transparent colour exists in the image, no pixels will be painted and whatever was visible before the image appeared will show through. To create a transparent GIF file, add a control block before the image block you wish to include transparent areas. Enable the Transparent Colour switch in the control block and set the transparent colour to correspond to the colour of the areas of the image you wish to appear transparent.

Here's the complete procedure, step by step:

1. Open a GIF file. You should have a Header block and and Image block visible in GIF Construction Set.

2. Click on the Header block once.

3. Click on Insert.

4. Click on Control. You should now have a Header, a Control and an Image block.

5. Double-click on the Control block to edit it.

6. Enable Transparent colour.

7. Click on the eyedropper tool and use it to select the colour in your image that you want to be transparent.

8. Click on OK and save the file.

Note. Read this. Very important. Definite demon bait if you don't. Transparent GIF files only display with their transparent elements under fully compliant GIF viewers. This includes GIF Construction Set for Windows, most World Wide Web Browsers and a limited number of other GIF viewing applications. Most applications that just display pictures will ignore transparency information in GIF files. This includes our own Graphic Workshop software, for example. If your transparent GIF files don't seem to be transparent in some applications, the problem is not with GIF Construction Set for Windows or your GIF files.


CREATING INTERLACED GIF FILES

Creating Interlaced GIF files: This one's easy. Open your GIF file and edit its Image block. Enabled the Interlaced option and save the file.

Creating magic graphic logos: You can create a GIF file that has a main image and a smaller secondary logo which appears, sticks around for a moment and goes away. In addition to the main image block, you will need a control block followed by a smaller secondary image. The secondary image can have a transparent background... this looks very slick. Set the control block up with whatever transparent colour you require, a brief delay, the user input flag turned on and the Remove By field set to Previous Image.

Creating plain text with a drop shadow: This looks very slick. It involves two plain text blocks and two control blocks. Each of the plain text blocks should contain the same text. The second one should be slightly lower and to the right of the first one... two pixels in each direction is usually about right. The second and optionally the first plain text block should be set up so their background colours are transparent, as defined by their control blocks.

Automatically viewing an image when it's loaded: Hold down the shift key when you double click on a GIF file name in the main application window of GIF Construction Set for Windows and the image will be loaded and then immediately viewed.

Using GIF Construction Set for Windows as a GIF viewer for other applications: If you run GIFCON.EXE, the executable file for GIF Construction Set for Windows, with the path to a GIF file as its command line argument, it will automatically load the indicated file just as if you'd explicitly loaded it by clicking on it from the main application window. If you append /V to the file name, it will automatically load and view the file. If you append /V/Q to the file name, it will load the file, view it and then quit back to the calling application as soon as you hit Esc or click with the right button of your mouse. You can prevent it from quitting in this situation by holding down the shift key when you exit the view mode.

GIF Construction Set for Windows makes a powerful GIF viewer for World Wide Web browsers.


7.3 Assignments

See the "assignments" page.


Goto top of page.