                           Amiga Image ViewEr
                              version 1.7
                               April 1994

Role : Displaying 256 colors pictures on a basic Amiga .
------

Copyright :
-----------

   AIVE is (c) 1994 Laurent Vivier . It may not be sold in commercial goal
without my written approval . It can't be distributed for a fee which exceed
of 15 French Francs (3 US dollars) . It is forbidden to make a profit through
the distribution of this software without my written approval .
   It can't be distributed without its documentations . Thus, Files "AIVE",
"AIVE.docF", "AIVE.docE" can't be split .

   This software is freeware . You can contact me for help or some questions,
suggestions . (or to correct this document)

Disclaimer :
------------

   I accept no responsability for the use or misuse of this software, and
for dammage it could produce. Use at your own risks .

Contact :
---------

   postal address :

            Laurent Vivier
            Avenue General De Gaulle
            38380 Saint Laurent du Pont
            FRANCE

   e-mail until june 15 1994 :
         Laurent.Vivier@ufrima.imag.fr
         Laurent.Vivier@imag.fr

Supported formats : GIF87a, GIF89a (interlaced or not), IFF .
-------------------

The Graphic Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated.

Use :
-----

   We can use AIVE from CLI (or Shell) or Workbench.

Supported options from CLI :
----------------------------

We give file name and options from parameters command line .

   AIVE writes possible options if we run it without parameters !

