@DATABASE TIFFView.guide
@AUTHOR "Bert Wynants"
@(c) "Copyright © B. Wynants"
@$VER: TIFFView.guide 1.14 (1.1.95)
@MASTER TIFFView.readme
@INDEX Main

@NODE Main "TIFFView Guide 1.14 Copyright © 1993-95 B. Wynants"

     Table of Contents:

     Welcome to the @{b}TIFFView@{ub} AmigaGuide®. Select any of the following topics:

     @{" Introducing TIFFView " LINK Introducing}
     @{" System requirements  " LINK Requirements}
     @{" How to use TIFFView  " LINK Usage}
     @{" TIFFView Menu's      " LINK Menus}
     @{" ARexx Port           " LINK ARexx}
     @{" Known Problems       " LINK Problems}
     @{" Tips                 " LINK Tips}
     @{" To Do's              " LINK ToDo}
     @{" About the program    " LINK About}
     @{" About the author     " LINK Author}
     @{" Program History      " LINK History}

@ENDNODE

@NODE Introducing "Introducing TIFFView"
@TOC Main

This is a utility to read, view and print @{"TIFF" LINK TIFF}, @{"MacPaint" LINK MacPaint}, @{"GIF" LINK GIF} &
@{"IFF" LINK IFF}, @{"JPEG" LINK JPEG} or any image you have a @{"DataType" LINK DataType} for, and to write
them back as @{"TIFF" LINK TIFF}, @{"JPEG" LINK JPEG} or @{"IFF" LINK IFF} files.

    Starting from version 1.11 @{b}TIFFView@{ub} requires at least 2.04.
To get the most out of it you must have an Amiga with the AGA chipset. Then
you can open your images at 8-Bit Color or Gray!

    The name @{b}TIFFView@{ub} did cover the functionality of the first releases
but since then other file types where added, therefor @{b}TIFFView@{ub} should get a
new name and one of the next releases may get another name.

@ENDNODE

@NODE TIFF "TIFF Files"
@TOC Main
    TIFF Files (Tag Image File Format) are files commonly used in the 
    graphic computer world (Mac, Sun, NeXT, IBM) 

    @{b}TIFFView@{ub} is compatible with the 6.0 specs of TIFF.

    supported TIFF:
     -multiple image TIFF
     -1,2,3,4,5,6,7,8,24,32 Bit
     -Line-art, gray, palette images, 24 bit color RGB, 32 Bit color CMYK.


@ENDNODE

@NODE MacPaint "MacPaint Files"
@TOC Main
    MacPaint Files are that old files used on Macintosh. I included this
    format because some clip-art libraries still use this format...

@ENDNODE

@NODE GIF "GIF Files"
@TOC Main
    GIF Files (Graphics Interchange Format(c)) are files that are commonly
    used in the BBS and IBM World it is however limited to 256 colors.

    supported GIF:  GIF87a & GIF89a
     -multiple image GIF files
     -1,2,3,4,5,6,7,8 Bit interlaced & non interlaced files
     -Line-art, gray, palette images.


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

@ENDNODE

@NODE IFF "IFF Files"
@TOC Main
    IFF Files (Interchange File Format) are files that are commonly used in
    the Amiga World.

    supported IFF:
     -1,2,3,4,5,6,7,8 Bit
     -Line-art, gray, palette images.

@ENDNODE

@NODE JPEG "JPEG Files"
@TOC Main

     JPEG (pronounced "jay-peg") is a standardized compression method for
     full-color and gray-scale images. JPEG is designed to handle
     "real-world" scenes, for example scanned photographs. Cartoons, line
     drawings, and other non-realistic images are not JPEG's strong suit;
     on that sort of material you may get poor image quality and/or little
     compression.

     JPEG is lossy, meaning that the output image is not necessarily
     identical to the input image. Hence you should not use JPEG if you
     have to have identical output bits. However, on typical real-world
     images, very good compression levels can be obtained with no visible
     change, and amazingly high compression is possible if you can tolerate
     a low-quality image. You can trade off image quality against file size
     by adjusting the compressor's "quality" setting.

     This reading and writing is based in part on the work of the
     Independent JPEG Group


