home *** CD-ROM | disk | FTP | other *** search
- GIFtest 4.0ß
- CopyRight 1991 by Dave Navarro, Jr.
-
- What is GIFtest?
-
- GIFtest is a command line utility to test GIF files to make sure
- they are valid. GIFtest scans the GIF header to make sure that
- all the information stored is valid, and then scans the image
- it self to make sure it's all there. If everything is found in
- order, GIFtest exits without any error messages or error levels.
- However, if there is a problem with the GIF, GIFtest exits with
- an error message letting you know what's wrong, and exits with
- an error level.
-
- GIFtest is also capable of letting you know if a GIF has been
- GIFLITE'd, has any extra bytes left by older transfer protocols,
- modifying a BBS description to include the resolution of the GIF
- (ProDooor and PCBoard), forcing all GIFs to be private uploads on
- PCBoard and ProDoor BBSes, and rejecting GIFs that do not meet a
- minimum definable resolution.
-
- When GIFs are transfered from user to user, or user to BBS or BBS
- to user, their protocol sends files in packet sizes ranging from
- 128 bytes to 4k, and when they reach the end of a file, if the
- remaining bytes do not equal the packet size, the packet is "padded"
- with extra charactors to make it equal to the pack size. Unfortunately,
- these bytes are not trimmed off when recieved by older protocols. It
- doesn't effect the file itself, but after several hundred file transfers,
- you could end up with several hundred "K" of wasted space. GIFtest now
- automatically trims these extra bytes from GIF files.
-
- GIFtest also conforms 100% to the GIF87a and GIF89a standards, so
- will also process GIFs that contain "extensions". These extensions
- are also tested to make sure that all the "data blocks" have the
- correct lengths and are valid.
-
- NEW: Byte trimming is instantanious and no longer causes GIFtest to test
- the GIF more than once.
-
- To register GIFtest, please send a check or money order for $15
- to:
- Dave Navarro, Jr.
- 64-38 Admiral Ave
- Middle Village, NY 11379
-
- Please used the enclosed ORDER.FRM file.
-
- Acknowledgements:
-
- The Graphics Interchange Format(c) is the Copyright property of
- Compuserve Incorporated. GIF(sm) is a Service Mark property of
- Computerve Incorporated.
-
- Many thanks to the following individuals who have helped with the
- testing of GIFtest and whose suggestions have helped GIFtest to
- grow:
-
- Gary Foreman, SysOp of Another Dimension BBS
- Thomas Enstall, SysOp of Hard Times BBS
- Allen Legatzke, SysOp of Sattelite BBS
- Chuck Valiceck, SysOp Suburban Software BBS
- Max Bernard, SysOp of Taste BBS
- Samuel Smith, Author of ProDoor
- Jeffrey Morley, Author of ZipLab
- Steve Rimmer, Author of "Bit-Mapped Graphics"
-
- Support:
-
- The author can be reached through US Mail at the same address used
- for registration, or through "electronic mail" left on The Bard's
- Lair BBS at 718-381-3651. The author also monitors the SHAREWARE
- conference in the Intelec International Network of BBSs, and the
- SHAREWARE conference in the MetroLink/RelayNet International
- Network of BBSs.
-
- Because of the high cost of voice support, and the low cost of
- GIFtest, voice support from the author is not available. If it's
- absolutely important that you recieve voice support, leave an
- electronic message to the author on The Bard's Lair BBS and you
- will recieve a "collect" call as soon as humanly possible.
-
- How to use GIFtest:
-
- GIFtest 4.0ß has the following options:
- Usage: GIFTEST filename.gif [option1] [option2] etc..
- /A - Force private upload
- /B:n - BBS type
- 0 - None [default]
- 1 - ProDoor, 2 - PCBoard, 3 - ProDoor 3.44
- /C:[filename] - Use options in configuration file
- /D - Duplicate checking using 32 bit CRC's
- /E - Erase Invalid GIF's
- /F:filename - Name of Description file
- /L:[filename] - Keep a log of GIFs
- /M:nnXnnXnn - Minimum resolution to accept
- /N:n - Node Number (requires GIFTEST.CFG)
- /P:n - COM port numer [1 - 4]
- /R:n - Position of resolution in description
- 0 - First word on first line
- 1 - Last word on first line [default]
- 2 - Last word on last line
- 3 - Last line by itself
- /S - Skip GIF testing
- /T:n - Type of resolution used
- 1 - Enclosed with brackets [default]
- 2 - No brackets
- /U - Convert description to uppercase
-
- To use GIFtest, just type "GIFTEST filename.gif" at the DOS prompt
- and GIFtest will tell you the size of the GIF and whether or not it
- passed testing.
-
- GIFtest will also exit with one of the following Errorlevels to
- help you identify what happened in batch files, or programs that
- use GIFtest (such as ZipLab).
-
- Result ErrorLevel
- GIF passed all tests 0
- Invalid Header or Incomplete Image 1
- File Not Found 5
- Invalid Command Line Option 5
- GIFLITE'd [passed all other tests] 10
- Failed Minumum Resolution [passed other tests] 20
- Duplicate CRC found [passed other tests] 25
- No Description Found [passed all other tests] 60
- Unknown Error [programmer goofed] 255
-
- Making GIFs Private: /A
-
- Sometimes, sysops will have problems where users will upload adult
- GIFs to a public file area. You can remedy this several different
- ways.. You can make all uploads private, you can get nasty and delete
- the offending user(s), or you can use GIFtest to force all GIFs to be
- private uploads, leaving the rest of your files alone using the "/A"
- switch on the command line or in GIFTEST.CFG..
-
- WARNING! This only works with ProDoor and PCBoard systems which use
- GIFtest to modify the description.
-
-
- Modifying Descriptions: /B:n
-
- The only feature of the original GIFtest was to place the resolution
- of the GIF into the description typed by users of ProDoor where I
- wanted it. Since then, many sysops have contacted me, asking that
- I allow the same time of feature for their BBS type as well.
- Unfortunately, the only people to give me the necessary information
- have been PCBoard SysOps, so starting with 4.0, GIFtest supports
- descriptions for ProDoor and PCBoard.
-
- However, GIFtest doesn't know which type of BBS is running,
- so you'll need to tell it with the /B parameter.
- /B:0 means ignore ProDoor and PCboard descriptions, just test
- the GIF
- /B:1 means your running ProDoor and search for $DOOR.NAM to
- modify the description
- /B:2 means your running PCBoard and search for UPDESC[.N] to
- modify the description
- /B:3 means your running ProDoor 3.44 dated after 12/31/91 and
- search for $DOOR.NAM to modify the description
-
- If you use the /B:n option and GIFtest does not find the description file
- or does not find the description inside the description file for the GIF
- and the GIF passes all tests, GIFtest will exit with ErrorLevel 40.
-
- ProDoor Descriptions:
-
- ProDoor stores the name and descriptions of uploaded files in a file
- called $DOOR.NAM which is kept in the default directory for each node.
- For example, if your PRODOOR batch file called ProDoor with the options
- PRODOOR PROD.CNF C:\PCB, then $DOOR.NAM will be found in the directory
- C:\PCB. So, you can call GIFtest with:
-
- GIFTEST %1 /B:1 /F:C:\PCB\$DOOR.NAM
-
- Which will tell GIFtest that the description file C:\PCB\$DOOR.NAM
- uses the ProDoor format for storing descriptions.
-
- PCBoard Descriptions:
-
- PCBoard stores the name and descriptions of uploaded files in a file
- called UPDESC[.n], where the [.n] is the node number if you are running
- a multinode BBS. So node 1 would be UPDESC.1, node 2 is UPDESC.2, etc..
- The location of this file depends on how you have PCBOARD.DAT setup,
- if you have specified a "work" directory in PCBSETUP, then this file
- is placed in that work directory. If not, then it is kept im the
- default PCB directory for each node. If you are using PCBoard 14.5a
- the easiest way to find the UPDESC[.n] file for each node is to put
-
- echo %3 > UPDESC.LOC
-
- at the top of your PCBTEST.BAT file. This will echo the third parameter
- (the name and location of the UPDESC[.n] file) to the file UPDESC.LOC
- which you can then type to see where PCBoard is keeping it. This is
- only important for you to know if you are running GIFtest from within
- a program like ZipLab. If you are calling GIFtest directly from
- within your PCBTEST file, you need only add the option "/F:%3" to the
- command line and PCBoard will pass the name and location of the
- description file to GIFtest for you.
-
- WARNING!: Do NOT use the name of any of your DIRx files, especially
- your upload directory file, this will get destroyed.
-
-
- Configuration File: /C:[filename]
-
- Some programs like ZipLab shell out to GIFtest in order to test GIF
- files...however, they may not allow you to include the defaults you
- want to test the GIF with. To help with this, GIFTEST will let you
- store all your defaults into a config file. The default name is
- GIFTEST.CFG, but you can pass any filename on the command line with
- the "/C:[filename]" switch. If a filename is not specified, then
- GIFTEST.CFG is assumed.
-
- The top line of the configuration file is the DOS command line
- you want to use for GIFtest. Each line after that is the
- name and location for the description file for the BBS you run
- for each node.
-
- Example:
- /E/L ;Erase bad GIFs, Keep a log file
- C:\PRO\NODE1\$DOOR.NAM ;location of description file for node 1
- C:\PRO\NODE2\$DOOR.NAM ;location of description file for node 2
-
- To get the current node number, GIFtest either expects it on the command
- line [see /N], or expects to find the environment variable "PCBNODE=n"
- where "n" is the node number.
-
- Any options found in the configuration file take precedence over command
- line parameters. If you have /B:0 on the command line, but GIFtest finds
- /B:1 in the configuration file, then GIFtest will use the /B:1 option.
-
-
- Checking for Duplicate Files: /D
-
- A major problem with GIFs today is that users will rename them and
- re-upload them to a BBS to get upload credits. Before GIFtest, there
- was no way to test if a file was actually a GIF, however, even if the
- file is a GIF, it could be a duplicate file. To combat this, GIFtest
- calculates a 32bit CRC for each uploaded GIF using the same method as
- PKZIP and ARJ and places that CRC into your GIFLOG file (if you keep
- one). You can then use the "/D" parameter to have GIFtest scan this
- log for a duplicate CRC and return an errorlevel if one is found.
-
- WARNING!: GIFtest does NOT do duplicate checking by default, but it
- will log all CRC's of complete GIFs if they pass testing.
-
-
- Erasing bad GIFs: /E
-
- While GIFtest does exit with an Errorlevel to indicate the failure of a
- GIF to pass all tests, some users don't with to catch these errors in a
- BATch file to see if the file needs to be deleted.
-
- The /E option will erase any GIF not passing all of the tests.
-
- If GIFtest is unable to erase the GIF, it will exit with errorlevel set
- to 255 (programmer goof).
-
-
- Passing the description filename: /F:filename
-
- You can use the "/F:filename" parameter to pass the name and location
- of the description file for GIFtest to alter. This is especially useful
- with PCBoard 14.5a multi-node systems where you are calling GIFtest
- directly from PCBTEST.BAT and can pass the %3 parameter from PCBoard
- directly to GIFtest, such as:
-
- GIFTEST %1 /B:2 /F:%3
-
- WARNING!: This only works with PCBoard and ProDoor descriptions.
-
-
- Log all checked GIFs: /L:[logfilename]
-
- GIFtest can log all tested GIFs to a file which can help you in
- tracking duplicates, resolutions, and user activities. If you
- don't specify a filename, the name GIFLOG is used.
-
- The format for the log file is:
-
- FILENAME.GIF 999999 01-01-91 [9999xx9999x999] 9999 OK GL FFFFFFFF
- ─────┬────── ──┬─── ────┬─── ────────┬─────── ─┬── ┌─ ┌─ ┌───────
- │ │ │ │ │ │ │ └ 32 bit CRC
- │ │ │ │ │ │ └ GIFLITE'd
- │ │ │ │ │ └ Status
- │ │ │ │ │ OK
- │ │ │ │ │ IM Incomplete Image
- │ │ │ │ │ IV Invalid Header
- │ │ │ │ └ Trimmed Bytes
- │ │ │ └ Resolution
- │ │ └ Current Date
- │ └ File Size
- └ File Name
-
-