AIVE name [hire|lore|ehb][nolace][grey|gray][scale][color #colors]
          [width w][heighth][ratio a/b]
          [dither none|fs1|fs2]
          [smooth none|gs1|gs2]

HIRE,LORE,EHB : to choose graphic mode to use
   HIRE : high resolution
   LORE : low resolution
   EHB  : Extra-Half-Bright
the default mode is HAM .

COLOR n : n is the number of colors tu use (>= 8, default is the maximum).
          With the option GREY, n is the number of grey levels .

NOLACE : by default it uses interlaced mode, this option disables it .

GREY : to display picture in grey levels (16 colors, HIRE)

SCALE   : the size of the picture is modified to fit in the screen .

WIDTH w : w is the maximum width of the screen

HEIGHT h : h is the maximum height of the screen

RATIO a/b : bending ratio of the screen : x is the width of a pixel, y the
            height, then : y = x * (a/b) .
            default : a/b = 1/2 LORE (= HAM, EHB)
                          = 1/1 LORE and NOLACE
                          = 1/1 HIRE
                          = 2/1 HIRE and NOLACE
            that values are not best . But they are dependant on your
            screen . Compute them .

DITHER NONE : no dithering
       FS1  : unidirectional dithering, the error is propagated only on
              the row
       FS2  : bidirectional dithering, the error is propagated through rows
              and columns (option by default)
The method used is Floyd-Steinberg.

SMOOTH NONE : no smoothing (option by default)
       GS1  : filter used to smooth row is a 1 dimension gaussian filter
       GS2  : filter used to smooth rows and columns is a 2 dimensions
              gaussian filter

Note :
   I have added smoothing option because some pictures which have
already suffer a dithering (like a conversion from JPEG to GIF) are very
ugly in HAM mode. With smoothing I try to inhibit the previous dithering.
More, 2 dimensions smoothing can avoid flicking in interlaced mode.

Example :

   We want to display the picture cindy.gif (800x600) in a standard display
and using bidirectional dithering and 2 dimensions smoothing.

   aive cindy.gif scale smooth GS2

We note bidirectionnal dithering and HAM are by default.

Same picture, in 100x100 screen and without smoothing or dithering,  with a
ratio of 5/11 between pixel width and height (in low resolution mode) :

   aive cindy.gif lore dithering none ratio 5/11 width 100 height 100

Tool Types from Workbench
-------------------------

   To run AIVE from workbench, select AIVE, then press shift key and do a
double-click on icon of the file to display.

Tool types give options to aive from Workbench, like parameters from CLI.

   Tool types are located in icons of files. We can modify tool types of a
file by selecting this file with mouse and selecting "Information"
(Right-Amiga I) in workbench "Icons" menu. We can add tool type with "New"
and delete with "Del".

   First, AIVE reads tool types in its own icon, then in the icon of the
selected file. Thus, tool types in the icon file have priority. Tool types
of the picture can disable tool types of aive icon.

Tool types are :

MODE=HAM       to select HAM mode
MODE=HIRE      high resolution
MODE=LORE      low resolution
MODE=EHB       Extra-Half-Bright

COLOR=n        where "n" is colors number (or grey levels)

INTERLACED=YES to select interlaced mode
INTERLACED=NO  otherwise

GREY=YES       to select grey levels (GREY can be GRAY)
GREY=NO        otherwise

SCALE=YES      to select autosizing
SCALE=NO       otherwise

WIDTH=w        where "w" is the maximum width of the screen

HEIGHT=h       where "h" is the maximum height of the screen

RATIO=a/b      where a/b is the pixel ratio between pixel width and height

DITHER=NONE    to disable dithering
DITHER=FS1     to select unidirectional dithering
DITHER=FS2     to select bidirectional dithering

SMOOTH=NONE    to disable smoothing
SMOOTH=GS1     to select unidirectional smoothing
SMOOTH=GS2     to select bidirectional smoothing

The default values are : MODE=HAM, INTERLACED=YES, SCALE=NO, GREY=NO,
DITHER=FS2, SMOOTH=NONE. WIDTH, HEIGHT, RATIO, and COLOR have standard
values of the selected mode.

Note : we can insert spaces between words and "=".

Example :

if tool types of AIVE are : MODE=HAM, GREY=NO, INTERLACED=YES
and tool types of picture are : MODE=HIRE, GREY=YES, RATIO=10/11

the used tool types will be : MODE=HIRE, GREY=YES, INTERLACED=YES,
RATIO=10/11, DITHER=FS2, SMOOTH=NONE.

Interface :
-----------

   When we run AIVE, a window is opened (from workbench, a second window is
 opened to write error messages). We find in the name of the picture, its
kind (GIF87a, GIF89a, IFF ...), its size, and the progression of the
decoding . A gadget "Stop" permits us to stop the operation, and to
quit the program . The keyboard shortcut is "ESC", it's enable only if the
window is activated (and then, not the screen where is the picture !) .
You can swap screen with [Left-Amiga m], you can push workbench screen in
front with [Left-Amiga n].

Note : Under OS2.0, you can display picture bigger than your screen . To
move it use the standard system operation : [Left-Amiga Left-Mouse-Key] and
move mouse to move picture . Under OS1.3, picture is automaticaly fitted
in the screen .

Technical :
-----------

   AIVE uses Floyd-Steinberg dithering, convolutions, CIE luminance weight,
 and custom algorithms, and no floating point operations . For more details,
 refer to "AIVE.docF" (it's time to learn French ! All my apologies)

Possible evolutions :
---------------------

   - gamma correction (why ?)
   - a printer option
   - a save option
   - PCX and BMP formats, perhaps JPEG (I don't think !)
   - a better human-computer interface under intuition

Compatibility :
---------------
   AIVE was developed under OS1.2, then OS2.0 . It may be run under all
systems .
   We can meet problem with graphic cards : I don't use the "WritePixel"
function from "graphics.library", but I write the value in memory .

   The test activity was made on my A500 :
   mother board rev 5a, OS2.0, 2 drives DDDS, 512 FAST, 512 CHIP .

Known bugs :
------------
   - scale  doesn't run properly with an interlaced GIF picture
   - smoothing doesn't run with grey levels mode
   - sometime unapropriate color pixels on the right border
(That's all, I hope !)

Thanks to :
-----------

   Frederic Elisei   Archimede user of genius, who inspires me
   Franck Lyonnet    Idem
                     Look at their JPEG viewers for Acorn Archimede 5000,
                     speedy than all GIF viewer on Amiga (500 !) .
   Roger Wilson      who written a paper on his software ChangeFSI .
   Steven A. Bennet  author of GIF decoder which inspirates me .
   Cindy Crowford    to her beautiful body (a good motivation !) .

   UFR Informatique  where I have discovered the internet world .
   et mathematiques  (Thanks to system administrators)
   appliquees de     Come studying in Grenoble
   Grenoble          (the country is beautiful : its ski resorts, its lakes)

History
-------

January 1994   version 1.0    First release
January 1994   version 1.2    corrects 2 little bugs :
                              - System alert with an odd picture width
                              - little dithering saturation
March 1994     version 1.5    Corrects other bugs :
                              - system alert when using grey and low
                                resolution at the same time
                              - impossibility to made grey levels with less
                                than 16 levels .
                              Evolution :
                              - optimizing of dithering (close to 2 or 3)
                              - scaling
April 1994     version 1.7    Corrects bug :
                              - now, we can display IFF pictures with less
                                than 256 colors !
                              - detects if IFF picture is compressed by line
                                (and not on all picture, generally ".pic"
                                 files, so we can't display it)
                              Evolution :
                              - optimizing of IFF loader
                              - workbench interface
                              - possibility to disable dithering
                              - implementation of 1D dithering
                              - smoothing

Author : Laurent Vivier
--------
