home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 3: The Continuation
/
17-Bit_The_Continuation_Disc.iso
/
files
/
nz29a.dms
/
nz29a.adf
/
FIGsupp4
/
FIG.doc
< prev
next >
Wrap
Text File
|
1993-12-03
|
6KB
|
149 lines
Fig Documentation
Program:
Fig.
Author:
John Bickers (JJB TEMPLAR),
214 Rata St,
Naenae.
Sources:
The following documents were used in creating this program:
1. gifstd.txt: Incomplete Compuserve decription of GIF87a standard.
2. "A Technique for High Performance Data Compression"
Terry A Welch, IEEE Computer, vol 17 no 6 (June 1984)
Purpose:
To convert a Compuserve GIF file to IFF format, on the suggestion of
Tony Wills, who also supplied a description of the GIF format, GIF
files, and various GIF programs.
Usage:
The conversion process is as follows:
* Decode GIF file into wrk file.
* If deinterlace necessary then convert wrk file into
deinterlaced wrkD file, delete wrk file, rename wrkD file as
wrk file.
* Convert wrk file into IFF file, delete wrk file.
The following notes also apply:
1. The maximum dimensions for the GIF picture are 1024 x 1024 x 8.
Thus a work file space of a little more than 1Meg is required
for images this large.
The GIF data is just reformatted into IFF format, so no data is
lost. However, many such pictures are not viewable on the Amiga
with the standard tool ("display", by C.Scheppner). In order to
see the image to some extent, use "mash" to convert a 6 to 8
plane picture into 5 planes. The final IFF file is viewable by
most programs (if there is sufficient CHIP RAM to contain the
pic). In this respect, another supplementary program "tdis" may
be useful.
The reason work files are used at all is that most people will
not have enough RAM to accomodate a RAM based version of fig on
large pictures. And work files provide a useful input format
for supplementary programs like "mash".
2. Only the first image in a GIF file is converted. If the image
has a local color map, hopefully fig treats it OK, but I
haven't a suitable GIF file to test it with.
3. Absolute worst case stack requirement is about 48K. For most
pictures, 10000 is sufficient. For very big pictures, 20000 is
usually sufficient. If in doubt, make your stack 50000. This
stack increase is required because one of the functions used
may recurse to a max depth of almost 4096, with 4 bytes return
address plus 4 bytes parameter plus 4 bytes local per call.
If the program runs out of stack, it will just exit. Thus files
may not be closed (and so be tied up).
4. The default wrk file directory is the current directory,
regardless of the GIF filename's path. The default IFF file
output is also to the current directory.
5. Some pictures do not contain all the data they should. These
will be converted with a warning, and the wrk file will be
padded out to a suitable size with zeros.
6. If the work file ends up with a depth of 6, fig will output
a CAMG chunk into the ILBM file, saying that the picture's
ViewMode is EXTRA_HALFBRITE. Use the -h option to indicate HAM.
Options:
d[str]
When the ILBM has been written the program described by [str] is
run with it as an argument. If no [str] is specified, the default
string of "display" is used. This is an ILBM viewer (by
C.Scheppner, CATS).
l
Leave work work files behind.
L
Only create work file. Do not convert to ILBM.
o{str}
Use the filename {str} as the name of the output ILBM.
O
Fig will usually choke on a GIF file if the signature is not equal
to "GIF87a". This option ignores that. It is up to you to be sure
that a differently signed standard is the same as GIF87a.
v
Display information as it progresses through the conversion. It
does not intrude into the decoding/deinterlacing/IFF writing loops.
w{str}
This will preface wrk files with the string {str}. For example:
CLI 1> fig -wRAM: pic.GIF
will create its wrk file(s) in RAM:
W
Indicates input filename is already a wrk file.
Wrk file format:
The format is: +----------------+
| My Descriptor |
+----------------+
| colors |
+----------------+
| scanline 1 |
+----------------+
| ..... |
+----------------+
| scanline n | n = GIF picture height
+----------------+
| decode overrun |
+----------------+
Where the components are:
1) My Descriptor:-
struct MyDes {
UWORD w;
UWORD h;
UWORD d;} MyDes;
2) colors:
1<<MyDes.d 3-byte values, representing RGB values. If the
GIF file did not have color information, these are all 000.
3) scanline:
MyDes.w bytes, where each byte represents the value of a
pixel, left to right. It is one byte per pixel, regardless of
the actual depth of the image. These values are indexes into
the color table above.
There are MyDes.h of these scanlines, from 1 to MyDes.h
4) decode overrun:
There may be a few extra bytes of rubbish on the end,
leftovers from the decoding process.
Distribution:
This program is freely redistributable and usable, provided it is
accompanied by this documentation file.
Complaints/Suggestions/Questions/Aquiring source:
Contact: John Bickers,
214 Rata St,
Naenae.
Or: jbickers%templar@actrix.co.nz