@ENDNODE
 

@NODE DataType "DataTypes Files"
@TOC Main

The datatypes.library provides transparent data handling abilities to
applications.  If @{b}TIFFView@{ub} finds an image it can't read it asks to
the datatypes.library to read the file.  This enables @{b}TIFFView@{ub} to
read a lot more image types.

This is available from WorkBench 3.0 and higher.

@ENDNODE

@NODE Requirements "System Requirements"
@TOC Main

    @{b}TIFFView@{ub} should run on any Amiga system with at least 512K RAM and one
disk-drive.  @{b}TIFFView@{ub} requires KickStart v2.04 or higher to run.

    @{b}TIFFView@{ub} also requires the ReqTools.library v38 or higher.  ReqTools is
copyright 1993 by Nico François.

    Should you have any trouble running @{b}TIFFView@{ub} on your machine, please
@{"write to me" LINK Author} with the full specifications of your machine, that is
KickStart version, model, expansion boards etc...

@ENDNODE

@NODE Usage "How to use TIFFView"
@TOC Main
    @{b}TIFFView@{ub} can be started from the Shell or the Workbench.  

    CLI Usage:

        TIFFView [filename(s)] [-r file]
          -r file : startup ARexx command (no parameters yet).

    WB Usage:

        Shift select files and double click TIFFView.

@ENDNODE

@NODE Menus "TIFFView Menu's"
@TOC Main

     @{" File Menu " LINK FileMenu}

     @{" Preference Menu " LINK PreferenceMenu}

     @{" Operations Menu " LINK OperationsMenu}

@ENDNODE

@NODE FileMenu "File Menu"
@TOC Menus

@{b}Open...@{ub}
  Calls File Requester to select an image to load.

@{b}Scan...@{ub}
  Not available.

@{b}Image Info...@{ub}
  Shows information about the currently active image.

@{b}Print@{ub}
  Prints the currently active image.

@{b}Kill Memory Image@{ub}
  Removes the memory image from the currently selected image.

@{b}Save@{ub}
  Saves the file using the name and path that shows in the title bar.  Only
  enabled if something was changed to the Image and the full image is in
  memory.

@{b}Save As...@{ub}
  Saves the file using an option requester and a File Requester to select
  options, name and path.

@{b}Close@{ub}
  Closes the currently active window.
  Asks if changes have to be saved if needed.

@{b}Quit@{ub}
  Closes all @{b}TIFFView@{ub} windows and Quits.

@ENDNODE

@NODE PreferenceMenu "Preference Menu"
@TOC Menus

@{b}First Image Only@{ub}
  Used for multiple image @{"TIFF" LINK TIFF} and @{"GIF" LINK GIF} Files.
  If you check this option the reading will be slightly faster but only the
  first image of multiple-image files will be shown and you are not warned of
  the presence of more images in the file.
  
@{b}Full File Names@{ub}
  If this is checked then the window title bar will show complete file path.

@{b}Screen Mode...@{ub}
  Shows a requester to define custom screen attributes.

@{b}Open Settings@{ub}
  @{i}Keep Memory Image@{ui}
    If checked and the original image has more colors like the screen image the
    complete full color image is kept in memory. This memory image is used for
    operations (Gamma) and for saving. This however can occupy a lot of memory.

    e.g.  A @{"TIFF" LINK TIFF} 24 bit image with the 'Keep Memory Image' option
          checked and a screen with an 8 bit representation requires 4 times the
          memory as without the memory image.

    note: A memory image can be removed later by selecting the Kill Memory
          Image menu option.

  @{i}All On Custom Screen@{ui}
    If checked, all images (also 1 bit images) open on the custom screen,
    otherwise 1 bit images open on the workbench screen.

  @{i}Full Size@{ui}
    Images always open starting in Top Left corner and the maximum window size is used.

  @{i}Cascade@{ui}
    Images are opened relative to previous opened window and shifted to
    left and bottom.

@{b}Buildin@{ub}
  @{i}TIFF@{ui}
  @{i}IFF@{ui}
  @{i}GIF@{ui}
  @{i}MacPaint@{ui}
  @{i}JPEG{ui}
    Enables the buildin code to read this image types.  If you want to read 
    an image with a datatype, switch off the menu item for that image type.

