home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / ZLAB_19C.ZIP / GIFT4B10.ZIP / GIFTEST.DOC < prev    next >
Text File  |  1992-01-22  |  14KB  |  296 lines

  1.                               GIFtest 4.0ß
  2.                   CopyRight 1991 by Dave Navarro, Jr.
  3.  
  4. What is GIFtest?
  5.  
  6.      GIFtest is a command line utility to test GIF files to make sure
  7.      they are valid.  GIFtest scans the GIF header to make sure that
  8.      all the information stored is valid, and then scans the image
  9.      it self to make sure it's all there.  If everything is found in
  10.      order, GIFtest exits without any error messages or error levels.
  11.      However, if there is a problem with the GIF, GIFtest exits with
  12.      an error message letting you know what's wrong, and exits with
  13.      an error level.
  14.  
  15.      GIFtest is also capable of letting you know if a GIF has been
  16.      GIFLITE'd, has any extra bytes left by older transfer protocols,
  17.      modifying a BBS description to include the resolution of the GIF
  18.      (ProDooor and PCBoard), forcing all GIFs to be private uploads on
  19.      PCBoard and ProDoor BBSes, and rejecting GIFs that do not meet a
  20.      minimum definable resolution.
  21.  
  22.      When GIFs are transfered from user to user, or user to BBS or BBS
  23.      to user, their protocol sends files in packet sizes ranging from
  24.      128 bytes to 4k, and when they reach the end of a file, if the
  25.      remaining bytes do not equal the packet size, the packet is "padded"
  26.      with extra charactors to make it equal to the pack size.  Unfortunately,
  27.      these bytes are not trimmed off when recieved by older protocols.  It
  28.      doesn't effect the file itself, but after several hundred file transfers,
  29.      you could end up with several hundred "K" of wasted space.  GIFtest now
  30.      automatically trims these extra bytes from GIF files.
  31.  
  32.      GIFtest also conforms 100% to the GIF87a and GIF89a standards, so
  33.      will also process GIFs that contain "extensions".  These extensions
  34.      are also tested to make sure that all the "data blocks" have the
  35.      correct lengths and are valid.
  36.  
  37. NEW: Byte trimming is instantanious and no longer causes GIFtest to test
  38.      the GIF more than once.
  39.  
  40.      To register GIFtest, please send a check or money order for $15
  41.      to:
  42.             Dave Navarro, Jr.
  43.             64-38 Admiral Ave
  44.             Middle Village, NY 11379
  45.  
  46.      Please used the enclosed ORDER.FRM file.
  47.  
  48. Acknowledgements:
  49.  
  50.      The Graphics Interchange Format(c) is the Copyright property of
  51.      Compuserve Incorporated.  GIF(sm) is a Service Mark property of
  52.      Computerve Incorporated.
  53.  
  54.      Many thanks to the following individuals who have helped with the
  55.      testing of GIFtest and whose suggestions have helped GIFtest to
  56.      grow:
  57.  
  58.         Gary Foreman, SysOp of Another Dimension BBS
  59.         Thomas Enstall, SysOp of Hard Times BBS
  60.         Allen Legatzke, SysOp of Sattelite BBS
  61.         Chuck Valiceck, SysOp Suburban Software BBS
  62.         Max Bernard, SysOp of Taste BBS
  63.         Samuel Smith, Author of ProDoor
  64.         Jeffrey Morley, Author of ZipLab
  65.         Steve Rimmer, Author of "Bit-Mapped Graphics"
  66.  
  67. Support:
  68.  
  69.      The author can be reached through US Mail at the same address used
  70.      for registration, or through "electronic mail" left on The Bard's
  71.      Lair BBS at 718-381-3651.  The author also monitors the SHAREWARE
  72.      conference in the Intelec International Network of BBSs, and the
  73.      SHAREWARE conference in the MetroLink/RelayNet International
  74.      Network of BBSs.
  75.  
  76.      Because of the high cost of voice support, and the low cost of
  77.      GIFtest, voice support from the author is not available.  If it's
  78.      absolutely important that you recieve voice support, leave an
  79.      electronic message to the author on The Bard's Lair BBS and you
  80.      will recieve a "collect" call as soon as humanly possible.
  81.  
  82. How to use GIFtest:
  83.  
  84.     GIFtest 4.0ß has the following options:
  85.     Usage: GIFTEST filename.gif [option1] [option2] etc..
  86.        /A            -  Force private upload
  87.        /B:n          -  BBS type
  88.                         0 - None [default]
  89.                         1 - ProDoor, 2 - PCBoard, 3 - ProDoor 3.44
  90.        /C:[filename] -  Use options in configuration file
  91.        /D            -  Duplicate checking using 32 bit CRC's
  92.        /E            -  Erase Invalid GIF's
  93.        /F:filename   -  Name of Description file
  94.        /L:[filename] -  Keep a log of GIFs
  95.        /M:nnXnnXnn   -  Minimum resolution to accept
  96.        /N:n          -  Node Number (requires GIFTEST.CFG)
  97.        /P:n          -  COM port numer [1 - 4]
  98.        /R:n          -  Position of resolution in description
  99.                         0 - First word on first line
  100.                         1 - Last word on first line [default]
  101.                         2 - Last word on last line
  102.                         3 - Last line by itself
  103.        /S            -  Skip GIF testing
  104.        /T:n          -  Type of resolution used
  105.                         1 - Enclosed with brackets [default]
  106.                         2 - No brackets
  107.        /U            -  Convert description to uppercase
  108.     
  109.     To use GIFtest, just type "GIFTEST filename.gif" at the DOS prompt
  110.     and GIFtest will tell you the size of the GIF and whether or not it
  111.     passed testing.
  112.  
  113.     GIFtest will also exit with one of the following Errorlevels to
  114.     help you identify what happened in batch files, or programs that
  115.     use GIFtest (such as ZipLab).
  116.  
  117.     Result                                                        ErrorLevel
  118.     GIF passed all tests                                               0
  119.     Invalid Header or Incomplete Image                                 1
  120.     File Not Found                                                     5
  121.     Invalid Command Line Option                                        5
  122.     GIFLITE'd                  [passed all other tests]               10
  123.     Failed Minumum Resolution  [passed other tests]                   20
  124.     Duplicate CRC found        [passed other tests]                   25
  125.     No Description Found       [passed all other tests]               60
  126.     Unknown Error              [programmer goofed]                   255
  127.  
  128. Making GIFs Private: /A
  129.  
  130.    Sometimes, sysops will have problems where users will upload adult
  131.    GIFs to a public file area.  You can remedy this several different
  132.    ways..  You can make all uploads private, you can get nasty and delete
  133.    the offending user(s), or you can use GIFtest to force all GIFs to be
  134.    private uploads, leaving the rest of your files alone using the "/A"
  135.    switch on the command line or in GIFTEST.CFG..
  136.  
  137.    WARNING!  This only works with ProDoor and PCBoard systems which use
  138.    GIFtest to modify the description.
  139.  
  140.  
  141. Modifying Descriptions: /B:n
  142.  
  143.    The only feature of the original GIFtest was to place the resolution
  144.    of the GIF into the description typed by users of ProDoor where I
  145.    wanted it.  Since then, many sysops have contacted me, asking that
  146.    I allow the same time of feature for their BBS type as well.
  147.    Unfortunately, the only people to give me the necessary information
  148.    have been PCBoard SysOps, so starting with 4.0, GIFtest supports
  149.    descriptions for ProDoor and PCBoard.
  150.  
  151.    However, GIFtest doesn't know which type of BBS is running,
  152.    so you'll need to tell it with the /B parameter.
  153.     /B:0 means ignore ProDoor and PCboard descriptions, just test
  154.         the GIF
  155.     /B:1 means your running ProDoor and search for $DOOR.NAM to
  156.          modify the description
  157.     /B:2 means your running PCBoard and search for UPDESC[.N] to
  158.          modify the description
  159.     /B:3 means your running ProDoor 3.44 dated after 12/31/91 and
  160.          search for $DOOR.NAM to modify the description
  161.  
  162.    If you use the /B:n option and GIFtest does not find the description file
  163.    or does not find the description inside the description file for the GIF
  164.    and the GIF passes all tests, GIFtest will exit with ErrorLevel 40.
  165.  
  166.    ProDoor Descriptions:
  167.  
  168.      ProDoor stores the name and descriptions of uploaded files in a file
  169.      called $DOOR.NAM which is kept in the default directory for each node.
  170.      For example, if your PRODOOR batch file called ProDoor with the options
  171.      PRODOOR PROD.CNF C:\PCB, then $DOOR.NAM will be found in the directory
  172.      C:\PCB.  So, you can call GIFtest with:
  173.  
  174.          GIFTEST %1 /B:1 /F:C:\PCB\$DOOR.NAM
  175.  
  176.      Which will tell GIFtest that the description file C:\PCB\$DOOR.NAM
  177.      uses the ProDoor format for storing descriptions.
  178.  
  179.    PCBoard Descriptions:
  180.  
  181.      PCBoard stores the name and descriptions of uploaded files in a file
  182.      called UPDESC[.n], where the [.n] is the node number if you are running
  183.      a multinode BBS.  So node 1 would be UPDESC.1, node 2 is UPDESC.2, etc..
  184.      The location of this file depends on how you have PCBOARD.DAT setup,
  185.      if you have specified a "work" directory in PCBSETUP, then this file
  186.      is placed in that work directory.  If not, then it is kept im the
  187.      default PCB directory for each node.  If you are using PCBoard 14.5a
  188.      the easiest way to find the UPDESC[.n] file for each node is to put
  189.  
  190.           echo %3 > UPDESC.LOC
  191.  
  192.      at the top of your PCBTEST.BAT file.  This will echo the third parameter
  193.      (the name and location of the UPDESC[.n] file) to the file UPDESC.LOC
  194.      which you can then type to see where PCBoard is keeping it.  This is
  195.      only important for you to know if you are running GIFtest from within
  196.      a program like ZipLab.  If you are calling GIFtest directly from
  197.      within your PCBTEST file, you need only add the option "/F:%3" to the
  198.      command line and PCBoard will pass the name and location of the
  199.      description file to GIFtest for you.
  200.  
  201.      WARNING!:  Do NOT use the name of any of your DIRx files, especially
  202.      your upload directory file, this will get destroyed.
  203.  
  204.  
  205. Configuration File: /C:[filename]
  206.  
  207.    Some programs like ZipLab shell out to GIFtest in order to test GIF
  208.    files...however, they may not allow you to include the defaults you
  209.    want to test the GIF with.  To help with this, GIFTEST will let you
  210.    store all your defaults into a config file.  The default name is
  211.    GIFTEST.CFG, but you can pass any filename on the command line with
  212.    the "/C:[filename]" switch.  If a filename is not specified, then
  213.    GIFTEST.CFG is assumed.
  214.  
  215.    The top line of the configuration file is the DOS command line
  216.    you want to use for GIFtest.  Each line after that is the
  217.    name and location for the description file for the BBS you run
  218.    for each node.
  219.  
  220.      Example:
  221.        /E/L                       ;Erase bad GIFs, Keep a log file
  222.        C:\PRO\NODE1\$DOOR.NAM     ;location of description file for node 1
  223.        C:\PRO\NODE2\$DOOR.NAM     ;location of description file for node 2
  224.  
  225.    To get the current node number, GIFtest either expects it on the command
  226.    line [see /N], or expects to find the environment variable "PCBNODE=n"
  227.    where "n" is the node number.
  228.  
  229.    Any options found in the configuration file take precedence over command
  230.    line parameters.  If you have /B:0 on the command line, but GIFtest finds
  231.    /B:1 in the configuration file, then GIFtest will use the /B:1 option.
  232.  
  233.  
  234. Checking for Duplicate Files: /D
  235.  
  236.    A major problem with GIFs today is that users will rename them and
  237.    re-upload them to a BBS to get upload credits.  Before GIFtest, there
  238.    was no way to test if a file was actually a GIF, however, even if the
  239.    file is a GIF, it could be a duplicate file.  To combat this, GIFtest
  240.    calculates a 32bit CRC for each uploaded GIF using the same method as
  241.    PKZIP and ARJ and places that CRC into your GIFLOG file (if you keep
  242.    one).  You can then use the "/D" parameter to have GIFtest scan this
  243.    log for a duplicate CRC and return an errorlevel if one is found.
  244.  
  245.    WARNING!:  GIFtest does NOT do duplicate checking by default, but it
  246.    will log all CRC's of complete GIFs if they pass testing.
  247.  
  248.  
  249. Erasing bad GIFs: /E
  250.  
  251.    While GIFtest does exit with an Errorlevel to indicate the failure of a
  252.    GIF to pass all tests, some users don't with to catch these errors in a
  253.    BATch file to see if the file needs to be deleted.
  254.  
  255.    The /E option will erase any GIF not passing all of the tests.
  256.  
  257.    If GIFtest is unable to erase the GIF, it will exit with errorlevel set
  258.    to 255 (programmer goof).
  259.  
  260.  
  261. Passing the description filename: /F:filename
  262.  
  263.    You can use the "/F:filename" parameter to pass the name and location
  264.    of the description file for GIFtest to alter.  This is especially useful
  265.    with PCBoard 14.5a multi-node systems where you are calling GIFtest
  266.    directly from PCBTEST.BAT and can pass the %3 parameter from PCBoard
  267.    directly to GIFtest, such as:
  268.  
  269.       GIFTEST %1 /B:2 /F:%3
  270.  
  271.    WARNING!:  This only works with PCBoard and ProDoor descriptions.
  272.  
  273.  
  274. Log all checked GIFs: /L:[logfilename]
  275.  
  276.    GIFtest can log all tested GIFs to a file which can help you in
  277.    tracking duplicates, resolutions, and user activities.  If you
  278.    don't specify a filename, the name GIFLOG is used.
  279.  
  280.    The format for the log file is:
  281.  
  282.     FILENAME.GIF 999999 01-01-91 [9999xx9999x999] 9999 OK GL FFFFFFFF
  283.     ─────┬────── ──┬─── ────┬─── ────────┬─────── ─┬── ┌─ ┌─ ┌───────
  284.          │         │        │            │         │   │  │  └ 32 bit CRC
  285.          │         │        │            │         │   │  └ GIFLITE'd
  286.          │         │        │            │         │   └ Status
  287.          │         │        │            │         │       OK
  288.          │         │        │            │         │       IM Incomplete Image
  289.          │         │        │            │         │       IV Invalid Header
  290.          │         │        │            │         └ Trimmed Bytes
  291.          │         │        │            └ Resolution
  292.          │         │        └ Current Date
  293.          │         └ File Size
  294.          └ File Name
  295.  
  296.