VisibleGif - Commands and files
The VisibleGif program should be executed within a command window. It is recommended that the program should be run within a command file.
VisibleGif uses a number of files. The names of these files need to be passed to the programs as part of the command line. The files are:
- An input file
- An output file
- A parameter file (optional)
- A report file (optional)
If VisibleGif is not provided with a report file the run report is written to the standard output. This can be piped to an actual report file.
GIF input file
If the input file ends with ".gif" the input file is assumed to be a GIF image file. The output file produced will be an XML file. It is recommended that this file be saved with a file extension of ".xml". VisibleGif checks the size of the input file. If the GIF file size is larger than a set limit (500,000 bytes) only the data packed views of the image data are produced.
XML input file
If the input file ends with ".xml" the input file is assumed to be an XML file. The output file produced will be a GIF image file. It is recommended that this file be saved with a file extension of ".gif".
Parameter file
This file can contain all the parameters to be passed to the program. This file is usually created with a file extension of ".ctl".
Report file
This file contains the operational run report. This file is usually created with a file extension of ".txt".
Command file variations
VisibleGif can run with just an input file and an output file. Here the default parameters are used. The third parameter is the licence.
rem Execute vg and send run report to exam01.txt vg exam01.xml exam01.gif "###########" >exam01.txt |
VisibleGif can run with an input file an output file and with parameters passed as part of the command line.
rem Execute vg and send run report to exam01.txt vg exam01.xml exam01.gif " -p -c " "###########" >exam01.txt |
VisibleGif can run with an input file, an output file, the report file and with parameters passed as part of the command line.
rem Execute vg vg exam01.xml exam01.gif exam01.txt " -p -c " "###########" |
VisibleGif can run with a single parameter file. The report file is either written to the standard system output or to a named file.
rem Execute vg vg exam01.ctl |
VisibleGif can run with a single parameter file. Here the report file is set to be written to the system output. The command file pipes this output to the named report file below.
rem Execute vg vg exam01.ctl >exam01.txt |
Single Parameter file
If VisibleGif is passed a single file it is assumed to be a parameter file. The format of the parameter file is as in the example below.
Each parameter must be on a separate line. A parameter is identified by the single <gifparm> tag at the start. All other lines are ignored. It is recommended that comment lines are prefixed by the character "#".
The parameter file format supports all the formats listed above. The report file can be set to system which directs the report file to the system output.
# VisibleGif parm.ctl # # Example of a parameter file to read a GIF image file, # create an XML tagged file and produce a report. # The input file <gifparm>red.gif # The output file <gifparm>red.xml # The report file <gifparm>red.txt # The run parameters (none) <gifparm> # The license <gifparm>########### |
Schedules jobs and procedures
Command files can be organised into "schedules", "jobs" and "procedures".
- A "schedule" executes a stream of "jobs".
- A "job" executes a stream of "procedures".
- A "procedure" executes a stream of programs.
A "schedule" is executed by a "scheduler" program usually in reponse to a time driven or other event. Some of the Windows operating systems provides the "at" program. The Unix operating systems provides the "crontab" program. Each "schedule", "job" and "procedure" should have an associated set of operating instructions ("opins").
A sample job - job01 - XML to GIF
rem job01.cmd VisibleGif job - XML to GIF rem Set the variables for the program and the folders set exelib=h:\vg\bin\vg set cmdlib=h:\vg\cmd\ set runlib=h:\vg\images set rptlib=h:\vg\rpt\ set parms=" -p -c -uc -nc " set license=######## rem Change directory to the correct disk drive and run folder h: cd %runlib% rem Execute the XML to GIF procedure for each colour call %cmdlib%proc01 red call %cmdlib%proc01 blue call %cmdlib%proc01 green call %cmdlib%proc01 yellow |
A sample procedure - proc01 - XML to GIF
This procedure executes the VisibleGif program to convert an XML file to a GIF image file. The filename (fname) is passed as the first parameter.
rem proc01.cmd VisibleGif procedure - XML to GIF set fname=%1 rem Execute vg %exelib% %fname%.xml %fname".gif %parms% %licence% >%rptlib%%fname%.txt |
Operational Performance
The length of time VisibleGif requires to complete processing depends on a number of factors. The main ones are the capacity of the computer running VisibleGif, the size of the input file and the run parameters which have been set.
Web Images
Web designers use the "20 seconds 3 clicks" rule in sizing web pages. Images within these web pages should be limited in size so that the web page as a whole conforms to this rule.
VisibleGif is best used with images that are less than 50 KBytes in size. Larger images are designed for media other than the web.
At a typical home dial-up connection speed of 56 kb/s (7 kB/s) assuming a throughput rate of 50% the "20 seconds" rule means the largest web page size should be around 70 ( 7 x 0.5 x 20 ) KBytes. Ideally most web pages should take around 2 seconds to load. This type of web page should be around 7 KBytes. Where possible the 7 KBytes should be used for HTML or XML constructs. Images can be included within cascade style sheets (CSS or XSL) and so can be used in a number of pages.
The caveat is that as Internet connection speeds improve larger image files can be used. Wireless Application Protocol (WAP) suggests that the need for small size images will remain for some time.