@{b}Printer Settings@{ub}
  @{i}Half Size@{ui}
  @{i}Normal Size@{ui}
  @{i}Double Size@{ui}
    Allows to set an enlargement factor for printing.

  @{i}Extra Info@{ui}
    Allows enabling of printing some information about the picture.

  @{i}Center Horizontal@{ui}
    Sets print position.

@{b}Save as Settings@{ub}
  The Save as Settings are there to specify what kind of image has to be the
  default type for the Save As Options...  requester.

  The @{"TIFF" LINK TIFF} comp.  mode option is there to generate a more compatible @{"TIFF" LINK TIFF}
  file for transportation across computers & applications:
    - Some @{"TIFF" LINK TIFF} readers don't support 2 or 3 bit @{"TIFF" LINK TIFF} files. 
      (so 2 and 3 bit @{"TIFF" LINK TIFF} files are converted to 4 bit @{"TIFF" LINK TIFF} files when saving).
    - 1-Bit @{"IFF" LINK IFF} or @{"GIF" LINK GIF} is saved as @{"TIFF" LINK TIFF} Line-Art (color information is removed)
      otherwise 1-Bit @{"IFF" LINK IFF} and @{"GIF" LINK GIF} is saved as a Palette @{"TIFF" LINK TIFF} of 1 Bit and the 
      color information remains intact.

  Without @{"TIFF" LINK TIFF} comp. mode ON the generated @{"TIFF" LINK TIFF} files are also correct
  according to the @{"TIFF" LINK TIFF} 6.0 standard but less common accepted by some other
  applications.

  @{i}Create Icons?@{ui}
    Allows enabling of icon creation for saved files. TIFFView looks for ENV:Sys/def_tiff, ENV:Sys/def_jpeg and ENV:Sys/def_ilbm
    for the creation of it's icon. If these are not found ENV:Sys/def_picture is tried.

@{b}Dithering Settings@{ub}
  @{i}No Dithering@{ui}
    Dithering is disabled.
  @{i}Simple@{ui}
    Just a simple and fast one dimensional dithering.
  @{i}Floyd & Steinberg@{ui}
    Good and fast 2-dimensional dithering.
  @{i}Jarvis, Judice & Ninke@{ui}
    Slow dithering over 3 lines.
  @{i}Stucki@{ui}
    Slow dithering over 3 lines.
  @{i}Stevenson & Arce@{ui}
    Slow dithering over 5 lines.

  Gray @{"TIFF" LINK TIFF}
    The dithering is for converting @{"TIFF" LINK TIFF} files to
    1, 2, 3, 4 or 6 bit Gray images.

  Color @{"TIFF" LINK TIFF}
    Color to Gray: Converts Color to Gray according to the Gray settings.
    Color to 3 Bit: 1 bit red, 1 bit green and 1 bit blue.
    Color to 5 Bit: 2 bit red, 2 bit green and 1 bit blue.
    Color to 6 Bit: 2 bit red, 2 bit green and 2 bit blue.
    Color to 8 Bit: 3 bit red, 3 bit green and 2 bit blue.

  Palette @{"TIFF" LINK TIFF}
    Remains untouched if the number of colors is less or equal to the value
    specified in the color to menu.
    Otherwise it is re-dithered to the value specified in the color to menu.
    See Color @{"TIFF" LINK TIFF}.

  Gray @{"GIF" LINK GIF}
    The dithering is for converting @{"GIF" LINK GIF} files to 1, 2, 3, 4 or 6 bit images.

  Color @{"GIF" LINK GIF}
    Remains untouched if the number of colors is less or equal to the value
    specified in the color to dithering menu.
    Otherwise it is re-dithered to the value specified in the color to menu.
    See Color @{"TIFF" LINK TIFF}.

  @{"IFF" LINK IFF}
    Remains untouched if the number of colors is less or equal to the value
    specified in the color to dithering menu.
    Otherwise it is re-dithered to the value specified in the color to menu.
    HAM & EHB @{"IFF" LINK IFF} files are not supported.

