home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TopWare 18: Liquid
/
Image.iso
/
liquid
/
top1094
/
gifres.doc
< prev
next >
Wrap
Text File
|
1993-03-03
|
3KB
|
75 lines
>> FREEWARE <<
GIF RESolution utility (C)1993 R.Janorkar
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
v1.00 release date 03/04/93
What is GIFRES?
~~~~~~~~~~~~~~~
GIFRES is a simple utility that checks the header of GIF image
files and returns a DOS ERRORLEVEL indicating:
ERRORLEVEL 0 = GIF image is 640x480 or better
ERRORLEVEL 1 = GIF image is under 640x480
ERRORLEVEL 2 = Not a GIF file!
ERRORLEVEL 255 = File not found, or read error.
This little utility can be run in upload scan batch files on
Bulletin Board Systems, to reject substandard GIF uploads.
GIFRES is Freeware, no payment to the author is required for
use. The assembler source code has also been included for those
who wish to make modifications to the code. The author retains
all rights to the source code, though you are free to modify the
source code for your own use.
This program and source code is provided with NO warrantees,
expressed or implied. Use it at your own risk. The author of
this program will NOT be liable for any damages, direct or
indirect, arising from the ability or disability to use this
program. The use of this program on your computer system
indicates your acceptance of these disclaimers.
Technical junk
~~~~~~~~~~~~~~
The GIF file structure is as follows:
7 6 5 4 3 2 1 0 (individual bits)
- - - - - - - -
Byte 0 | 0 1 0 0 0 1 1 1 = 47h = "G"
Byte 1 | 0 1 0 0 1 0 0 1 = 49h = "I"
Byte 2 | 0 1 0 0 0 1 1 0 = 46h = "F"
Byte 3 | <ignored>
Byte 4 | <ignored>
Byte 5 | <ignored>
Byte 6 | L L L L H H H H = Width LSB MSB
Byte 7 | L L L L H H H H = Height LSB MSB
GIFRES first check the first three bytes of the file for the
signature "GIF", if this is not found it returns ERRORLEVEL 2
(not a GIF file). It then checks the image width, comparing it
against 640. If the image is less than 640 pixels, it returns
ERRORLEVEL 1 (less than 640x480). If the width is acceptable, it
checks the image height against 480 pixels. If the height is
less it returns ERRORLEVEL 1 (less than 640x480). Otherwise it
returns ERRORLEVEL 0 indicating the image is 640x480 or higher.
GIFRES was compiled with MicroSoft Macro Assembler (MASM) v5.1
and linked with MicroSoft Linker v5.13.
Comments, criticism and feedback welcomed. You can contact the
author via snail mail at: Ron Janorkar
651 Richmond Road,
Staten Island, NY 10304-2409
or at the support BBS (718) 876-0337 @9600 v.32