@{b}Scroll Settings@{ub}
  Sets scroll speed when clicking arrows from scroll bars.

@{b}Unit Settings@{ub}
  Used by printing for extra print information.
  Used in Image Info Window to show image size.

@{b}Load Settings@.{ub}
  Use these menu items to load a settings file.

@{b}Save Settings@{ub}
  Use these menu items to save the current settings to the tiffview.prefs file.

@{b}Save Settings As...@{ub}
  Use these menu items to save the current settings as a preset.

@ENDNODE

@NODE OperationsMenu "Operations Menu"
@TOC Menus

@{b}Gamma mapping...@{ub}
  Allows definition of gamma curve to re-map the image.

  Higher Gamma values give more detail in Dark Image parts (brighter Images).
  Lower Gamma values give less detail in Dark Image parts (Darker Images).

  No gamma is 1.0.

  A Good value for dark images should be 1.5.

@ENDNODE

@NODE ARexx "ARexx Port"
@TOC Main

   @{b}TIFFView@{ub} is equipped with an ARexx Port. The name for the ARexx Port is
`tiffview'.  So if you want to send commands to that port you would have
to issue

                           ADDRESS 'tiffview'

If you have more @{b}TIFFView's@{ub} running '-number' is appended to the port name.

  DoMenuItem Menu Item [Sub [val]] executes a menu item like if it was selected.
  Ex: domenuitem 1 6 1 ON selects scrolling speed normal  
  
  Full_file_names [OFF | ON]
  
  Screen_Mode screenwidth [xxxx]
  Screen_Mode screenheight [xxxx]
  Screen_Mode screendepth [xxxx]
  Screen_Mode screendisplayid [xxxx]
  Screen_Mode screenautoscroll [xxxx]
  Screen_Mode screenoverscan [xxxx]
  Screen_Mode Requester                        ; pops up a requester
  
  Open_Settings First_Image_Only [OFF | ON]
  Open_Settings Keep_Memory_Image [OFF | ON]
  Open_Settings All_On_Custom_Screen [OFF | ON]
  Open_Settings Full_Size
  Open_Settings Cascade

  Buildin_settings TIFF
  Buildin_settings IFF
  Buildin_settings GIF
  Buildin_settings MACPAINT
  Buildin_settings JPEG

  Printer_Settings Half_Size
  Printer_Settings Normal_Size
  Printer_Settings Double_Size
  Printer_Settings Extra_Info [OFF | ON]
  Printer_Settings Center_Horizontal [OFF | ON]
  
  Save_as_Settings IFF_Uncompressed
  Save_as_Settings IFF_Compressed
  Save_as_Settings TIFF_Uncompressed
  Save_as_Settings TIFF_Packbits
  Save_as_Settings TIFF_LZW
  Save_as_Settings JPEG_HIGH_QUALITY
  Save_as_Settings JPEG_QUALITY
  Save_as_Settings JPEG_SPEED
  Save_as_Settings TIFF_Comp._Mode [OFF | ON]
  Save_as_Settings Create_Icons [OFF | ON]
  
  Dithering_Settings Dithering No_Dithering
  Dithering_Settings Dithering Simple
  Dithering_Settings Dithering Floyd_Steinberg
  Dithering_Settings Dithering Jarvis_Judice_Ninke
  Dithering_Settings Dithering Stucki
  Dithering_Settings Dithering Stevenson_Arce
  
  Dithering_Settings Gray [To_Line-art | 1]
  Dithering_Settings Gray [To_2_Bit | 2]
  Dithering_Settings Gray [To_3_Bit | 3]
  Dithering_Settings Gray [To_4_Bit | 4]
  Dithering_Settings Gray [To_6_Bit | 6]
  Dithering_Settings Gray [To_8_Bit | 8]
  
  Dithering_Settings Color [To_Gray | 0]
  Dithering_Settings Color [To_3_Bit | 3]
  Dithering_Settings Color [To_5_Bit | 5]
  Dithering_Settings Color [To_6_Bit | 6]
  Dithering_Settings Color [To_8_Bit | 8]
  
  Scroll_Settings [Slow | Normal | Fast]
  
  Unit_Settings [Millimeters | Inches | Pixels]

  Configuration SAVE
  Configuration SAVEAS filename
  Configuration LOAD filename
  
  Version
  About
  Open filename
  PullToFront filename            ; filename is name used for open
  Close filename                  ; filename is name used for open
  Save filename                   ; filename is name used for open 
  Save_As filename newfilename    ; filename is name used for open
  Print filename                  ; filename is name used for open 
  
  ImageInfo filename width        ; filename is name used for open
  ImageInfo filename height       ; filename is name used for open
  ImageInfo filename depth        ; filename is name used for open
  ImageInfo filename resolx       ; filename is name used for open
  ImageInfo filename resoly       ; filename is name used for open
  ImageInfo filename imageKind    ; filename is name used for open memory image must be available
  ImageInfo filename imageClass   ; filename is name used for open
  ImageInfo filename compression  ; filename is name used for open
      result contains the requested information
  
  Kill Memory Image filename      ; filename is name used for open
  
  Operations Gamma factor          ; factor must be 10 times to big
  
@ENDNODE

@NODE Problems "Known Problems"
@TOC Main

If an image is dithered to more colors then the available colors of the screen, the
image will look bad, but it is correctly in memory so saving the image will
work correct.

e.g. Opening an @{"IFF" LINK IFF} 5 bit image (32 colors) with dithering color to 5 bit
     on an interlaced 4 bits (16 colors) screen gives a bad image on that screen.

@ENDNODE

@NODE Tips "Tips"
@TOC Main

On a system with not much memory or if you only use TIFFView for viewing
leave the 'Keep Memory Image' in the 'Open Settings' sub menu off.
This saves a lot of memory if you open 24 bit images, but does not allow
you to use the Save menu item (Save As works!!) if the image has changed.

@ENDNODE

@NODE ToDo "ToDo"
@TOC Main

  24 bit @{"IFF" LINK IFF} reading & saving (request by Jean-Pierre LeBel)
  Image cropping tool (request by Jean-Pierre LeBel)
  Implement Scanning with AGFA scanners (request by Jochen Brusseler)

@ENDNODE

@NODE About  "About the program"
@TOC Main

    Current version 1.14

    This program is freeware, this means that you can copy it freely as
long as you don't ask any more money for it than a nominal fee for copying.
If you want to distribute this program you should keep this document with
it.  This program cannot be used for commercial purposes without written
permission from the @{"author" LINK Author}.

    @{b}TIFFView@{ub} has proven to be stable in everyday use.  The author is not
responsible for any loss of data, damages to software or hardware that may
result directly or indirectly from the use of this program.  The author
reserves the right to make changes to the software or documentation without
notice.

    @{b}TIFFView@{ub} was written in C and compiled using SAS/C 6.51.

None of the files of the @{b}TIFFView@{ub} package may be modified.  Crunching or
achieving is allowed only if none of the @{b}TIFFView@{ub} files get modified by it.

Special permission is hereby granted to include @{b}TIFFView@{ub} in Public-Domain
collections such as Fred Fish's Amiga Library.

@ENDNODE

@NODE Author "About the Author"
@TOC Main

     If you have suggestions or remarks about this program, or if you
     find any bugs, please let me know.  

     When sending in bug reports, please state exactly under what
     circumstances the bug occurred, what equipment was used and what
     happened. If possible also try to give me enough information to
     reproduce the bug. It is very difficult to find bugs when you
     don't know exactly what happened.  

     Write to the following address: 

             Fido     :  2:292/603.76 (Bert Wynants)
             AmigaNet : 39:120/102.76 (Bert Wynants)

             SnailMail: Wynants Bert
                        Kapelaniestraat 22
                        B-2235 Hulshout
                        Belgium - Europe
                    starting from may 1995
                        Wynants Bert
                        Hogeheide 6
                        B-2260 Heultje-Westerlo
                        Belgium - Europe

     I will also try to put the latest available version of TIFFView
     on the following BBS (this may change without further notice): 

             Great Balls Of Fire BBS 
             ReqTools Support BBS 
             Herman Stevens 
             Lubbeek 
             ADS Distribution HUB 
             ABC Host Belgium 
             AFN Host Belgium 
             +32-16-640912  ZyXEL U-1496 E  14k4-16k8 bps
             +32-16-640099  SupraFax        2400-14k4 bps
             +32-16-640872  LightSpeed      1200-2400 bps
             24-24 h.  
             Fido Node  2:292/603 
             NLA Node  14:200/101.0 
             AmyNet    39:120/102.0 
 
@ENDNODE

@NODE History "Program History"
@TOC Main

    Changes & Fixes:

    1.14
        ENV:Sys/def_picture added for icon creation
        JPEG reading and writing added
        File Saving choice for memory/screen image fixed
        Fixed update problem with very small images

    1.13
        Width and Height update on the fly if the resolution changes in info window.
        Busy requester has a progress bar now.
        All requesters have the ReqTools backfill look now.
        Using GetDiskObjectNew for WB startup now.
        Aborting Creating Screen Image no longer gives a Memory Error.
        Scroll bars have newlook and are one linked boopsi gadget.
        Setting Scroll Speed for arrows works better.
        Buildin sub menu added to override buildin reading by datatype reading.
        Added support for datatypes for unknown image types.
        Added icon creation for saved files.
        Settings Load/Save added.
        Task and port names for multiple instances of TIFFView improved and corrected.
        Workbench color changing fixed. (Thanks to Peter Stuer for reporting)
        Public screen handling fixed and improved.

    1.12
        Handling more multiple image TIFF files correctly now...
        Gamma mapping on a CMYK image worked inverse.
        Multiple Image GIF files are now also supported.
        Complete revision of GIF reading, now I think it even works :-)
            thanks to all those who reported GIF reading bugs (Bart, Peter, Tom...).

    1.11
        Save/Discard/Cancel Dialog added
        @{"IFF" LINK IFF} dithering added
        Search scanner option removed
        Gamma handling moved to image windows menu's
        @{"MacPaint" LINK MacPaint} reading added
        Screen closing fixed for visitor window (e.g. Scale by Erik Wistrand)
        interleaved screen and bitmaps added
        bugfix for @{"IFF" LINK IFF} & interleaved screen
        3.0 NewLook Menu's added
        color to gray conversion uses luminance calculation now
        CMYK image conversion corrected
        removed 1.3 compatibility
        printing can be aborted now
        now the custom screen uses the user font also
        all requesters font sensitive
        requester added for saving options
        localized under OS2.1 and higher
        rewrite of internal ARexx handling

    1.10
        Save as gives warning if destination file already exists.
        some bugfixes in ARexx part.

    1.09
        Abort added for opening and saving images.
        CMYK image conversion added (@{"TIFF" LINK TIFF} only).
        Multiple file selection in file requester.
        Choosing between images in case of some mullet image @{"TIFF" LINK TIFF} files. 
          (requested by Peter Stuer, not all multiple image files are yet supported)
        Window tiling added for opening images. (Suggested by Peter Stuer)
        Preferences moved to ENVARC: on a 2.0 or 3.0 system.
          (Suggested by Peter Stuer)
        Corrected Default prefs for 3.0.
        Planar 24 bit @{"TIFF" LINK TIFF} reading added.
        Interlaced @{"GIF" LINK GIF} reading handled correct now 
          (Thanks Tom De Mulder for reporting).

    1.04
        General changes:
          Using ReqTools library for better requesters.
          Thanks to Nico François for ReqTools & his testing on the A4000.
          1-Bit @{"IFF" LINK IFF} -> @{"TIFF" LINK TIFF} Line-Art bug corrected.
          Bug fixed which caused custom screen to generate some bad colors for menu's.
          Color dithering fixed and added.
          Problem with mutual excl. menu's fixed.
          @{"GIF" LINK GIF} Reading added.
          Crash bug fixed for screens with more like 5 bits.
          Dithering improved.

        2.0 Specific:
          Screen mode requester added.
          Gamma Definition Requester added.
          Image information Requester added.
    
        3.0 Specific:
          8 bit screens support.
          256 grays or colors possible.

@ENDNODE
