%
% tnimage.tex
% format: TeX
%
\font\bbe = cmb10 scaled \magstep 4
\font\bbd = cmb10 scaled \magstep 3
\font\bbc = cmb10 scaled \magstep 2
\font\bbb = cmb10 scaled \magstep 1
\font\bba = cmb10 scaled \magstep 0


\font\rme = cmr10 scaled \magstep 4
\font\rmd = cmr10 scaled \magstep 3
\font\rmc = cmr10 scaled \magstep 2
\font\rmb = cmr10 scaled \magstep 1
\font\rma = cmr10 scaled \magstep 0

\font\tte = cmtt10 scaled \magstep 4
\font\ttd = cmtt10 scaled \magstep 3
\font\ttc = cmtt10 scaled \magstep 2
\font\ttb = cmtt10 scaled \magstep 1
\font\tta = cmtt10 scaled \magstep 0

\font\ite = cmti10 scaled \magstep 4
\font\itd = cmti10 scaled \magstep 3
\font\itc = cmti10 scaled \magstep 2
\font\itb = cmti10 scaled \magstep 1
\font\ita = cmti10 scaled \magstep 1

\def\bs {$\backslash$}

% Macro for putting text in boxes

\def\boxtext#1{%
\vbox{%
      \hrule
      \hbox{\strut \vrule{} #1 \vrule}%
      \hrule
     }%
}

\baselineskip = 11 pt
\vsize = 9 in
\hsize = 6 in

% --------Start------- %


\headline = {\hfil \rma TN-Image Page \the\pageno }
\rmb
\leftline { Section 0.0.0 }
\rme
\vskip 1.5 in\hrule height 2 pt
\vskip 1.5 in
\bbd\hfil
        TN-IMAGE
\par\vskip 2 in\hrule height 2 pt
\vskip 1 in

\bbc
        Description of TN-Image and xmtnimage
\par    Image Analysis Software

\rma Thomas J. Nelson (tjnelson@las1.ninds.nih.gov)

\vskip 0.5 in
\rmb
        Latest version:  2.5.7
\par    Latest revision: 07/01/1997
\vfill\eject
\rm

        Ordering (DOS version): 
\par
\leftskip = 1 in      T.J. Nelson \par
                      Box 275 \par
                      11140 Rockville Pike \par
                      Rockville, MD 20852 \par
                      USA

\par\vskip 0.5 in
\leftskip = 0 in
        e-mail:       
\par\leftskip = 1 in tjnelson@las1.ninds.nih.gov
\par\vskip 0.5 in
\leftskip = 0 in
                    
        ftp sites:  
\par
\leftskip = 1 in
      ftp://sunsite.unc.edu/Linux/X11/xapps/graphics (Linux versions)  \par

      ftp://las1.ninds.nih.gov/pub/unix/tnimage (all Unix versions) \par
      http://las1.ninds.nih.gov/pub/unix/tnimage (all Unix versions) \par
      ftp://las1.ninds.nih.gov/pub/dos/tnimage (DOS version) \par
\par\vskip 0.5 in
\leftskip = 0 in
                             
     A collection of sample test images, mostly in TIF format, is also 
     available at these sites. These are also the ftp sites for \tt nplot\rm, 
     the scientific graphics plotting program, and \tt tnshell\rm, 
     the DOS file manager. 
                      
     The DOS version is also available at SimTel mirror sites.

 
        BBS sites: 
\par
\leftskip = 1 in
                    Compuserve, PCAPP, library 10                    
\par\vskip 0.5 in
\leftskip = 0 in
\vskip 2 in
\vfill\eject

                

\hrule
\bigskip
\bbc { 1.0.0  Introduction }
\par\bigskip  
\hrule\medskip 
\vskip 0.5 in
\par\rma

   TN-Image is an advanced image analysis program oriented toward
   scientific and technical image analysis and editing.
   This manual describes both the DOS and Unix versions. The
   functionality of both versions is similar. However, those parts 
   of the manual discussing DOS specific issues and registration 
   are not applicable to the Unix version.
    
    
\bigskip\vfill
\eject
\baselineskip = 11 pt


\hrule\bigskip
\bbc\ { 1.1.0   Contents }
\bigskip
\hrule\bigskip
\rm
\rm

\hbox to 6 in {   Introduction                           \dotfill 1.0.0 }
\hbox to 6 in {   Contents                               \dotfill 1.1.0 }
\hbox to 6 in {   Summary                                \dotfill 2.0.0 }
\hbox to 6 in {   Usage License                          \dotfill 3.0.0 }
\hbox to 6 in {  \hskip 0.5 in  Summary of features in different versions  
                                                         \dotfill 3.1.0 }
\hbox to 6 in { \hskip 0.5 in  Submitting bug reports    \dotfill 3.2.0 }
\hbox to 6 in {  Upgrade policy                          \dotfill 4.0.0 }
\hbox to 6 in {  System Requirements                     \dotfill 5.0.0 }

\hbox to 6 in {  Overview                                \dotfill 6.0.0 }
\hbox to 6 in { \hskip 0.5 in  File types supported      \dotfill 6.1.0 }
\hbox to 6 in { \hskip 0.5 in  Pixel intensities         \dotfill 6.2.0 }
\hbox to 6 in { \hskip 0.5 in  Menu bars (DOS version)   \dotfill 6.3.0 }
\hbox to 6 in { \hskip 0.5 in  Menu bars (Unix version)  \dotfill 6.3.1 }
\hbox to 6 in { \hskip 0.5 in  Tutorial files            \dotfill 6.4.0 }




\hbox to 6 in {                Operation                 \dotfill 7.0.0 }
\hbox to 6 in { \hskip 0.5 in  Command line options      \dotfill 7.1.0 }
\hbox to 6 in { \hskip 1 in    Unix command line options \dotfill 7.1.1 }
\hbox to 6 in { \hskip 1 in    X Window resources        \dotfill 7.1.2 }
\hbox to 6 in { \hskip 1 in    Non-Motif resources       \dotfill 7.1.3 }
\hbox to 6 in { \hskip 1 in    User-defined buttons      \dotfill 7.1.4 }
\hbox to 6 in { \hskip 1 in    Image windows             \dotfill 7.1.5 }
\hbox to 6 in { \hskip 0.5 in  Video cards supported     \dotfill 7.2.0 }
\hbox to 6 in { \hskip 0.5 in  Screen modes supported    \dotfill 7.3.0 }
\hbox to 6 in { \hskip 0.5 in  Basic operation           \dotfill 7.4.0 }
\hbox to 6 in { \hskip 0.5 in  Operating under low-memory conditions
                                                         \dotfill 7.5.0 }
\hbox to 6 in { \hskip 0.5 in  Commonly asked questions  \dotfill 7.6.0 }
\hbox to 6 in { \hskip 0.5 in  Batch-mode processing     \dotfill 7.7.0 }
\hbox to 6 in { \hskip 0.5 in  Editing text files        \dotfill 7.8.0 }
\hbox to 6 in { \hskip 0.5 in  Reading mail attachments  \dotfill 7.9.0 }



\hbox to 6 in {               Menu Options               \dotfill 8.0.0 }
\hbox to 6 in { \hskip 0.5 in File Menu                  \dotfill 8.1.0 }
\hbox to 6 in { \hskip 0.7 in Load Image                 \dotfill 8.1.1 }
\hbox to 6 in { \hskip 0.9 in CT, X-ray, NMR, and raw byte images
                                                         \dotfill 8.1.1.1 }
\hbox to 6 in { \hskip 0.9 in Reading raw byte files     \dotfill 8.1.1.2 }
\hbox to 6 in { \hskip 0.9 in Reading Images from Macintosh\dotfill 8.1.1.3 }
\hbox to 6 in { \hskip 0.9 in Reading ASCII images       \dotfill 8.1.1.4 }
\hbox to 6 in { \hskip 0.9 in Reading 3D images          \dotfill 8.1.1.5 }
\hbox to 6 in { \hskip 0.9 in Reading confocal microscope and PET scan images
                                                         \dotfill 8.1.1.6 }
\hbox to 6 in { \hskip 0.7 in Save Image                 \dotfill 8.1.2 }
\hbox to 6 in { \hskip 0.7 in Printing Images            \dotfill 8.1.3 }
\hbox to 6 in { \hskip 0.9 in  Grayscale printing        \dotfill 8.1.3.1 }
\hbox to 6 in { \hskip 0.9 in  Color printing            \dotfill 8.1.3.2 }
\hbox to 6 in { \hskip 0.9 in  Printing to a file or different printer
                                                         \dotfill 8.1.3.3 }
\hbox to 6 in { \hskip 0.9 in  Printing in Unix          \dotfill 8.1.3.4 }
\hbox to 6 in { \hskip 0.9 in  Printing in Windows       \dotfill 8.1.3.5 }

\hbox to 6 in { \hskip 0.7 in Change Title               \dotfill 8.1.4 }
\hbox to 6 in { \hskip 0.7 in Create/Resize Object       \dotfill 8.1.6 }
\hbox to 6 in { \hskip 0.7 in Switch to                  \dotfill 8.1.7 }
\hbox to 6 in { \hskip 0.7 in Create File Format         \dotfill 8.1.8 }
\hbox to 6 in { \hskip 0.7 in Save FFT                   \dotfill 8.1.9 }
\hbox to 6 in { \hskip 0.7 in Erase FFT                  \dotfill 8.1.10 }
\hbox to 6 in { \hskip 0.7 in DOS Command                \dotfill 8.1.11 }
\hbox to 6 in { \hskip 0.7 in Erase FFT                  \dotfill 8.1.12 }
\hbox to 6 in { \hskip 0.7 in Quit                       \dotfill 8.1.13 }
\hbox to 6 in { \hskip 0.7 in Load FFT                   \dotfill 8.1.14 }
\hbox to 6 in { \hskip 0.7 in Acquire (scanner interface)\dotfill 8.1.15 }
\hbox to 6 in { \hskip 0.7 in Creating and executing plugins 
                                                         \dotfill 8.1.16 }

\hbox to 6 in { \hskip 0.5 in Image menu                 \dotfill 8.2.0 }
\hbox to 6 in { \hskip 0.7 in Delete region              \dotfill 8.2.1 }
\hbox to 6 in { \hskip 0.7 in Crop                       \dotfill 8.2.2 }
\hbox to 6 in { \hskip 0.7 in Erase background           \dotfill 8.2.3 }
\hbox to 6 in { \hskip 0.7 in Copy/Move                  \dotfill 8.2.4 }
\hbox to 6 in { \hskip 0.7 in    Copying chromakeyed regions  \dotfill 8.2.4.1 }
\hbox to 6 in { \hskip 0.7 in Paste                      \dotfill 8.2.5 }
\hbox to 6 in { \hskip 0.7 in Change size                \dotfill 8.2.6 }
\hbox to 6 in { \hskip 0.7 in Rotate image               \dotfill 8.2.7 }
\hbox to 6 in { \hskip 0.7 in Flip horizontally          \dotfill 8.2.8 }
\hbox to 6 in { \hskip 0.7 in Flip vertically            \dotfill 8.2.9 }
\hbox to 6 in { \hskip 0.7 in Back up                    \dotfill 8.2.10 }
\hbox to 6 in { \hskip 0.7 in Restore                    \dotfill 8.2.11 }
\hbox to 6 in { \hskip 0.7 in Image properties           \dotfill 8.2.12 }
\hbox to 6 in { \hskip 0.9 in   Chroma-key               \dotfill 8.2.12.1 }
\hbox to 6 in { \hskip 0.9 in   Transparency             \dotfill 8.2.12.2 }
\hbox to 6 in { \hskip 0.7 in Repair                     \dotfill 8.2.13 }
\hbox to 6 in { \hskip 0.7 in 3D / Frame controls        \dotfill 8.2.14 }

\hbox to 6 in { \hskip 0.5 in Process menu               \dotfill 8.3.0 }
\hbox to 6 in { \hskip 0.7 in Filter                     \dotfill 8.3.1 }
\hbox to 6 in { \hskip 0.9 in High pass                  \dotfill 8.3.1.1 }
\hbox to 6 in { \hskip 0.9 in Low pass                   \dotfill 8.3.1.2 }
\hbox to 6 in { \hskip 0.9 in Background subtract        \dotfill 8.3.1.2 }
\hbox to 6 in { \hskip 0.9 in Background flatten (de-trending)  \dotfill 8.3.1.4 }
\hbox to 6 in { \hskip 0.9 in Noise reduction (median) filter   \dotfill 8.3.1.5 }
\hbox to 6 in { \hskip 0.9 in Laplace edge enhancement    \dotfill 8.3.1.6 }
\hbox to 6 in { \hskip 0.9 in Sobel edge enhancement      \dotfill 8.3.1.7 }
\hbox to 6 in { \hskip 0.9 in Edge detection              \dotfill 8.3.1.8 }
\hbox to 6 in { \hskip 0.9 in Adjustable parameters       \dotfill 8.3.1.9 }
\hbox to 6 in { \hskip 0.7 in Warp                        \dotfill 8.3.2 }
\hbox to 6 in { \hskip 0.7 in Measure                     \dotfill 8.3.3 }
\hbox to 6 in { \hskip 0.9 in Distance                    \dotfill 8.3.3.1 }
\hbox to 6 in { \hskip 0.9 in Angle                       \dotfill 8.3.3.2 }
\hbox to 6 in { \hskip 0.7 in Calibration.                \dotfill 8.3.4 }
\hbox to 6 in { \hskip 0.7 in Spot Densitometry           \dotfill 8.3.5 }
\hbox to 6 in { \hskip 0.9 in Area Measurements           \dotfill 8.3.5.1 }
\hbox to 6 in { \hskip 0.7 in Strip Densitometry          \dotfill 8.3.6 }
\hbox to 6 in { \hskip 0.9 in Plotting data               \dotfill 8.3.7 }
\hbox to 6 in { \hskip 0.9 in Peak areas                  \dotfill 8.3.8 }
\hbox to 6 in { \hskip 0.7 in Trace curve                 \dotfill 8.3.9 }
\hbox to 6 in { \hskip 0.7 in Image algebra               \dotfill 8.3.10 }
\hbox to 6 in { \hskip 0.7 in FFT (2D Fourier Transform)    \dotfill 8.3.11 }
\hbox to 6 in { \hskip 0.9 in Convolution                   \dotfill 8.3.11.1 }
\hbox to 6 in { \hskip 0.9 in Deconvolution and image reconstruction 
                                                            \dotfill 8.3.11.2 }
\hbox to 6 in { \hskip 0.9 in Digital filtering using FFT   \dotfill 8.3.11.3 }
\hbox to 6 in { \hskip 0.7 in Macros                        \dotfill 8.3.12 }
\hbox to 6 in { \hskip 0.9 in Macro command summary         \dotfill 8.3.12.1 }
\hbox to 6 in { \hskip 0.9 in Macro programming guide       \dotfill 8.3.12.2 }

\hbox to 6 in { \hskip 0.5 in Color Menu                    \dotfill 8.4.0 }
\hbox to 6 in { \hskip 0.7 in Set color                     \dotfill 8.4.1 }
\hbox to 6 in { \hskip 0.7 in Color intensity/brightness    \dotfill 8.4.2 }
\hbox to 6 in { \hskip 0.9 in Changing brightness using palette bar\dotfill 8.4.2.1 }
\hbox to 6 in { \hskip 0.9 in Changing brightness using menus      \dotfill 8.4.2.2 }
\hbox to 6 in { \hskip 0.7 in Contrast                             \dotfill 8.4.3 }
\vfill\eject
\hbox to 6 in { \hskip 0.7 in Palette (colormap)             \dotfill 8.4.4 }
\hbox to 6 in { \hskip 0.9 in Select colormap                \dotfill 8.4.4.1 }
\hbox to 6 in { \hskip 0.9 in Grayscale intensity mapping    \dotfill 8.4.4.2 }
\hbox to 6 in { \hskip 0.9 in Read colormap from disk        \dotfill 8.4.4.3 }
\hbox to 6 in { \hskip 0.9 in Save colormap to disk          \dotfill 8.4.4.4 }
\hbox to 6 in { \hskip 0.9 in Create colormap                \dotfill 8.4.4.5 }
\hbox to 6 in { \hskip 0.9 in Invert colormap                \dotfill 8.4.4.6 }
\hbox to 6 in { \hskip 0.9 in Rotate colormap                \dotfill 8.4.4.7 }
\hbox to 6 in { \hskip 0.9 in Restore original colormap      \dotfill 8.4.4.8 }
\hbox to 6 in { \hskip 0.9 in Sort colormap                  \dotfill 8.4.4.9 }


\hbox to 6 in { \hskip 0.7 in Remap colors                   \dotfill 8.4.5 }
\hbox to 6 in { \hskip 0.7 in Invert colors                  \dotfill 8.4.6 }
\hbox to 6 in { \hskip 0.7 in Change color depth             \dotfill 8.4.7 }
\hbox to 6 in { \hskip 0.7 in Color to gray scale            \dotfill 8.4.8 }
\hbox to 6 in { \hskip 0.7 in Gray scale tocolor             \dotfill 8.4.9 }
\hbox to 6 in { \hskip 0.7 in Histogram                      \dotfill 8.4.10 }
\hbox to 6 in { \hskip 0.7 in Change pixel value             \dotfill 8.4.11 }
\hbox to 6 in { \hskip 0.7 in Separate colors                \dotfill 8.4.12 }
\hbox to 6 in { \hskip 0.7 in Composite image                \dotfill 8.4.13 }

\hbox to 6 in { \hskip 0.5 in Draw menu                      \dotfill 8.5.0 }
\hbox to 6 in { \hskip 0.7 in Label                          \dotfill 8.5.1 }
\hbox to 6 in { \hskip 0.7 in Set foreground color           \dotfill 8.5.2 }
\hbox to 6 in { \hskip 0.7 in Set background color           \dotfill 8.5.3 }
\hbox to 6 in { \hskip 0.7 in Line                           \dotfill 8.5.4 }
\hbox to 6 in { \hskip 0.7 in Circle                         \dotfill 8.5.5 }
\hbox to 6 in { \hskip 0.7 in Box                            \dotfill 8.5.6 }
\hbox to 6 in { \hskip 0.7 in Arrow                          \dotfill 8.5.7 }
\hbox to 6 in { \hskip 0.7 in Curve                          \dotfill 8.5.8 }
\hbox to 6 in { \hskip 0.9 in Bezier curve.                  \dotfill 8.5.8.1 }
\hbox to 6 in { \hskip 0.9 in B-spline curve                 \dotfill 8.5.8.2 }
\hbox to 6 in { \hskip 0.9 in Least-squares line             \dotfill 8.5.8.3 }
\hbox to 6 in { \hskip 0.9 in Polygon                        \dotfill 8.5.8.4 }
\hbox to 6 in { \hskip 0.9 in Trapezoid                      \dotfill 8.5.8.5 }
\hbox to 6 in { \hskip 0.9 in Snap trapezoid                 \dotfill 8.5.8.6 }
\hbox to 6 in { \hskip 0.9 in Fixed-width rectangle          \dotfill 8.5.8.7 }

\hbox to 6 in { \hskip 0.7 in Text direction                 \dotfill 8.5.7 }
\hbox to 6 in { \hskip 0.7 in Font                           \dotfill 8.5.8 }
\hbox to 6 in { \hskip 0.7 in Sketch                         \dotfill 8.5.9 }
\hbox to 6 in { \hskip 0.7 in Fill region                    \dotfill 8.5.10 }
\hbox to 6 in { \hskip 0.9 in Gradient fill                  \dotfill 8.5.10.1 }
\hbox to 6 in { \hskip 0.7 in Paint region                   \dotfill 8.5.11 }
\hbox to 6 in { \hskip 0.7 in Spray                          \dotfill 8.5.12 }
\hbox to 6 in { \hskip 0.9 in Fine spray                     \dotfill 8.5.12.1 }
\hbox to 6 in { \hskip 0.9 in Diffuse spray                  \dotfill 8.5.12.2 }
\hbox to 6 in { \hskip 0.9 in Math spray                     \dotfill 8.5.12.3 }
\hbox to 6 in { \hskip 0.7 in Add border                     \dotfill 8.5.13 }

\hbox to 6 in { \hskip 0.5 in About menu                     \dotfill 8.6.0 }
\hbox to 6 in { \hskip 0.7 in About the program              \dotfill 8.6.1 }
\hbox to 6 in { \hskip 0.7 in About the file                 \dotfill 8.6.2 }
\hbox to 6 in { \hskip 0.7 in About the image                \dotfill 8.6.3 }
\hbox to 6 in { \hskip 0.7 in How to register                \dotfill 8.6.4 }

\hbox to 6 in { \hskip 0.5 in Configure menu                 \dotfill 8.7.0 }
\hbox to 6 in { \hskip 0.7 in Show menu bar                  \dotfill 8.7.1 }
\hbox to 6 in { \hskip 0.7 in Show menu bar 2                \dotfill 8.7.2 }
\hbox to 6 in { \hskip 0.7 in Show colormap                  \dotfill 8.7.3 }
\hbox to 6 in { \hskip 0.7 in Redraw menu bar                \dotfill 8.7.4 }
\hbox to 6 in { \hskip 0.7 in Redraw colormap                \dotfill 8.7.5 }
\hbox to 6 in { \hskip 0.7 in Show O.D. table                \dotfill 8.7.6 }
\hbox to 6 in { \hskip 0.7 in Pixel interact mode            \dotfill 8.7.7 }
\hbox to 6 in { \hskip 0.7 in Configure                      \dotfill 8.7.8 }
\vfill\eject
\hbox to 6 in { \hskip 0.9 in Automatic undo                 \dotfill 8.7.8.1 }
\hbox to 6 in { \hskip 0.9 in Spray factor                   \dotfill 8.7.8.2 }
\hbox to 6 in { \hskip 0.9 in Cursor movement rate           \dotfill 8.7.8.3 }
\hbox to 6 in { \hskip 0.9 in Color settings                 \dotfill 8.7.8.4 }
\hbox to 6 in { \hskip 0.9 in Significant digits             \dotfill 8.7.8.5 }
\hbox to 6 in { \hskip 0.9 in Crawl delay                    \dotfill 8.7.8.6 }
\hbox to 6 in { \hskip 0.9 in Crawl density                  \dotfill 8.7.8.7 }
\hbox to 6 in { \hskip 0.9 in Active color planes            \dotfill 8.7.8.8 }
\hbox to 6 in { \hskip 0.5 in Help menu                      \dotfill 8.8.0 }
\hbox to 6 in { \hskip 0.5 in Miscellaneous features         \dotfill 8.9.0 }
\hbox to 6 in { \hskip 0.7 in Frame rate test                \dotfill 8.9.1 }
\hbox to 6 in { \hskip 0.7 in Emergency repair image         \dotfill 8.9.2 }
\hbox to 6 in { \hskip 0.7 in Erase image                    \dotfill 8.9.3 }
\hbox to 6 in { \hskip 0.7 in Sketch mode                    \dotfill 8.9.4 }
\hbox to 6 in {               Windows and OS/2 compatibility \dotfill 9.0.0 }
\hbox to 6 in {               Changing Computers             \dotfill 10.0.0 }

\hbox to 6 in {               Problems                       \dotfill 11.0.0 }
\hbox to 6 in {               Limitations and known bugs     \dotfill 12.0.0 }
\hbox to 6 in {               Error messages                 \dotfill 13.0.0 }
\hbox to 6 in {    Trademark disclaimers and acknowledgements\dotfill 14.0.0 }

\vfill
\bigskip
\hrule
\eject



\bigskip
\hrule\bigskip
\bbc\ { 2.2.0  Summary  }
\bigskip
\hrule\bigskip
\rm

  TN-Image allows you to scan, view, edit, and print PCX, IMG, TIF (both     
  Macintosh and PC), JPEG, BMP, GIF, and TGA images, of any depth     
  between 1 and 32 bits per pixel, color or monochrome, as well as raw
  binary images, raw 3D, and user-definable image formats.  You can edit,      
  cut/paste, add text, adjust color intensity or contrast, superimpose
  multiple images, and create drawings using lines, circles, splines  
  and Bezier curves. It handles 8 bit/pixel (indexed-color), as well  
  as 15,16, 24 and 32-bit per pixel screen modes. In the indexed-color 
  modes, you can change the color map to one of 10,000 pre-defined
  colormaps or graphically create a new one. TN-Image is completely    
  menu-driven with an extremely user-friendly graphical user          
  interface. Dialog boxes and graphs can all be clicked-and-dragged to
  one side so as not to obscure the image. Image size is limited only 
  by available memory or disk space (whichever is greater).  Image 
  transparency can be easily adjusted.

  TN-Image is particularly useful for scientific image analysis,      
  with densitometry, background subtraction, molecular weight calibration,
  and automatic detection of peaks, bands and spots in your   
  image for quantitative measurement of optical density. Images deeper 
  than 8 bits/pixel, such as medical grayscale images, can be viewed  
  with a sliding scale to enhance any particular intensity region.    
  Images can be rotated, resized, warped, flipped, color-remapped, or 
  filtered (with sharpening, blurring, edge enhancement,   
  freeze-fracture effect (shadow  sharpening), background subtract, or 
  noise filter). Quantitative data, peak area tables, or color histograms 
  can be exported to an ASCII file with a single mouse click.   

  Areas or parts of images can be filled with a solid color or a color
  gradient, copied to another region, superimposed, subtracted, XOR'd,
  added, averaged or erased. All operations function seamlessly across
  multiple images regardless of their color depth. Images can be up-  
  or down-converted into a different color depth.                     

  It is particularly useful to biochemists and molecular biologists   
  who wish to analyze SDS gels, blots, and DNA gels. The blot can     
  simply be scanned in a scanner, then labeled, analyzed, quantitated, 
  and printed on a  
  laser printer. Printed blot images and quantitative results have    
  already appeared in several scientific papers. The print quality    
  is optimized for high resolution, and gives extremely high quality  
  output on a laser or inkjet printer up to 2400 dpi.                 

  Images can be Fourier-transformed and the real or imaginary components 
  can be viewed, edited and modified. Pairs of images can also be
  convoluted and deconvoluted. Power spectra can also be viewed.      

  TN-Image can use up to 2GB of extended and virtual memory. Up to 512
  images can be viewed and edited simultaneously. The program requires
  an 80386 with a minimum of 4MB of RAM, DOS 3.2 or above or a supported
  version of Unix, and a Super
  VGA  monitor. It handles all VESA screen modes, including 1600x1200 
  resolution, in 256, 32768, 65536, and 16 million (true color) modes.
  A mouse is required. Laser or inkjet printer is required for        
  printing. TN-Image can also run in a DOS box under Windows or OS/2  
  if desired.                                                         

  Images  can overlap without  interfering  with  each
  other or the  background.  You  can use the mouse to scroll through
  the image in adjustable steps.

\vfill\eject
\hrule\bigskip
\bbc\ { 3.0.0  Usage license }
\bigskip
\hrule\bigskip
\bbb             NOTICE
\bigskip
\hrule\bigskip
\it
\par
 
   The author makes no claims or warranties concerning the accuracy 
   of the information presented herein, including, but not limited to,
   any implied warranties of fitness or suitability for any purpose 
   and is not responsible for any loss, damage, inaccurate medical
   diagnosis, or personal injury of any kind occurring out of or in 
   connection with the use of this product. In no event shall the author, 
   or any other party who may have redistributed the product as permitted below, be 
   liable for any damages, including any general, special, incidental, or 
   consequential damages arising out of the use or inability to use this 
   product, including but not limited to loss of data or data being
   rendered inaccurate or losses sustained by you or third parties or 
   any failure of the product to operate with any other programs, even 
   if such holder or other party has been advised of the possibility of 
   such damages.

\rm
\bigskip\hrule\bigskip

   The Unix versions and the DOS Shareware version of TN-Image, including 
   this manual, may be
   freely redistributed, copied, and uploaded to computer networks or 
   bulletin boards without restriction, provided that the following 
   conditions are met:

   (1) This documentation file and all other files included in the 
   TN-Image package, including the sample images and tutorial files,
   must be included in their entirety whenever the program is distributed. 
   Any modifications of the documentation must be clearly indicated as such. 

   (2) The executable file must not be modified in any way
   without express written permission from the author.

   (3) No algorithm used in this program or any part of the user
   interface may be patented or trademarked by any party. 

   (4) No additional restrictions  may be added to the above-mentioned
   limitations. In particular, vendors, end users and distributors may  
   not be prohibited from distributing, uploading, or using the shareware 
   version of this package without any charge or restriction other
   than those stated in this license.

   (5) The DOS Shareware version of TN-Image may also be distributed in 
   any form, including CD-ROM,
   on a commercial for-profit basis, as long as the package is clearly
   marked as being ``shareware'' or ``containing shareware items''.
   No restrictions are placed on distribution of the Unix version.

   In contradistinction to conditions (4) and (5) above, the DOS registered 
   version of TN-Image may not be distributed by any party without the 
   express written permission from the author. Inquiries regarding site 
   licenses, from commercial enterprises wishing to market this program,
   or persons wishing to obtain a customized version of the program on
   a contract basis should be directed to the above mail or e-mail address.


\vfill\eject
\hrule\bigskip
\bbc\ { 3.0.1  Source code usage license }
\bigskip
\hrule\bigskip

\bba  No Warranty
\rm

This source code is provided with no warranty of any kind. No
guarantee is made that this software will even compile or execute 
properly on any given machine after compilation. The author retains 
copyright on all files except xmtnimage16.cc, which is largely derived 
from the work of the Independent JPEG group. The distribution of the JPEG 
interface source code in xmtnimage16.cc is covered under the GNU General 
Public License (GPL) which may differ in some details from this License. 
A copy of the GPL is included in the file ``GPL''.

End users are encouraged to use the pre-compiled versions of this
program if possible rather than compiling this source code. Pre-compiled
versions are available by anonymous ftp at las1.\-ninds.\-nih.\-gov for the
following platforms:  MS-DOS, ConvexOS, Linux (x86), Solaris (Ultra Sparc), 
and SGI Irix. Should you wish to compile the source code, Motif and a 
\tt libjpeg \rm library and their corresponding include files
must be previously installed.  \tt libjpeg \rm 
is available from ftp.uu.net.  Motif is a commercial product available 
from numerous sources. It may also be necessary to modify the files 
\tt xmtnimage.h \rm and \tt makefile \rm.

\vskip 0.2 in
\bba Usage license

\rm

\item{1.} No portion of this software, including the user interface, or any 
   algorithm used herein, may be patented or trademarked by any party. 
   This public release of the source code is to be construed as 
   ``prior art'' for all such algorithms.   

\item{2.} Any public redistribution of the software must include all the files
   listed above as part of TN-Image, as well as the manual (tnimage.ps
   and/or tnimage.tex) and a copy of this Usage License, and must be
   distributed in an unmodified form unless specifically authorized in 
   writing by the author. Authorization in writing must also be obtained
   before distributing or marketing ports of this software to Windows or 
   to other operating systems. This does not apply to redistributions of 
   existing pre-compiled versions which do not have to be accompanied by 
   the source code.

\item{3.} Incorporation of small portions of this source code into other programs, 
   including freeware, shareware, or commercial programs, is permitted
   provided that (a) acknowledgement of authorship by Thomas J. Nelson
   is included appropriately in the documentation and in all copies of 
   the source code derived from this work and (b) the source code of 
   the derived work is made available without charge or for a nominal 
   fee not to exceed the cost of duplication.
   
\item{4.} No additional restrictions other than those described above may be 
   placed on works derived from this software. In particular, vendors, 
   end users and distributors may not be prohibited from distributing, 
   uploading, or using this package without any charge or restriction 
   other than those stated in this License.

            


\bigskip
\hrule\bigskip
\vfill\eject
\hrule\bigskip
\bbc\ { 3.1.0   Summary of features in different versions}
\bigskip\rm
\hrule\bigskip

\settabs 9 \columns
\smallskip\hrule\smallskip
\+                       & & &DOS       &DOS         &      &      &        &        \cr
\+ Feature               & & &Shareware &Registered  &Linux &Irix  &Solaris   &ConvexOS\cr
\vskip 0.05in 
\hrule
\vskip 0.05in 
\+ Max. images           & & &2         &512         &512     &512    &512       &512     \cr
\+ Image editing         & & &x         &x           &x       &x      &x         &x       \cr
\+ Image conversion      & & &x         &x           &x       &x      &x         &x       \cr
\+ Format conversion     & & &x         &x           &x       &x      &x         &x       \cr
\+ Labeling              & & &x         &x           &x       &x      &x         &x       \cr
\+ Drawing               & & &x         &x           &x       &x      &x         &x       \cr
\+ Multiple fonts        & & &          &            &x       &x      &x         &x       \cr
\+ Image algebra         & & &          &x           &x       &x      &x         &x       \cr
\+ Grayscale images $>$ 8 bits & & &x   &x           &x       &x      &x         &x       \cr
\+ Histograms            & & &x         &x           &x       &x      &x         &x       \cr
\+ Selectable color planes & & &x       &x           &x       &x      &x         &x       \cr
\+ Image calibration     & & &x         &x           &x       &x      &x         &x       \cr
\+ TIFF                  & & &x         &x           &x       &x      &x         &x       \cr
\+ TGA                   & & &x         &x           &x       &x      &x         &x       \cr
\+ BMP                   & & &x         &x           &x       &x      &x         &x       \cr
\+ IMG                   & & &x         &x           &x       &x      &x         &x       \cr
\+ PCX                   & & &x         &x           &x       &x      &x         &x       \cr
\+ GIF                   & & &x$^1$     &x$^1$       &x       &x      &x         &x       \cr
\+ Raw                   & & &x         &x           &x       &x      &x         &x       \cr
\+ ASCII                 & & &x         &x           &x       &x      &x         &x       \cr
\+ Custom image formats  & & &          &x           &x       &x      &x         &x       \cr
\+ JPEG                  & & &          &x           &x       &x      &x         &x       \cr
\+ 3D                    & & &          &            &x       &x      &x         &x       \cr
\+ Densitometry          & & &          &x           &x       &x      &x         &x       \cr
\+ Fourier transform     & & &          &x           &x       &x      &x         &x       \cr
\+ Deconvolution         & & &          &x           &x       &x      &x         &x       \cr
\+ Selectable colormaps  & & &2         &10000       &10000   &10000  &10000     &10000   \cr
\+ Filters               & & &2         &13          &13      &13     &13        &13       \cr
\+ Virtual memory        & & &          &x           &x       &x      &x         &x       \cr
\+ Peak Area analysis    & & &          &x           &x       &x      &x         &x       \cr
\+ PCL Printing          & & &          &x           &x       &x      &x         &x       \cr
\+ PostScript Printing   & & &          &x           &x       &x      &x         &x       \cr
\+ Macro language        & & &          &x           &x       &x      &x         &x       \cr
\+ Image transparency    & & &          &            &x       &x      &x         &x       \cr
\+ Chroma-keying         & & &          &            &x       &x      &x         &x       \cr
\+ Scanner interface     & & &          &            &x       &x      &x         &        \cr
\+ Plugins               & & &          &            &x       &x      &          &        \cr
\+ User-defined buttons  & & &          &            &x       &x      &x         &x       \cr
 
\vskip 0.05in 


\hrule
\vskip 0.05in 
$^1$ Read-only due to patent restrictions. 

\bigskip
\vfill\break
\hrule\bigskip
\bbc { 3.2.0  Submitting bug reports  }
\bigskip
\hrule\bigskip
\par\rm
   If TN-Image crashes, hangs, draws the screen incorrectly or fails
   to read or write a valid image, it is probably a bug. If it causes
   some other undesired effect (such as starting World War III), this
   is also a bug (\it Note: \rm this should not happen in normal use).
   I would greatly  appreciate receiving bug reports from all  
   users. Bug reports should be sent to the above Internet e-mail address 
   for fastest response, or alternatively to the P.O. box listed above.  
   If you send a bug report, please run the command ``tnimage -diag'' first 
   and write down any relevant information. Also indicate your computer 
   type, video card, and monitor type, what resolution you are trying to 
   use, and the operating system and OS version you are using, and any 
   other relevant information.  Most importantly, indicate what version 
   of TN-Image you are using, the size and type of image involved, and the 
   sequence of actions that cause the problem. If the problem only occurs 
   with a specific image, you may also need to send a copy of the image file. 
   The easiest way to do this is to upload it by ftp into the `pub/incoming' 
   directory on las1.ninds.nih.gov. All bug reports will receive immediate 
   attention. If you are a registered user of the DOS version, you will 
   also receive a replacement disk if I am able to reproduce the bug.
\bigskip



\bigskip
\hrule\bigskip
\bbc { 4.0.0  Upgrade policy }
\bigskip
\hrule\bigskip

\rm
   Registered users of the DOS version can obtain the latest version at 
   any time by ftp at a special ftp account.
   Read the file TNIMAGE.NEW, available at the ftp site, for news about 
   the latest features and changes in TN-Image.
   The latest Unix version(s) are also freely available at the ftp site.

 
\bigskip
\hrule\bigskip
\vfill\eject
\hrule\bigskip
\bbc { 5.0.0   System  Requirements (DOS Version)  }
\bigskip
\hrule\bigskip
\rm

  TN-Image has the following minimum system requirements:

\parindent 0.5 in
   DOS Version:

   1. MS- or PC-DOS above version 3.2 or Windows.   

   2. A minimum of 4 MB of RAM, preferably 8 MB. 8MB is strongly recommended
   and may be required in future versions (If you have 4 MB of RAM 
   or less, see \it Operating under low-memory conditions \rm below).

   3. A computer with an 80386 or higher CPU. 

   4. A Super VGA card with at least 1 MB of video memory, and capable
   of handling 256 or more colors. 


\rm
\par\parindent 0.5 in

   5. A super VGA monitor capable of displaying 256 colors. The
   default screen mode for TN-Image is 800 x 600 pixels. If you don't
   know whether your monitor can display at this resolution, it is
   advisable to check first, either in your monitor documentation, or
   using the diagnostics program that should have come with your video 
   card. WARNING: It is the responsibility of the video card, not this
   program, to determine whether your monitor can handle any given screen
   mode. The only way for the program to determine whether it is safe to
   set a given screen mode is to query your video card. Unfortunately,
   not all video cards respond with accurate information. If your video 
   card supports this screen mode but your monitor doesn't, you could
   experience a computer crash or even (theoretically) damage your 
   monitor. This has never happened in all the months of extensive 
   testing of the program on a variety of monitors. Nonetheless: 

\bf
\parindent 20 pt

      THE AUTHOR ASSUMES NO RESPONSIBILITY FOR PROBLEMS
      CAUSED BY RUNNING THIS PROGRAM IN A COMPUTER WHICH HAS A
      SUPER VGA CARD ATTACHED TO A REGULAR (NON-SUPER VGA) MONITOR!

\rm

   If you have a super VGA monitor but it cannot handle 800x600 pixel
   mode, TN-Image can also use other video modes. See ``Command-line
   options'' below.

\parindent 0.5 in
   6. A mouse. It is advisable to obtain a mouse driver that is 
   compatible with super VGA modes, such as Logitech's mouse driver 
   version 6.12 or later. Earlier mouse drivers will work, but you 
   will not have as fine control of the mouse as with later versions. 
   A mouse driver is needed even if TN-Image is run in a Windows DOS box.

   7. TN-Image should be run from a hard disk. If run from a floppy, do
   not remove the floppy while the program is running.

   8. A PCL laser or inkjet printer or PostScript Level 2 printer is required 
   to obtain hard copies. (H/P 
   Laserjet compatible or a similar 600 dpi laser printer is recommended).
   A 300 dpi printer will also work, but will give inferior quality prints. 
   A H/P compatible color laser or inkjet printer is required for color 
   printing.

\bigskip
\hrule\bigskip
\bbc { 6.1.0  Image file types supported   }
\bigskip
\hrule\bigskip
\rm
     
   TN-Image reads and writes image files in TIF, JPEG, PCX, TGA, BMP, as 
   well as the IMA format produced by NPLOT (available at the ftp site)
   and the IMG format produced by frame-grabbers, 
   as well as GEM IMG and several others listed below. Any other generic 
   uncompressed file type can also be read, provided that:
\item{1.}
       you know the number of x and y pixels in the image
\item{2.}
       you know the no. of bits per pixel.
\item{3.}
       the image stores its pixels in the usual scanning order (left 
        to right, top to bottom).
\par\parindent 20 pt
   In addition, you can create new image file formats to read and write
   images in virtually any uncompressed format that uses fixed-size
   headers.

   The IMG format produced by TN-Image is the same as that produced by
   most frame grabbers: 4 bytes indicating the x and y size, followed 
   by the image data.  This is not the same as the GEM ``IMG'' format, 
   which is seldom used for image analysis. TN-Image can read GEM IMG 
   Raster files, however.

   For densitometry, it is recommended that images be stored in TIF 
   format because this format allows the image to provide a calibration 
   curve to accurately convert pixel intensity to optical density (O.D.). 
   This is important for quantitative applications. Most scanners provide 
   this information. If not, TN-Image will still function, but the results 
   will be in uncorrected pixel intensity values instead of O.D. (This 
   consideration does not apply for color images).

\bf
   ***NOTE*** Targa (TGA) files must have the extension .TGA to be readable.
\par\bigskip
   ***NOTE ON COMPRESSED TIF FILES***

\it
   As of Version 2.11, creation of compressed TIF image files is not 
   supported in TN-Image.  LZW- and PackBits-compressed TIF files are,
   however, readable.  The reason for this discrepancy is the choice 
   by Aldus Corporation of LZW compression, which is patented by Unisys, 
   for the compression algorithm.  The most recent TIFF documentation 
   indicates that LZW is now being phased out of TIFF. This means that 
   LZW-compressed TIF files will no longer be a valid image format.
\par\bigskip
\rm
   The following file subtypes/features in all valid permutations have 
   been tested to be readable by TN-Image:
 
   Tiff files:
      1 to 32 bit/pixel TIF-B,G,P, and R files
      (B=black/white, G=gray scale, P=indexed color, R=RGB full color)
            Tiles/Strips/CMYK
            Intel and Macintosh TIF

          PCX files:

            1,2,4,and 8 bit/pixel PCX

          IMG files:  
            1,2,4,and 8 bit/pixel IMG

         Other:  

            4 bit IMA  (from VGA or EGA mode NPLOT and NPDATA)
            Unformatted 1 to 32 bit/pixel raw binary images (color
              and monochrome)

          JPEG:

            Color JPG (JFIF)     (registered version only)

          Targa: 

            8, 16, and 24 bit/pixel TGA

         BMP:

            4,8, and 24 bit BMP (Windows 3.x subtype)

          GIF

          GEM IMG   

          Raw 3D  (Unix version only)
        
          XWD X-Window screendump (8,15,16,24, and 32 bits/pixel) (Unix version only)
          
\bigskip
    
   The following file subtypes can be created by TN-Image:

            1 to 32 bit PC TIF-B,G,P,and R, incl. CMYK extension(uncompressed)

            1 to 32 bit raw bytes

            1 to 32 bit custom files for PC, Mac, and MVS mainframe OS's

            1 and 8 bit PCX

            1 and 8 bit IMG

            24 bit JPG (JFIF subtype)  (registered version only)

            8,16, and 24 bit TGA

            8 and 24 bit BMP (Windows 3.x subtype)
           
            8,15,16,24, and 32 bit ASCII

            8,15,16,24, and 32 bit raw 3D (Unix version only)
            
\par\bigskip  
   The following file types may be also supported if enough requests are 
   received:
   
            Creation of 1 to 32 bit Mac TIF

            OS/2 BMP

            PNG
 


\par
\hfill\eject
\bigskip
\hrule\bigskip
\bbc { 6.2.0   Pixel values and image manipulation  }
\bigskip
\hrule\bigskip
\rm

\bf   Image types
\rm
\vskip 0.05 in

Images fall into 3 distinct categories:

\item{1.} Grayscale: Pixel values directly correspond to intensity.
   There may in addition be a table mapping each intensity to an
   optical density value. 
     
\item{2.} Indexed-color:  Pixel values have no intrinsic meaning and are 
   merely indexes into a color map containing 256 colors in a random
   sequence which is totally different for each image. 
   
\item{3.} Color: Pixel values are a composite number containing intensities 
   of red, green, and blue. The number of bits of each color is different
   for each standard image depth (\it i.e., \rm 15, 16, 24, 32, and 48 bits/pixel).
\vskip 0.05 in
 
   Each image type has benefits and drawbacks. For example, cutting
   and pasting among different indexed-color images requires finding
   the closest matching colors.  If the color maps are too different,
   the pasted image will not have the same color as the original. 
   This problem can be avoided by converting the images to true color
   first, then converting back to the original image type afterwards. 
   Similarly, densitometry and FFT only work well on grayscale
   images. Before performing FFT's, it is necessary to convert color 
   images to grayscale. For indexed-color images, the additional step
   of sorting the colormap is necessary to ensure that pixel values 
   bear a linear correspondence to intensity. Converting grayscale images
   to color involves optionally defining or selecting a colormap and converting 
   the image to indexed color, and then converting it to true color. All of these 
   operations can be done (and automated) in TN-Image.
      

   When you move the mouse in TN-Image, the information area
   shows the x and y coordinates and the value of the pixel at the 
   mouse position. This is convenient when manipulating the image, since 
   much image manipulation uses simple mathematical functions to transform
   the image. Thus, to make the image lighter, you could ``add'' a value
   of 50 to each pixel. To increase contrast, you can multiply each
   pixel value by a constant factor. In contrast to some programs on some
   other operating systems, these steps are not hidden from 
   the user merely for the sake of ease of use. This ensures that quantitative
   manipulations on the image remain directly traceable to the
   original data. 

\vfill
\eject
\bigskip
\hrule\bigskip
\bbc { 6.3.0  Description of Menu Bars (DOS Version)  }
\bigskip
\hrule\bigskip
\rm
        
       TN-Image displays a variety of information in the information area. 
       In the DOS version, this consists of two lines of text at the top
       of the screen. One
       or both of these lines can be hidden to create a less cluttered
       display. The menus are still active even when the menu bars are
       hidden.

       Top line:

\parindent 0.5 in
           File  Image..etc    - The main menus - use the mouse to select
                                 the desired option.

                              - Foreground color indicator

                               - Clicking on these small triangles will
                                 move the topmost image in the indicated
                                 direction. The distance is determined
                                 by the ``Cursor movement rate'' (see below).

           r255g255b255        - The red, green, and blue components of
                                 the current pixel, i.e., the pixel the
                                 mouse is pointing to. For 8 bit/pixel
                                 images, the red, green, and blue components
                                 of the colormap entry for that color are 
                                 shown.

           i=32767             - The intensity value of the current pixel,
                                 This is only displayed if TN-Image is in
                                 a mode with a wide enough screen width.
                                 This value will be different for images
                                 with different numbers of bits per pixel.

       Second line:

           0.12345             - The current pixel value, scaled from 0 to 1
                                 and corrected for bits/pixel of the point.

           123 456             - The next 2 numbers are the x and y 
                                 coordinates of the current pixel.

           Size 8              - The cursor movement rate. This is the 
                                 distance by which the mouse will move when 
                                an arrow key is pressed, and the distance 
                                 an image will move when you click one of 
                                 the small triangles. The cursor size can 
                                 be changed  by pressing the gray (+) or (-) 
                                 keys, or selecting ``Configure...
                                 Cursor movement rate''.

           8 bpp               - The bits per pixel of the current pixel,
                                 calculated for the topmost image.

           16 bits/pixel       - The rightmost item is the bits/pixel of
                                 the screen.                      

    \boxtext{ Vertical }    
                               - A click box is visible when the program
                                 is in a state such as ``vertical text'' mode
                                 or ``drawing'' mode. Clicking on this box
                                 returns to normal mode.
\parindent 20 pt

\vskip 0.5 in





\bigskip
\hrule\bigskip
\bbc { 6.3.1  Description of Menu Bars (Unix Version)  }
\bigskip
\hrule\bigskip
\rm

   In the Unix version, the menu bar automatically
   wraps to multiple lines if there is not enough space. The program 
   window can be resized so that only the main information window and the menu bar
   are visible. Images can then be loaded into separate, positionable windows.
   On occasion, it is necessary to quit and restart TN-Image after resizing the 
   window to obtain a multi-line menu bar.
   
   The Motif menus can be ``torn off'' and dragged to one side. Thus, it is
   possible, for example, to have one or more of the menus on the screen 
   permanently and  then shrink the main window to an inconspicuous size.

   Clicking on one of the four large arrows in the information area moves the
   current image in the direction of the arrow. The distance moved is determined
   by the ``step value'' which can be changed by the gray + and -- keys (KP\_add
   and KP\_subtract) or in the ``Config'' dialog.
   
   The main cancel button is always active and interrupts many repetitive 
   operations, such as flood fill, densitometry, circle-drawing mode, etc.              

   The main paste button copies all opaque pixels in the currently-selected 
   region onto whatever is beneath it.

\vfill\eject

\hrule\bigskip
\bbc { 6.4.0 Tutorial files }
\bigskip
\hrule\bigskip
\rm
 
   Five tutorial files are included with TN-Image:  
\item    1  DENSITOM.PCX - an image file demonstrating strip densitometry.
\item    2  DENSITO2.TIF - an image file demonstrating spot densitometry.
\item    3  DECONVOL.TIF - an image file demonstrating convolution and 
                     deconvolution using FFT (Part 1).
\item    4  DECONVO2.TIF - an image file demonstrating convolution and 
                     deconvolution using FFT (Part 2). (Included in
                     registered version).
\item    5  FILTER.TIF - an image file demonstrating digital filtering 
                     using FFT.
\vskip 0.05 in
\item{}  Also see Section 8.3.12.2, ``Macro Programming Guide'' in this manual.

\bigskip\hrule
\vfill\eject
\hrule\bigskip
\bigskip
\bbc { 7.0.0   Operation  }
\bigskip
\hrule\bigskip
\rm
   
   (DOS version) - 
   To start TN-Image, type TNIMAGE. If VESA BIOS is present, TN-Image
   will run using the functions defined in the VESA specification.
   Otherwise, TN-Image will try to use video card-specific functions.
   If no VESA BIOS is present and the card is unsupported, TN-Image
   will terminate. VESA 1.2 or above is required to run in 15-, 16-,
   24-, and 32-bit/pixel color modes, since in the earlier VESA 
   specification, modes 110 to 11b were text modes. 


\bigskip\hrule\bigskip
\bbb { 7.1.0   Command-line options  (DOS version) }
\bigskip
\hrule\bigskip
\rm

\tta   
      -n  
\rm    
                =  Skip introductory screen in 8-bit modes.

\tta
      -vesa 
\rm
                =  forces TN-Image to use VESA BIOS even for Trident or
                   Tseng Labs cards.

\tta
      -oldvesa
\rm
                =  forces TN-Image to use functions for version 1.0 VESA 
                   BIOS (slightly slower, but required on some cards).

\tta
      -trident
\rm 
                =  Forces TN-Image to use Trident-specific calls, even
                   if VESA BIOS is present. 

\tta
      -tseng
\rm
                =  Forces TN-Image to use Tseng-specific calls, even if
                   VESA BIOS is present.

\tta
      -diamond
\rm
                =  Forces TN-Image to use Tseng-specific calls, even if
                   VESA BIOS is present and sets the program to use
                   Diamond Speedstar mode. This option is experimental and
                   will be subsumed under the ``Tseng'' option after we obtain 
                   a Tseng-based Diamond card for testing. Feedback as to 
                   whether this option actually works will be appreciated.

\tta
      -w32    
\rm
                =  Forces TN-Image to use Tseng-specific calls, even if
                   VESA BIOS is present and sets the program to use
                   W32 chip mode. This option is experimental and
                   will be subsumed under the ``Tseng'' option after we obtain 
                   a card with the Tseng ET4000W32 chip for testing.
                   Feedback as to whether this option works will be 
                   appreciated.

\tta
      -S3, -ATI, -XGA    
\rm
                =  Force TN-Image to control these chips directly, even if
                   VESA BIOS is present.
          S3 and ATI are not currently implemented. XGA mode currently only works
          in 640 x 480 mode. 


\tta
      -diag , -diagnose   
\rm
                =  Diagnostic mode (Prints status messages at each stage
                   of setting your video mode). Useful if you have 
                   difficulty starting TN-Image on your computer. At each 
                   step, you need to press a key to continue.
\bf         Please report this information when requesting 
                   technical assistance.
\rm

\tta
      -fyu     
\rm
                =  This option is for debugging use only.
       
\tta
      -macro
\it  macro\_file
\rm
                =  Automatically runs the specified macro file. See ``Batch
                   mode processing''
\tta
      -files
\it  file\_list
\rm
                =  Specifies a list of image files to be automatically
                   loaded. Using a text editor, create an ordinary text 
                   file containing a list of the files to be read, with one 
                   filename on each line, for example:

\tta           t*.tif

                           c:$\backslash$ images$\backslash$ abc.bmp

                           hubble.img

\rm         Then start TN-Image with the command:

\tta         tnimage -files test.lst
\rm
                   substituting the name of your list for ``test.lst''. Do
                   not put a dash before the filename of the list file. 
                   Wildcard characters such as '*' or '?' are also 
                   permissible. Up to 512 images can be loaded from
                   the list file (if you have the Registered version).
                   If you only need to load a few files, it may be easier to
                   use the \it filename \rm option (below) instead.
                   
\tta
      filename
\it filename ...
\rm
                =  Reads the specified file(s). You can load as many files
                   as you can cram onto the command line.
                   If you have a large number of files, it may be easier
                   to use the ``-files'' option (above).
                   Do not precede the filename with a dash (``-''). Filenames
                   may contain path specifications and wild cards (*  or ?).

\it       Examples:    

\tta            tnimage my.gif   
\rm                                     = Loads my.gif
                                                        
\tta            tnimage *.tif    
\rm                                     = Loads all TIF files in 
                                                  current directory.
                                                  
\tta           tnimage c:$\backslash$images$\backslash$*.tif 
                                   b:$\backslash$abc.img
\rm
                                                = Loads all TIF files from
                                                  the C:$\backslash$images directory, 
                                                  then file abc.img from 
                                                  drive B.
                                                  
\tta          tnimage -mode 103 *.tif -files file.lst -vesa

\rm                Any combination of command
                   line options is also acceptable. See \it Screen modes
                   supported \rm (below) for a list of screen modes.


\tta
      -mode
\rm   xxx
                =  Start up in screen mode xxx, where xxx is a
                   hexadecimal number indicating the desired screen mode
                   (see below). 
                   Some monitors cannot handle the highest resolution modes
                   and will fail to `sync' or display a white screen.
                   If this happens, press Alt-X two or three times to escape 
                   from the program. You can determine which screen modes 
                   your computer can handle by checking in the manual that 
                   came with your video card and monitor. 
\bf         Read the warning below before using this option. 


\it        Example:
\tta    tnimage -mode 111

       -xres
\rm xxx 

                  = Start up in a VESA screen mode with x resolution of xxx, 
                   where xxx is the no. of horizontal pixels to display
                   per scan line. 8 bits/pixel is automatically selected
                   unless specified with the -bpp option.
                   Some monitors cannot handle the highest resolution modes
                   and will fail to `sync' or display a white screen.
                   If this happens, press Alt-X two or three times to escape 
                   from the program. You can determine which screen modes 
                   your computer can handle by checking in the manual that 
                   came with your video card and monitor.
\bf         Read the warning below before using this option. 

\tta
       -bpp 
\rm xxx
                =  Start up in a VESA screen mode of xxx bits/pixel. (Used
                   in conjunction with the -xres option).

\tta ?
\it    or 
\tta -? 
\rm
               =  List the available screen modes.
       
     
       The options can be in any order, except that if a parameter
       is needed, it must follow the option.
       The arguments must be separated by spaces.

 
\it
       Examples: 
\rm
       To run TN-Image in VESA 1024x768 mode, type:

\tta    tnimage -vesa -mode 105 
\it  Enter \rm   or

\tta    tnimage -mode 105 
\rm 
                                        (The word ``Vesa'' is only
                                         required if you happen
                                         to have a Tseng or 
                                         Trident chip and you 
                                         want to bypass direct
                                         chip addressing).   

       If you have an old card, specifying ``-vesa'' will cause display
       problems. If problems occur, use:

\tta
                    tnimage -oldvesa 
\rm                 or   

\tta    tnimage -oldvesa -mode 105 
\rm  to select 1024x768 mode.

       To run TN-Image on a computer equipped with a 
       Trident card, in 640 x 480 mode, type:

\tta        
                    tnimage -mode 5d

\rm                 or

\tta    tnimage -trident -mode 5d   
\rm
       To run TN-Image on a computer equipped with a card
       containing a Tseng Labs ET4000 chip, in 800 x 600 mode, type:

\tta        
                    tnimage -mode 30
\rm                 or
\tta    tnimage -tseng -mode 30   

\rm                    
       To run TN-Image and automatically load and display
       the image ``test.img'', type

\tta        
                    tnimage test.img
\rm                 or
\tta    tnimage -file test.img

\rm 
       To run TN-Image in a 1600 x 1200 resolution at 8 bits/pixel, type:

\tta            
                    tnimage -xres 1600   
\rm                 or    
\tta    tnimage -xres 1600 -bpp 8
\rm                   

       To run TN-Image in a 1600 x 1200 resolution at 24 bits/pixel (true
       color), type:

\tta            
                    tnimage -xres 1600 -bpp 24

\rm                                 
       The command line options are stored in the file TN-Image.INI,
       so the next time you start TN-Image, it is not necessary to 
       specify the screen mode.                          

\vfill\eject 


\bigskip\hrule\bigskip
\bbb { 7.1.1  Unix Command-line options }
\bigskip
\hrule\bigskip
\rm
\par

\medskip
\tta       
      -macro 
\it macro\_file
\rm     =  Automatically runs the specified macro file. See
\it       Batch mode processing

\medskip
\tta
      -files
\it file\_list
\rm
                =  Specifies a list of image files to be automatically
                   loaded. Using a text editor, create an ordinary text 
                   file containing a list of the files to be read, with one 
                   filename on each line, for example:
\tta    
                           t*.tif
                           ~/images/abc.bmp
                           hubble.img
\rm
                   Then start TN-Image with the command:
\tta
                           tnimage -files test.lst
\rm
                   substituting the name of your list for ``test.lst''. Do
                   not put a dash before the filename of the list file. 
                   Wildcard characters such as '*' or '?' are also 
                   permissible. Up to 512 images can be loaded from
                   the list file.
                   If you only need to load a few files, it may be easier to
                   use the \it filename \rm option (below) instead.
                   
\medskip
\it    filename filename ...
\rm
                =  Reads the specified file(s). 
                   If you have a large number of files, it may be easier
                   to use the ``-files'' option (above).
                   Do not precede the filename with a dash (``-''). Filenames
                   may contain path specifications and wild cards (*  or ?).

                   Examples:    
\tta
                            tnimage my.gif
\rm                                      = Loads my.gif

\tta                                                        
                            tnimage *.tif  
\rm                                      = Loads all TIF files in 
                                                   current directory.

\tta                                                  
                            tnimage ~/images/*.tif /mnt/abc.img

\rm
                                                = Loads all TIF files from
                                                  the /images directory, 
                                                  then file abc.img from 
                                                  /mnt.
                                                  
                                                  Any combination of command
                                                  line options is also acceptable.

\tta                   
\medskip
       ? , -?   
\rm               =  List the available options.
       
\medskip
\tta   
       -fg 
\rm or
\tta -foreground
\rm              = Specify foreground color
       
\medskip
\tta     -bg
\rm or
\tta -background 
\rm = Specify background color

\it
            Example: 
\tta tnimage -fg white -bg MistyRose3 \& 

\medskip
\tta                  
       -geometry
\it geometry-string
        
            Example:
\tta  tnimage -geometry 400x500+100+100

\medskip            
       -display \it screen-IP-address:screen

\rm       
            Example: \tta tnimage -display 192.168.1.1:0.0 \&
            
\rm              
       See ' man X ' for more details.
       The options can be in any order, except that if a parameter
       is needed, it must follow the option.
       The arguments must be separated by spaces.
                    
       To run TN-Image and automatically load and display
       the image ``test.img'', type

\tta        
                    tnimage test.img

\rm

       To run TN-image remotely on a supercomputer and have the display appear on
       your local PC, type the command:
       
\tta             xhost +\it supercomputer\_host\_name \rm

       Then login to the other computer, and type:

\tta             tnimage -display \it your\_PC\_hostname\tta:0.0 \&
\rm where \it your\_PC\_hostname \rm can be a registered host.domain name
      or an IP number. For example, if you are connected over a ppp link,
      and \tta ifconfig \rm indicates your IP address to be 156.40.65.151,
      type:

\tta      tnimage -display 156.40.65.151:0.0 \& \rm .

\rm    This can also be done from DOS or Windows using X-Window server software
       such as Xappeal, Exceed, Chameleon NFS/X, etc.

       Alternatively, this can be done by setting an environment variable, \it 
       e.g., \rm
       
\tt        setenv DISPLAY 156.40.65.151:0.0  \rm

       (in tcsh or csh) or
       
\tt        export DISPLAY=156.40.65.151:0.0 \rm

       (in bash, ksh, etc.)   
       instead of using the ``-display'' option.
       
              

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 7.1.2  X Window Resources }
\bigskip
\hrule\bigskip
\rm
\par

\it (Unix version only). \rm
Each of the Motif widgets in TN-Image has resources that can be
individually set, by specifying the widget's name in your .Xdefaults
or Tnimage file (in /var/X11R6/lib/app-defaults/). These files also interact 
with the X Window keymapping which can be changed with \tt xmodmap\rm. 

As an example, suppose for some bizarre reason it was desired to make
the 'Del' key actually delete a character. One way of doing this is as follows:

1. Create a keymap file: \tt  xmodmap -pke > keymaps \rm

2. Edit the line for keycode 91 to read: \tt keycode 91 = 0x004 \rm. (The
   keycode can be obtained using \tt xev \rm).

3. Load the new key translation table:  \tt xmodmap keymaps \rm. Pressing
   the Del key now creates an 0x004. (You could also use 'Delete' or some
   valid key name - these are listed in the file /usr/X11/include/X11/keysym.h).
  
4. Edit .Xdefaults in your home directory and add the line: \tt
 
   tnimage*Editor*Translations: \#override \bs n \bs
   
    \hskip 1 in    $<$Key$>$ 0x4:   delete-next-character() \bs n
        

   \rm (Note this must be entered exactly; in particular, the number must
   be 0x004 in the \tt keymap \rm file but 0x4 in the \tt .Xdefaults \rm
   file. 
   
5. The change will now take effect in the Macro Editor only. On some systems, 
   it may be necessary to restart the window manager for the new key to take 
   effect. Leaving out the ``*Editor'' portion will cause the change to take
   effect in all Widgets.

\vskip 0.2 in   

  Some of the important widgets in TN-Image are:
   
\tt   Editor \rm  -  macro editor (Text)
   
\tt   MenuBar \rm -  the top menu bar (MenuBar)

\tt   f1 to f70 \rm - the menu items (PushButton)

\tt   drawing\_{}area \rm - the main drawing window (DrawingArea)

\tt   drawing\_{}area2 \rm - the status area at left (DrawingArea)

\tt   Image \rm- all the images (DrawingArea)

\tt   List \rm -  list selection boxes (ScrolledList)

\vskip 0.2 in   
   
   Each of these has an extensive set of resources (such as fonts, colors,
   etc) that can be modified. For instance, Text Widgets have 
   delete-next-word(), cut-clipboard(), page-left(). Refer to the
   X Window system manuals for details.

\vskip 0.2 in   
    
   Here are additional examples. More specific settings will override more general
   ones.
   
   \tt tnimage*drawing\_area2*background:green \rm
   -Sets the left drawing area to ``green''.


   \tt tnimage*drawing\_area2*background:\#2233AA \rm
   -Sets the left drawing area to red=22,  green = 33, and blue=AA hex 
   (34, 51, and 170 decimal, respectively).

   \tt tnimage*drawing\_area*background:\#223344 \rm

   \tt tnimage*MenuBar*background:\#223344 \rm

   To set the main drawing window color, select ``colors...set colors'',
   then select ``erase background''. 


   \tt tnimage*marginHeight: 0  \rm Sets the height of the margin in all widgets \par
   \tt tnimage*marginWidth: 0  \rm Sets the height of the margin in all widgets \par
   \tt tnimage*foreground: black   \rm Sets the widget text color \par
   \tt tnimage*background: gray  \rm Sets the background color (Foreground and
       background colors of the main drawing area are set separately, from within
       TN-Image). \par
   \tt tnimage*shadowThickness: 1  \rm Sets the depth of shadows on all buttons \par
   \tt tnimage*MenuBar*spacing: 3  \rm Sets the separation between items on menus\par
   \tt tnimage*MenuBar*background: gray  \rm Sets the color of menu bar\par
   \tt tnimage*MenuBar*fontList: *helvetica-bold-r-normal--12*  \rm Sets the font
       for the top menu bar \par
   \tt tnimage*fontName: *times-bold-r-normal--12*  \rm Sets the default font\par
   \tt tnimage*information\_area.foreground:black  \rm Sets the text color 
       of the information area at the left \par
   \tt tnimage*information\_area.background:gray  \rm Sets the background color 
       of the information area at the left \par
   \tt tnimage*list*fontList:*times-bold-r-normal--12* \rm Sets the font in list
        boxes to times bold (Not recommended, a fixed width font should be used).


\vskip 0.1 in
   These resources control the appearance of the file selection dialog:
\vskip 0.1 in   

   \tt tnimage*FileSelector*background: gray  \par
   \tt tnimage*FileSelector*foreground: black  \par
   \tt tnimage*FileSelector*fontList:*helvetica-bold-r-normal--12* \par
   \tt tnimage*FileSelector*marginWidth: 5  \par
   \tt tnimage*FileSelector*marginHeight: 5  \par
   \tt tnimage*FileSelector*listVisibleItemCount: 30  \rm Sets the number of
       files to show at a time \par
   \tt tnimage*FileSelector*borderWidth 0  \par

\vskip 0.1 in
   \rm  Other miscellaneous examples:
\vskip 0.1 in   

   \tt tnimage*Editor*foreground: black  \rm Color of text in text editor \par
   \tt tnimage*Editor*background: gray  \rm  Color of text editor \par
   \tt tnimage*Editor*fontList:*helvetica-bold-r-normal--12* \rm Font for text in
        editor \par
   \tt tnimage*Warning*background: red  \rm  Set warning messages to red \par

   \tt tnimage*Ok*back\-ground: red \rm\par
   \tt tnimage*Cancel*back\-ground: white \rm\par
   \tt tnimage*Help*background: blue \rm Set the Ok, Cancel, Help buttons to 
         red, white, and blue\par
   \tt tnimage*f1*background: red \rm set the 1st item in the first menu to red.\par
   \tt tnimage*borderWidth: 2000000000 \rm Add a border 2 billion pixels wide around 
        each image (Not recommended). \par
   \tt tnimage*borderColor: papaya whip \rm Change image border to papaya whip. 

\vskip 0.2 in   
 
   The labels and fonts for the dialog boxes may also be individually set.
   In this case, the resource name is the default string for the label.
   This also permits non-English labels to be substituted. For example:
\vskip 0.1 in   

   \tt tnimage*DialogForm*fontList: *helvetica-bold-r-normal--12*\rm\par
   \tt tnimage*DialogForm*radiobox*fontList: fixed\rm\par
   \tt tnimage*DialogForm*boxbutton*fontList: fixed\rm\par
   \tt tnimage*DialogForm*boxtext*fontList: fixed\rm\par
   \tt tnimage*DialogForm*boxpushbutton*fontList: fixed\rm\par
   \tt tnimage*DialogForm*boxfilename*fontList: fixed\rm\par

   \tt tnimage*fontList: hanzigb16st  \rm This sets all fonts to Chinese.
        For fonts encoded by multibyte strings (such as Chinese 
        fonts), the label string and your locale must also be changed.\par

   \tt tnimage*Interaction mode.labelString: Information at your fingertips!!! \rm\par
   \tt tnimage*DialogForm*File type.labelString:  This is a feature! \rm\par
   \tt tnimage*DialogForm*Read Image.labelString: Where do you want to go today?

    \rm   These three resources change the text in the menu from ``Interaction mode'',
       `` File type'', or ``Read image'' to the corresponding commonly-used 
        computer terms. The latter two text labels are changed only if they
        occur in a DialogForm Widget.
       
   \tt tnimage*DialogForm*Filename.labelString: ���� \rm\par
        \rm\par (An example of a foreign-language font; may not display 
        correctly on all systems)

\vskip 0.1 in   

   Capitalization and spacing of the original label must be specified exactly.
   More specific settings override less specific ones. For example, the 
   combination
\vskip 0.1 in   
   
   \tt tnimage*Ok*fontList: *helvetica-bold-r-normal--12* \rm \par
   \tt tnimage*DialogForm*Ok*fontList: *helvetica-bold-r-normal--24*  \rm \par
   
   will set a size of 24 for the Ok button in dialog boxes and 12 elsewhere.

\vskip 0.1 in   
 
\vskip 0.2 in   
 
   If the specific resource name is unknown, it may still be set by specifying
   the general Motif class name beginning with Xm. This is true for any Motif
   program. For example:

\vskip 0.1 in   

   \tt tnimage*XmMessageBox*marginHeight: 5 \par \rm Sets the vertical margin around warning
        and information boxes \par
   \tt tnimage*XmMessageBox*marginWidth: 5 \par \rm Sets the horizontal margin around 
        warning and information boxes\par
   \tt tnimage*XmMessageBox*foreground: black \par \rm Sets the text color in warning
        and information boxes\par
   \tt tnimage*XmMessageBox*background: gray \par \rm Sets the color of warning
        and information boxes\par
   \tt tnimage*XmMessageBox*fontList: *helvetica-bold-r-normal--12*  \par\rm Sets the 
        font to use in warning  and information boxes\par
   \tt tnimage*XmDialogShell*background: gray  \rm Sets the color of dialog boxes,
       clickboxes, etc. \par
   \tt tnimage*XmDialogShell*foreground: black  \rm Sets the the text color of 
       dialog boxes, clickboxes, etc.\par
   \tt tnimage*XmArrowButton.background: gray  \rm Sets the color of the four
       arrow buttons in the information area.\par

\vskip 0.2 in   

 


   A number of other generic resources may also be set by specifying the 
   Motif widget class (such as XmPushButton, XmList, etc.). In general, any resources
   (of which there are many) not explicitly hard-coded in the program can be set 
   two different ways: by specifying the Xm class (such as ``XmFileSelectionBox''), 
   or by specifying the name used in the program (such as``FileSelector''). 
   The latter method permits specifying properties for each widget instead of
   all instantiations of the widget type. So in this spirit, below are listed 
   the names of most of the main widgets used in the program.
   
\it Message boxes: \rm  Information Prompt Error Question YesNoQuestion Warning

\it Top menu bar: \rm   MenuBar

\it Arrow buttons at left: \rm  Button
   
\it Ok buttons at bottom of dialog boxes: \rm  Slew Ok Help Load Save Cancel No
   
\it Components of dialog boxes: \rm  radiobox label DialogForm
   
\it The main windows:  \rm  Main  drawing\_area\_form drawing\_area2  frame
     informa\-tion\_\-area  dra\-w\-ing\_\-area 

\it Images: \rm   Image 

\it List boxes: \rm  List list drag\_area GraphForm graph

\it Click box components: \rm  FileSelector  Chdir  Editor 
     ClickboxForm MultiClickboxForm PrintItemForm EditForm
     Menu3DForm SamplePaletteColorForm SamplePalettePseudoForm
   
\it Menu items: \rm f1 to f70.
   
\it Menus: \rm fileMenu imageMenu processMenu colorMenu drawMenu aboutMenu
   configMenu helpMenu.

\it 3D controls: \rm Menu3DForm 



\vskip 0.1 in   
   More examples:
\vskip 0.1 in   

   \tt tnimage*fileMenu.background: LavenderBlush1  \rm Sets the color of the file
       menu to ``Lavender Blush 1'' (See the file /etc/X11/rgb.txt for a list of
       valid color names, or use a 6-digit hex number such as ``\#aa7733'').\par

   \tt tnimage*fileMenu*background: bisque  \rm Sets the color of the file
       menu, including the menu items, to ``bisque''.\par


   \tt tnimage*DialogForm.fontList:*helvetica-bold-r-normal--12*\par
   \tt tnimage*DialogForm*XmToggleButton*fontList:fixed\par
   \tt tnimage*DialogForm*XmPushButton*fontList:*times-bold-r-normal--12*\par \rm

\vskip 0.1 in   
   These 3 lines set the toggle buttons to ``fixed'' font, the push buttons to a
   times font, and everything else (i.e., the labels) to helvetica.
   Use `xlsfonts' to find what fonts are available on your system.


\tt tnimage*List.XmLabel.fontList: *helvetica-bold-r-normal--12*
\rm   sets the labels in all lists to helvetica font, while

\tt   tnimage*List*fontList: *helvetica-bold-r-normal--12*
\rm    sets all text in all lists to helvetica font.  
\vskip 0.1 in   
 
\bf Notes \rm

\item {1.} 
   Be conservative about setting all these widgets to different colors. Each color
   used by a widget is one less color available for rendering images. In
   particular, the top menubar and individual menu items should be set to the
   same color, otherwise if TN-Image starts up in ``modifiable colormaps'' mode,
   the menus may become unreadable.  Modifiable colormaps mode is set automatically
   if there are fewer than 32 color entries available.
    
\item {2.} 
   Be careful not to put spaces after the setting in your .Xdefaults file or
   after font names in your tnimage.ini file. This will confuse Motif.

\item {3.} 
   Some resources, such as ``transient'', although legal, produce instability
   in Motif, and must not be put in .Xdefaults.
   
   
\vfill\eject   

\bigskip\hrule\bigskip
\bbb { 7.1.3 Non-Motif Resources \rm }
\bigskip
\hrule\bigskip
\rm

   In addition to the Motif resources, a variety of XLib and program resources 
   are stored in the file \tt tnimage.ini \rm. Most of these are set from within 
   the program, but can also be edited. However, using inappropriate values will 
   create undesirable behavior.  For example: 

\vskip 0.2 in   
   
\tt     default\_font *times-bold-r-normal--12*  \rm = Sets the font in the left
     information window to ``times bold 12 pt''.  Setting this too large will
     render the information unreadable. If problems occur, the file may be
     deleted to restore the defaults. \par
    
\vskip 0.1 in   
     Some of the more useful settings are:
\vskip 0.1 in   
     
\tt     want\_colormaps 0 \rm = If set to 1, TN-Image will set a colormap instead of
     allocating colors.  The first \it save\_colors \rm  colors in the colormap
     are never altered when the colormap is changed. If the value for 
     ``save\_colors'' is too low, colormap
     flashing will occur when the mouse moves from one window to another.
     If it is set to 1 or 0, the menus may also become unreadable.
\vskip 0.1 in   
     
\tt
     foreground\_color \par
     foreground\_red \par
     foreground\_green \par
     foreground\_blue  \par
\rm
     
     These values specify the color index and RGB colormap values of the foreground
     color in the main drawing area.

\vskip 0.1 in   

\tt     information\_width 120  \rm = width of the information area at the left. If 
     set to 0, the information area is not displayed. This setting cannot be changed
     from within the program. 
     
\vskip 0.1 in   
\tt   default\_font fixed  \rm = Sets the font in left information window to system
        default font (may be faster than the default Helvetica font).

\vskip 0.1 in   
\tt   window\_handle\_size \rm = Sets the size of active area around the edge of
        each image. Clicking on this area causes the image to be grabbed and 
        moved.

\vskip 0.1 in   
\tt   spacing \rm = Sets the spacing between dots in the line used to indicate
        an area selection. Setting this to a higher value may improve performance
        on slower computers, but also makes the selection harder to see.


\bigskip\hrule\bigskip
\bbb { 7.1.4 User-Defined Custom Buttons \it (Unix version only) \rm }
\bigskip
\hrule\bigskip
\rm
\par
   
    The buttons at the left of the screen, above the information area, are completely
    user-con\-fig\-ur\-able. There are 4 required buttons (Cancel, Step, Prop and Quit).
    The other buttons can be removed or any additional number of other buttons can be 
    added. To add a new button, edit the configuration file \tt tnimage.ini \rm
    in \tt tnimage\rm's start-up directory. Change the entry ``nbuttons'' to the total
    number of buttons. Then add a separate line
    for each button containing the word ``button'', the button label (which can be 
    anything up to 6 characters, with no spaces or control characters), and the command. 
    The command can be any valid macro command (Sec. 8.3.12), including parameters.

    \bf Examples: \rm \par
    \tt button Tran. transparency \rm\par
    adds a button labeled ``Tran.'' which will set the transparency 
    level for the current image.

    \tt button Math math \rm\par
    adds a button labeled ``Math'' which will activate the Image algebra dialog box.

    \tt button FFT fft \rm\par
    adds a button labeled ``FFT'' which will activate the Fourier transform dialog box.

    \tt button Junk load my\_junk.tif 100 100 0.75 0.666 \rm\par
    adds a button labeled ``Junk'' which will read the image file ``my\_junk.tif''
    at coordinates 100,100 and shrink it to 75\% of its normal width and 66\% of its
    normal height.

    \tt button Gray color->grayscale \rm\par
    adds a button labeled ``Gray'' which will convert the current immage to 
    grayscale.

    \tt button Other macro my-macro \rm\par
    adds a button labeled ``Other'' which automatically loads and runs the macro
    from the file ``my-macro''.


\vfill\eject   

\bigskip\hrule\bigskip
\bbb { 7.1.5  Image windows }
\bigskip
\hrule\bigskip
\rm
\par

\it (Unix version only). \rm

   Images loaded into the X Window version of TN-Image can be placed in
   separate windows instead of the large main window by checking the
   ``Separate window'' box in the ``Load image'' dialog. With a few minor
   exceptions, images in separate windows have the same functionality
   (cut/paste, image math, densitometry, etc) as images on the main window.
   Cut/paste functions identically regardless of whether the source and
   destination are on the main window or on separate windows.
   Additionally, if the Window Manager permits, image windows can be created 
   with or without a frame,  depending on the settings in the ``Config'' dialog.
   
\vskip 0.1 in
   The advantages of separate windows are:
\vskip 0.1 in
\item {1.} Entire image is visible without scrolling
\item {2.} Image can be iconized when not needed
\item {3.} Scroll bars can be added (using the menu in the upper left corner.
   This feature is only available in window managers that support it, such as
   fvwm.)
\item {4.} Images can be positioned anywhere on the screen

\vskip 0.1 in
   Disadvantages are:
\vskip 0.1 in
\item {1.} Images cannot be superimposed, added, or subtracted without using
         ``image math'' function.
\item {2.} Transparency and chroma-key do not work.
\item {3.} Composite images cannot be created.
     
\vfill\eject







\bigskip\hrule\bigskip
\bbc { 7.2.0  Video cards supported (DOS version) }
\bigskip
\hrule\bigskip
\rm
\par



      Currently three SVGA chips are directly supported:

        a) Trident 8800, 8900, or more recent chips. Trident cards seem 
           to be popular in many local computer stores.

        b) Tseng Labs ET4000  or more recent chips. Note: the older Tseng 
           ET3000 chip is not supported. The ET4000 chip is in many cards 
           made by a variety of manufacturers.
       
        c) IBM XGA and XGA-2.
   
      If these chips are not detected, TN-Image will use VESA
      super VGA functions.

      Other cards will also work if they are VESA-compatible. To use a
      VESA-compatible card, you may need to first install a VESA  BIOS
      extension,  which is usually a small program that came with your
      video card, and may be named  ``VVESA.COM''  (for  Mach32  cards),
      ``VESART.COM''   (for   Realtek  cards),  or  something   similar.
      Installing this VESA BIOS means you have to run the VESA program
      before running TNEDIT. This is conveniently done by  putting  it
      in  your  AUTOEXEC.BAT file. Newer cards often have VESA already
      installed in the card in ROM so no action needs to be taken.
   
      Certain early video cards interact with the mouse cursor, making
      smooth movement of the mouse difficult. Some older mouse drivers
      also cannot handle SVGA modes smoothly. It should be possible to
      position  the  mouse  at  each  point  on  the  screen.  If  you
      experience  difficulty  reaching  odd-numbered  pixels,  try  to
      obtain  a  newer  mouse  driver. If this doesn't help, it may be
      necessary to upgrade to a better  SVGA  card.  This  problem  is
      known to occur with some RTG3106-based Realtek cards.
         
      If you have one of the above video cards and TN-Image still
      doesn't work on your computer, please let us know. We will try
      to fix it for you.

\bf
      ATI video card users:      
\rm 
      Computers with Mach 32 ATI cards may have problems running TN-Image 
      in true-color modes from within a DOS box. The only known solution 
      is to run TN-Image from DOS, or use TN-Image in an 8 bit/pixel 
      mode (e.g., mode 103). (See ``Command-line options'' above).

      If your ATI video card won't go into desired screen mode, even though 
      the manual states that mode is supported, run ATI's ``Install'' program 
      again to verify the specified video mode is activated. If this doesn't
      work, it is possible that the computer was turned on before turning on 
      the power to the monitor. ATI cards only examine the monitor type at 
      power-up, and could become confused if the monitor is off during a cold 
      boot-up, and refuse to set high-resolution modes. 

      The display in TN-Image is corrupted when using ATI Mach 64 cards 
      if the UNIVBE TSR is present.  

\vfill\eject

\bigskip\hrule\bigskip
\bbc { 7.3.0  Screen modes supported  (DOS version) }
\bigskip
\hrule\bigskip
\bba

\rm




       The mode value `xxx' on the command line can be one of the following:

\settabs 6 \columns
\smallskip\hrule\smallskip
\+      Video card/chip   &Mode    &Resolution   &Colors           &Video RAM &Bits per\cr
\+                        &        &             &                 &Needed    &Pixel \cr
\smallskip\hrule\smallskip
\+       Tseng ET4000/      & 2E     & 640 x 480   &       256     &1/2 meg   & 8    \cr
\+         W32              & 30     & 800 x 600   &       256     &1/2 meg   & 8    \cr
\+                          & 38     &1024 x 768   &       256     &1 meg     & 8    \cr
\+                          &2E1$^2$ & 640 x 480   &    32,768     &1 meg     &15    \cr
\+                          &301$^2$ & 800 x 600   &    32,768     &1 meg     &15    \cr
\+                          &381$^2$ &1024 x 768   &    32,768     &2 meg     &15    \cr 
\+                          &2E2$^2$ & 640 x 480   &    65,536     &1 meg     &16    \cr
\+                          &302$^2$ & 800 x 600   &    65,536     &1 meg     &16    \cr
\+                          &382$^2$ &1024 x 768   &    65,536     &2 meg     &16    \cr
\+                          &2E3$^2$ & 640 x 480   &16,777,216     &1 meg     &24    \cr
\+                          &303$^2$ & 800 x 600   &16,777,216     &2 meg     &24    \cr
\+                          &383$^2$ &1024 x 768   &16,777,216     &3 meg     &24    \cr
\+                                                                                   \cr
\+       Trident 8800/      &5D      & 640 x 480   &       256     &1/2 meg   & 8    \cr
\+               8900       &5E      & 800 x 600   &       256     &1/2 meg   & 8    \cr
\+                          &62      &1024 x 768   &       256     &1 meg     & 8    \cr
\+                                                                                   \cr
\+       IBM XGA/           &2       &1024 x 768   &       256     &1 meg     & 8    \cr
\+           XGA2           &4       & 640 x 480   &       256     &1/2 meg   & 8    \cr
\+                          &5       & 640 x 480   &    65,536     &1 meg     &16    \cr
\+                          &7       & 800 x 600   &       256     &1 meg     & 8    \cr
\+                          &8       & 800 x 600   &    65,536     &1 meg     &16    \cr
\+                                                                                   \cr
\+       VESA              &100      & 640 x 400   &       256$^3$&256 k      & 8    \cr
\+                         &101      & 640 x 480   &       256     &1/2 meg   & 8    \cr
\+                         &103      & 800 x 600   &       256     &1/2 meg   & 8    \cr
\+                         &105      &1024 x 768   &       256     &1 meg     & 8    \cr
\+                         &107      &1280 x 1024  &       256     &2 meg     & 8    \cr
\+                         &110      & 640 x 480   &    32,768$^5$ &1 meg     &15    \cr
\+                         &111      & 640 x 480   &    65,536     &1 meg     &16    \cr
\+                         &112      & 640 x 480   &16,777,216$^1$ &1 meg     &24-32 \cr
\+                         &113      & 800 x 600   &    32,768$^5$ &1 meg     &15    \cr
\+                         &114      & 800 x 600   &    65,536     &1 meg     &16    \cr
\+                         &115      & 800 x 600   &16,777,216$^1$ &2 meg     &24-32 \cr
\+                         &116      &1024 x 768   &    32,768$^5$ &2 meg     &15    \cr
\+                         &117      &1024 x 768   &    65,536     &2 meg     &16    \cr
\+                         &118      &1024 x 768   &16,777,216$^1$ &3 meg     &24-32 \cr
\+                         &119      &1280 x 1024  &    32,768$^5$ &3 meg     &15    \cr
\+                         &11a      &1280 x 1024  &    65,536     &3 meg     &16    \cr
\+                         &11b      &1280 x 1024  &16,777,216$^1$ &4 meg     &24-32 \cr
\+                         &120$^4$  &1600 x 1200  &       256     &2 meg     & 8    \cr
\+                         &$^4$     &1600 x 1200  &    65,536     &4 meg     &16    \cr
\+                         &$^4$     &1600 x 1200  &16,777,216$^1$ &6 meg     &24-32 \cr
\smallskip
\hrule\bigskip
    $^1$ Most cards use mode 115, 118, and 11b as 32-bit/pixel 
         modes for speed purposes, but the maximum no.of colors 
         is still only 16,777,216. 

    $^2$ Experimental - awaiting testing with W32 card.
         Any feedback as to whether these modes work is 
         appreciated.

    $^3$ \#9GXE64 card does not support this mode.

    $^4$ Numbering for screen modes above 11b may vary from card to card.
         All VESA modes with 8 or more bits/pixel are available using the
         -xres and -bpp options (Sec.7.1.0).
       
    $^5$ Some video cards, such as the \#9GXE, do not support any 15-bit
         screen modes.
\medskip

       If after trying the above options, you still cannot get TN-Image
       to run on your machine, you can try utilities such as UNIVBE, 
       which can permit your Super VGA card to use VESA modes.

       If your monitor makes a buzzing or squeaking sound and/or fails to 
       synchronize (evidenced by jagged diagonal lines or other unusual 
       effects), turn the monitor off immediately and press Alt-X several 
       times to stop the program. This could occur if your video card reports
       that it is safe to set a given screen mode when in fact it is not 
       safe. Although it should be the responsibility of the video card to
       determine whether it is safe to set a given screen mode, this
       feature is absent from many cards. All SVGA monitors, however, 
       should be capable of running safely at the default screen mode 
       (800x600 pixels).

                                 
\par\bigskip
\bba     
\hrule\bigskip
        WARNING!
\medskip

\bba     
       CHECK YOUR MONITOR MANUAL *BEFORE* 
       ATTEMPTING TO RUN TN-IMAGE IN A SCREEN MODE
       OTHER THAN THE DEFAULT MODE! THE AUTHOR
       IS NOT RESPONSIBLE FOR ANY MONITOR DAMAGE
       CAUSED BY ATTEMPTING TO SET YOUR MONITOR
       TO A MODE WHICH IT IS UNABLE TO HANDLE. MOST
       VIDEO CARDS WILL REFUSE TO SET AN UNSAFE
       MODE, BUT SOME WILL!
         

\bigskip\hrule
\vfill\eject
\bigskip\hrule\bigskip
\bbc { 7.4.0   Basic operations }
\bigskip
\hrule\bigskip
\rm

 
   Most operations, such as filtering, saving images to disk, etc. use
   a ``selected region'' which has to be selected before you perform the
   operation.  To select a region, move the mouse to one corner of the
   desired area, click and drag to the other corner, then release  the
   mouse  button.  A rectangle shows the selected region while you are
   dragging. This selected region stays in effect until you  (1)  quit
   the  program, (2) select another region, (3) pick ``unselect region''
   from the menu, or (4) double-click on an image to select an  entire
   image.  If  no  region has been selected, or it was unselected, the
   region defaults to the entire screen. If you  make  changes  to  or
   select  a  region  that  is  partly  on  an image and partly on the
   background, the portion of your changes that  falls  on  the  image
   will  remain  with  the  image,  and  the  rest  will  stick to the
   background. 
   
   The  background is maintained independently of the images. Thus, if
   an image is  moved  over  the  background  or  another  image,  the
   background  is  not  disturbed. When many images are simultaneously
   present, it is often convenient to keep most of them out of the way
   by stacking them up or moving them out of the  visible  region, off
   the edge of the screen. If an image gets lost off the edge, you can
   find its coordinates by selecting ``About the program'' or ``About the
   image''.
          
   You can select an entire image by double-clicking on that image. To
   change to a different image, single-click on  the  other  image  to
   bring  it  to  the  foreground  or double-click on it to select it.
   Selecting an image means that, all subsequent  operations  will  be
   performed on the entirety of that image. 
    
   You can move an image around by clicking on the small arrows on the
   top  menu  bar.  The  distance by which a single click on the arrow
   moves the image is adjustable by pressing the gray ``+'' or ``-'' keys,
   or by selecting ``Cursor movement rate'' from the ``Configuration'' menu.
      
   When the mouse cursor passes over an edge of an image,  it  changes
   from a diagonal arrow to double arrows. If you click the left mouse
   button  at  this  point, the image will be ``grabbed''. Keep pressing
   the mouse button, move to a new location,  and  then  release.  The
   image is then moved to the new location. The same is true for 
   message boxes, graphs, dialog boxes, the colormap window,  and 
   information windows.
   
\bigskip\hrule\bigskip
\bbc { 7.5.0   Operating under low-memory conditions }
\bigskip
\hrule\bigskip
\rm

  If you have 4 MB or less of RAM, or use large images or a lot of
   images simultaneously, or work in a Windows DOS box, eventually you 
   may run out of memory. 

   There are several things you can do to increase available memory:
   
   (1)  In  the  ``Config''  menu,  turn off the ``Automatic undo'' option
   before loading any images. This will double  the  amount  of  space
   available for images, but TN-Image will not create an ``undo'' buffer
   for each image. This means you will not be able to  erase  anything
   from  the image (such as text or graphic elements) without creating
   blank areas on the image. You can still back up and restore  images
   manually, however.  

   (2) Start TN-Image in a  lower  screen  mode.  In  lower resolution
   modes,  less  memory is needed to manipulate images and background.
   (See under ``Command-line options''). Try using 8-bit/pixel modes 
   instead of true color modes. TN-Image reserves a fixed amount of 
   memory for drawing dialog boxes and error messages. The amount of 
   reserved memory is also screen mode-dependent.

   (3) In TN-Image registered version, memory is limited  only  by the
   available hard disk space. You can create more  virtual  memory  by
   using a disk utility to unfragment your hard disk, or you can erase
   unneeded files.

   (4)  If high resolution is not essential, images can be loaded in a
   small size.  Loading an image with  ``X size=50''  and  ``Y size=50''
   uses  only  �  as  much  memory  as  a  full-size image. (See under
   ``File menu...Load image'').
   
   (5). If you have more than one image  loaded,  unload  one  of  the
   images using ``File... Unload image''. This removes it and its backup
   from memory.

   (6). Erase FFT's as soon as possible by selecting ``File...Erase FFT''.
   Fourier transforms use large amounts of memory.


\bigskip\hrule
\vfill\eject
\bigskip\hrule\bigskip
\bbc { 7.6.0  Commonly asked questions }
\bigskip
\hrule\bigskip
\rm


\proclaim
   Q. How do I add text?

   A. Move the mouse cursor to the desired location and begin typing.
      It is not necessary to click the mouse before typing. Make sure
      the mouse does not move while you are typing. The text will stick 
      to the foremost image, or if no image is present, to the background. 
      Unix versions can also select the font, font size, and weight.
      Alternatively, text can be positioned interactively by selecting
      ``Draw..Label'', or by typing on the background and copying it to 
      the image.
      
\proclaim
   Q. How do I undo an operation?

   A. Select ``Process...Restore''. The image will be restored to its state
      at the last time you backed it up. If you never backed it up, it will
      be restored to its original state -- unless the ``Auto-Undo'' option
      has been turned off. 

\proclaim
   Q. How do I turn off box- or line-drawing mode?

   A. Click anywhere on the top menu bar or pull down any menu. This
      automatically turns off everything. Alternatively, click on the
      small rectangle which displays the current mode on the right side
      of the menu bar. In the Unix version, click on the main ``Cancel''
      button in the information area.
      
\proclaim
   Q. Is there an easy way to change the color of text, lines, etc.?

   A. Yes, click the left mouse button on the color palette to select the 
      foreground color. Click the right mouse button on the palette to
      select the background color.
      

\proclaim
   Q. How do I make the background color white?

   A. Select ``Color..Set background color'' and set the color to the 
      highest value (255 on an 8-bit display). Then select ``Image..
      erase background'' to redraw the background in the new color
      (\bf Note: \rm This will erase everything that was drawn on the 
      background).
      


\proclaim
   Q. When filtering, changing contrast, etc. of color images, why does
      junk sometimes briefly appear on the screen?

   A. If TN-Image is in an 8-bit screen mode, manipulating 16 and 24-bit 
      images temporarily causes the image to be filled with 16 or 24 bit 
      data, which appears as random noise because of the discontinuous 
      colormap. After the operation is finished, the colormap is automatically 
      recalculated, and the image will appear normal again.
   
\proclaim
   Q. How can I combine two or more indexed color images into one image so 
      that they have the same colormap?

   A. Start TN-Image in a color mode by typing:  \tt tnimage -xres 800 -bpp 24 \rm
      (if using DOS version).  If using the Unix version, it is necessary to 
      restart the X server in a true-color mode  by typing: \tt startx - --bpp 24 \rm 
      or some similar command. Load both images into the same window, then select 
      ``Create image'' and select a region covering both images, using the mouse. 
      Select ``Change image depth'' to convert the image to 1 byte (8 bits) per pixel. 
      A new 8-bit colormap will be generated to fit both images.  
      
\proclaim
   Q. Why is \rm xxx \it image file format not supported? 

   A. Some image formats (such as GEM IMG) are not commonly used in image 
      analysis. Others (such as lossless JPEG, LZW-compressed TIF, and 
      creation of GIFs) are not supported because of patent restrictions. 
      JPEG is not included in the Shareware version because it requires 
      virtual memory. Requests for other formats are welcome.
      
\proclaim
   Q. Is a Windows-NT version of TN-Image being planned?

   A. This has not been decided. For Windows 3.1 and Windows 95, 
      TN-Image has an icon and PIF file,
      and works perfectly in a DOS box. TN-Image is very demanding on the 
      hardware and will always run better from the DOS command line than
      in Windows.

\proclaim
   Q. Is a Windows-3.1 or Windows-95 (or 97) version of TN-Image being planned?

   A. No.

\proclaim
   Q. Is a Macintosh/NeXt/Rhapsody version of TN-Image being planned?

   A. No.

\proclaim
   Q. Is a SunOs 4.x/OpenWindows version of TN-Image available?

   A. The program requires Motif and does not compile under OpenWindows.
      A static version which will not require Motif will be created 
      if appropriate libraries can be obtained.


 \proclaim
   Q. Will lower-resolution screen modes (such as 640 x 480 x 16 colors)
      ever be supported?

   A. No. Reducing the number of colors to 16 would render any quantitative 
      analysis of the image almost meaningless. Users are advised against
      using 4-bit images for any scientific work, as many such images that
      have previously appeared in the literature are now being questioned.
      
 \proclaim
   Q. Is the source code available?

   A. Currently the source code still in a state of transition from the 
      MS-DOS version and is not in a presentable condition.  Eventually the 
      source code will probably be released.

 \proclaim
   Q. How do I scan an 8-bit color image?  In the dialog box, all the selections
      for color images are at least 24 bits/pixel.

   A. HP scanners cannot create 8-bit indexed color images. Scan the image
      at 24 bits and then select ``Color.. Change image depth'' to change
      the image to 1 byte (8 bits)/pixel. This will automatically generate
      an optimal colormap.

\proclaim
   Q. Why do controls for red, green, and blue appear when I try to change
      the contrast on my grayscale image?

   A. Some other software incorrectly sets the image identifiers in their
      image to values which indicate the image is ``color'' even though it
      appears as a gray scale. Selecting ``Color..Convert to grayscale''
      will repair the image.

\proclaim
   Q. When I set ``chroma-key'' on an image it either turns black or
      disappears entirely, and cannot be selected by clicking on it with 
      the mouse. Is this a bug?

   A. No, if the minimum and maximum chroma-key values are too broad,
      the entire image is transparent. If it becomes invisible, clicking 
      on it will only select the background. Select ``Image..image properties'' 
      and change the minimum and maximum to more reasonable values.
      


\bigskip\hrule
\vfill\eject
\bigskip\hrule\bigskip
\bbc { 7.7.0  Batch mode processing }
\bigskip
\hrule\bigskip
\rm

   TN-Image can also be run in ``batch'' mode for unattended operation.
   This is useful for operations that are time-consuming or need to be done 
   every day. You can use a cron-like utility or a DOS command scheduler
   such as 
\tta   tnshell 
\rm (available from the author) to automatically carry out 
   any sequence of operations at (for example) 3 a.m. on Thursdays or to
   automatically load a series of images before you come to work. The 
   computer's mouse and video card must still be present, and if your monitor 
   is turned on the images will still appear on the display.

\it   Procedure: 
\rm

   1. Create a macro in TN-Image and save it to disk. The last command in
      the macro should be ``exit'' to ensure TN-Image quits when finished.
      The command ``messages 0'' can also be used to ensure that any error
      messages are ignored instead of causing the program to wait for an
      acknowledgement (Make sure the macro works before using this!).

   2. Using \tt tnshell \rm (or other program), set the 
      following DOS command to
      be executed at the desired time (e.g., 3 a.m. every Saturday):
\tta       tnimage -macro  \it macro\_file
\rm
      where \it macro\_file \rm is the name of your macro (without brackets).
      See \it Macro programming guide \rm  for examples of useful batch macros.

\bigskip\hrule
\bigskip\hrule\bigskip
\bbc { 7.8.0  Editing text files }
\bigskip
\hrule\bigskip
\rm

   The Macro Editor in TN-Image can also be used as a text editor for small
   (up to 65536 characters) text files. This can be used to take notes on your
   image analysis, create color-remapping files, etc. as well as writing
   macros. The Unix version also supports clipboard cut \& paste.
  


\bigskip\hrule
\bigskip\hrule\bigskip
\bbc { 7.9.0  Reading mail attachments with TN-Image (Unix version) }
\bigskip
\hrule\bigskip
\rm

   To use TN-Image as an image viewer for MIME mail attachments, add the 
   following line to your /etc/mailcap or ~/.mailcap file and remove all
   other lines containing ``image'':
   
           
\tt image/*; showpicture -viewer /your\_tnimage\_path/tnimage %s
\rm

or

\tt image/*; /your\_tnimage\_path/tnimage %s    .

\rm This will cause your mail reader (e.g., \tt pine\rm ) to automatically 
  run TN-Image when an image attachment is to be viewed.


\bigskip\hrule
\vfill\eject
\bigskip\hrule\bigskip
\bbc { 8.0.0  Menu options }
\bigskip
\hrule\bigskip
\rm

   Menus, dialog boxes, message boxes, and click boxes can all be moved 
   by moving the mouse to the edge of the object and clicking the
   left mouse button.  Move to the desired location and release the
   mouse button. 
 

\bigskip\hrule\bigskip
\bbc { 8.1.0  File menu }
\bigskip
\hrule\bigskip
\rm


\bigskip\hrule\bigskip
\bbb { 8.1.1  Load image  }
\bigskip
\hrule\bigskip
\rm
     
       Reads an image from a disk file. 

\medskip\it    Vertical/Horizontal \rm - Selects whether the image should be
                             loaded in its normal orientation
                             (vertical) or rotated $ 90 \deg $ (horizontal).

\medskip\it    Positive/Negative \rm  - Selects whether the image is to be loaded
                             normally or as a negative (color-inverted)
                             image.
                             
\medskip\it    Filename      \rm   - Name of the image to be read. The previous
                             20 filenames are kept on a stack and can be
                             selected with the up and down arrow keys.
                             Alternatively, if you press \it Enter \rm when no 
                             filename is showing, you can select a file
                             from a menu. Wildcard (* or ?) characters
                             are permissible; thus, ``*.pcx'' is a valid
                             filename, and will cause all matching files
                             to be loaded.
                             
\medskip\it    X position    \rm   - Horizontal starting pixel position to place 
                             the image (in pixels).  If the image is in a separate
                             window, the position is relative to the upper left
                             of the screen; otherwise, it is relative to the 
                             upper left of the main window.

\medskip\medskip\it    Y position   \rm    - Vertical starting position to place the
                             image (in pixels). If the image is in a separate
                             window, the position is relative to the upper left
                             of the screen; otherwise, it is relative to the 
                             upper left of the main window.
                                
\medskip\it    X size       \rm    - If x size is 100, the image is loaded in
                             its actual size. If set to some value
                             between 0 and 100, the image is shrunk in
                             the x direction.

\medskip\it    Y size       \rm    - If y size is 100, the image is loaded in
                             its actual size. If set to some value
                             between 0 and 100, the image is shrunk in
                             the y direction.

\medskip\it    Auto File Type/ Raw bytes -
       
\rm    Select `raw bytes' if you wish to read the image as a series of
       bytes and override the automatic image file type detection. (If
       the  image  is  an unknown format, ``raw bytes'' mode is selected
       automatically).

\medskip\it    Invert byte order   - 
       
\rm    Certain other imaging programs save the RGB values in the wrong
       order.  This  could  also  happen  with  certain  video  cards.
       Clicking this option will switch the byte order to the  correct
       value.
                             
\medskip\it    CMYK to RGB           - 
                             
\rm    If  the  TIF  file  happens to be a 32-bit CMYK image, TN-Image
       will  automatically  convert  it  to  RGB  format  for  display
       purposes. Occasionally, an image file header says the image  is
       a  CMYK  image but in actuality it is not. Un-clicking this
       option will cause TN-Image to treat the image as if it were  an
       ordinary  RGB  image.  This option has no effect on images less
       than 32 bits/pixel.
                             
\medskip\it    Convert to gray scale
       
\rm    Changes the image to shades of gray  instead  of  its  original
       colors. This is particularly useful for CT or MRI images of greater 
       than 8 bits per pixel, because the gray scale can be remapped
       as a ``sliding scale'' to enhance specific regions of the image.
                             
\medskip\it    Color reduction     -
       Quantization/Fit current colormap/None
        
\rm       If TN-Image is in an 8-bit/pixel (indexed-color) mode, when a
       color image is loaded the number of colors must be reduced to
       256 for display purposes. This can be done by ``quantizing''  the
       image or by trying to fit the image to the currently-selected
       colormap. Even though the quantization algorithm used is new and
       one of the fastest known, converting the image to 8 bits/pixel
       often still takes much longer than reading it from the disk. 

          Quantizing is more general than colormap fitting, and is guaranteed 
       to give a viewable image. Many GIF files were produced  
       with quantizing.  However, because it changes the colormap, all 
       other images currently being viewed will become ``garbage'' if 
       TN-Image is in an 8-bit mode (Of course they are not really  
       garbage, but temporarily unviewable). Clicking on an image restores  
       the colormap for that image. 
       
          Colormap fitting uses less memory than quantizing. If the error 
       message ``Insufficient memory to convert to 8 bits/pixel'' appears, 
       try changing the color reduction method to ``fit current colormap''.
       This can be quite slow, however, for certain types of images.

          Because quantized colormaps are usually not a continuous flow
       of colors, it may not always be possible to perform all types of
       quantitative analysis or filtering on a quantized 8-bit image.
       The best solution is to select ``Change color depth'' and convert
       the  image to a 24 bits/pixel color image. The colors will then
       work as expected during filtering.

          Fitting to the current colormap does  not  affect  the  other
       images  on  the  screen,  and  gives  a  result  that  is still
       quantitatively analyzable and filterable. Also, if the original
       colors in the image are similar to those in  the colormap,  the
       result  will  be a much smoother image. However, if the colormap
       is substantially different, none of the colors  may  match  up.
       (Of course, you can easily change the colormap and repeat). This
       method incidentally uses much less memory than quantizing.

          If  TN-Image  is  in a color mode, this option has no effect
       except when saving images to disk when ``8-bit/pixel colormap'' is
       specified as the file type. Color images  are  filtered  in  an
       identical  manner regardless of whether or not TN-Image is in a
       color mode. The colormap is also used in color  modes  when  an
       image  with  8 or less bits/pixel (i.e., a indexed-color image)
       is loaded.

           All 8,16,24, and 32-bit images are kept in memory in  their
       original  color  depth,  regardless of the current screen mode.
       Other images are converted at read time  to  the  next  highest
       multiple  of  8. This means that you can safely edit full-color
       images even if your computer's video card can only  handle  256
       colors. Editing operations also are handled in a manner 
       appropriate for each image. Thus, for example, you can select an area
       encompassing both an 8-bit image and a 24-bit image, and filter
       them  simultaneously,  with no problems. TN-Image automatically
       knows the color depth of each pixel being processed and handles
       it appropriately. 
       
\it          See also under ``Color settings'' for more details.
\rm

          Images between 1 and 7 bits/pixel are automatically converted 
       to 8 or 16 bits/pixel when they are loaded. The conversion  
       makes use of whichever colormap is selected. If you have not 
       specifically changed the colormap, the default ``spectrum'' colormap 
       will be used. This can result in an unexpected color appearance. 
       8 bit/pixel images are a special case, because they are usually 
       saved with their own colormap.    
                              
       If TN-Image cannot identify the image type, or finds an invalid 
       file, it asks if you want to try to read it anyway as raw bytes. 
       It then makes a guess as to the x and y sizes, and  bits/pixel. 
       You should correct these as needed. In order to read raw bytes,
       the image should have a constant no. of bytes per scan line, be
       uncompressed,  and  have  the  image rows stored in consecutive
       order. You may also have to skip a number of bytes to  get  the
       image to line up horizontally. This number has to be determined 
       experimentally. If the file is not really an image file, in all 
       likelihood you will just get junk on the screen.

       This feature allows you to import other types of files that are
       not  normally  thought  of  as  images.  For example, to read a
       database of 16 x  16  Chinese  characters,  use  the  following
       parameters:

               Filename:     ziku  (or name of the database)

               x pixels:       16

               y pixels:  \it length of file $\div$ 16 \rm , e.g. 15000 or so.

               bits/pixel:      1

               bytes to skip:   0
\medskip
       The  database  will  be  loaded  as  a  long  strip  of Chinese
       characters, which then can be cut and  pasted  as  desired.  Of
       course, this is not the most efficient way to edit Chinese, but
       it demonstrates the usefulness of the feature.

       See the following section for a detailed procedure for reading
       raw bytes and creating custom formats.
     
       If a single-color image containing between 1 and 8 bits/pixel is
       loaded, the values are automatically filtered through the currently-
       selected colormap. If the image itself contains a colormap, the colormap
       in the image is used. This is not done for single-color images greater 
       than 8 bits/pixel, because of the large size of the colormap table that 
       would be required (usually, only 8-bit images actually contain a 
       colormap).
 
       \bf Procedure for converting a 24-bit image to an 8-bit image
       with a desired colormap. \rm
       
       A common operation is reducing a color image to 8 bits, with the
       constraint that the colormap should be the same as that of some
       other image. For example, a grayscale image might be accidentally 
       converted to 24 bits/pixel and it is desired to reconstruct the
       original continuous color map.
       
\item{1.} Select ``Color...Colormap...Select colormap''.

\item{2.} Click Ok and select the desired colormap. 

\item{1a-2a.} Alternatively, the colormap of some other image can be copied
       by selecting ``File...Create/Resize object'' and clicking on 
       ``Method...Copy colormap only''.  The colormap of the image specified
       under ``Image \# to copy'' will be copied to the currently-selected
       image.
       
\item{3.} Select ``Config...Configure'' and change the ``Color reduction method''
       to ``Fit current colormap''.

\item{4.} Select ``Color...Change color depth'' and convert the image to
       the new depth (i.e., 1 byte/pixel).



\bigskip\hrule\
\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.1.1.1 Reading CT, X-ray, or MRI images, or raw bytes }
\bigskip
\hrule\bigskip
\rm
 

     Below is a detailed example for reading images produced by X-ray,
     CT or nuclear magnetic resonance scanners and other equipment. These 
     machines typically use unusual file formats not recognized by TN-Image, 
     but usually the images can easily be read as ``raw bytes''.
     
     The same procedure is applicable to any non-compressed file of 
     unknown type.
     
\bf   NOTE:
\rm   The DOS Registered version and Unix versions of TN-Image can be used to create 
     a ``custom''
     image file format, which is a superior method for reading medical image
     files, because once the custom format is set up, reading the image is
     transparent to the user, obviating the necessity for reading ``raw 
     bytes'' as described here (See ``Create File Format'').


     (1) Select ``File...Load image'' and enter the image file name.

     (2) Click on ``Raw bytes''.

     (3) Click on ``OK''.

     (4) TN-Image will make a guess at the image width. If the image width 
         is known, enter the image width and height. Otherwise, if the guess 
         turns out to be wrong, use the auto-increment method described below
         to determine the width. In this case, the width happens to be 381.

     (5) Select the bits/pixel of the image. This is usually 12 or 16 for
         CT images (MAMOGRAM.LUM is 16 bits).

     (6) (Optional): If the length of the image file header is known, 
         enter this  value under ``skip bytes''. Otherwise, leave it as 0. 

     (7) Click on ``OK'' to load the image.

     (8) Once the image is loaded, if the skip bytes were incorrect in
         step 6, the image border will be visible as a vertical strip in
         the image. Use the mouse to locate the X-position of this strip.
         Unload the image and re-load it, using the X-position * bytes/pixel
         as an estimage for skip bytes.

     (10) If the image was color, it may be necessary to add 1,2, or 3
         additional skip bytes to get the colors to line up correctly.
         
     (11) If the image is grayscale, the grayscale mapping can be adjusted
         by selecting ``Color... Change colormap... Grayscale brightness/
         contrast''. This allows you to interactively adjust the appearance
         of the image as a sliding scale, to highlight areas of different
         intensity (See ``Grayscale brightness'' below).
         
     (12) The image can now be saved in a conventional file format.  
             
\bigskip             
     Determining the width of an unknown image:
     
        TN-Image has a unique feature for determining the width of an 
     image whose dimensions are completely unknown. This procedure is
     substituted for step (4) above:

     (4a) Make a conservative guess of the image width. For instance, if 
          the image is known to be square, and it is 16 bits (2 bytes)
          per pixel, use

               $$  width =  \sqrt( file size / 2 ) $$

          as your starting estimate. 

     (4b) Click on ``Auto increment''. This will cause the width to be
          increased with each scan line.

     (4c) For ``Increment'', enter ``1'' or ``2''.

     (4d) Click on ``OK'' to load the image. The image should consist of
          a swirling pattern, with fuzzy lines in a horizontal ``U'' shape.
          Usually, the image is slightly clearer at the vertex (marked
          with a *). If so, find the Y-coordinate of the vertex using
          the mouse. Subtract 32 (the size of the menu bar) from this
          value and add the result to your previous estimate of the 
          image width.

     (4e) Unload the image. 

     (4f) Turn off ``Auto increment'' and load the image again. The image
          should now be recognizable. If the image slopes to the right
          as you move down the screen, this means the value is still too
          low. Increase the image width slightly and try again. If it
          slopes left, the value is too high.
          
          If the image is still not recognizable after these steps,
          try changing the byte order, or check the ``Convert--gray scale''
          option. 
          
          If you selected the wrong number of bits/pixel or y size for
          a ``raw bytes'' image, the automatic grayscale detection 
          may estimate tne maximum and minimum gray levels incorrectly.
          This will result in an image that is too dark or too light.
          This can be easily corrected by remapping the gray levels
          (See \it Grayscale intensity mapping \rm).

\bigskip\hrule\
\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.1.1.2  Reading raw byte files }
\bigskip
\hrule\bigskip
\rm
 
       The .IMG files produced by some other software contains a value 
       for the image width that is off by 1. Thus, in order to read the 
       image properly, it is necessary to read the image as ``raw bytes''.
       After manually changing the width from 511 to 512, the file will
       read normally.

\bigskip\hrule\bigskip
\bba { 8.1.1.3  Reading Images from Macintoshes }
\bigskip
\hrule\bigskip
\rm

       Files imported from Macintosh via Mac-TCP are corrupted by the 
       addition of an extra header unless they are sent as ``Raw Binary''. 
       This often creates the impression
       that PC-based programs are incapable of reading Macintosh images.
       TN-Image, however, automatically detects the presence of the header 
       and eliminates it before reading any image.


\bigskip\hrule\bigskip
\bba { 8.1.1.4  Reading Raw ASCII images }
\bigskip
\hrule\bigskip
\rm

       Raw ASCII images consisting of a series of integers are readable
       by TN-Image. To read an image in ASCII format, you must select 
       \it Raw ASCII \rm as the File Type in the Load Menu. Then set the 
       remaining parameters the same way as for \it Raw Bytes \rm (Sec. 8.1.1.1). 
       Some of the options (such as bit packing) do not apply to ASCII files
       and their setting is ignored. 


\bigskip\hrule\bigskip
\bba { 8.1.1.5  Reading 3D images (Unix version only)}
\bigskip
\hrule\bigskip
\rm

       Select ``File type = Raw 3-D'', select a filename, and then enter
       the following information:
       
       No. of frames = Total number of sub-images in the file.
       
       Frame width(pixels) = The width of each frame in pixels.

       Frame height(pixels) = The height of each frame in pixels.

       Bits/pixel = The image depth (8,15,16,24, or 32).


       Currently, only raw 3-D images are supported.
       

\bigskip\hrule\bigskip
\bba { 8.1.1.5  Reading images from confocal microscopes and PET scanners}
\bigskip
\hrule\bigskip
\rm

       These images, which contain multiple views in 3 dimensions, must 
       sometimes be read 
       as Raw 3D images. Typically, the image size for confocal images
       is 512 x 512.  PET scan images are typically 128 x 128. It is necessary
       to know the number of frames (slices) in the image. Most PET scan images
       are only 8 bits/pixel, while confocals often produce 24 bit/pixel images.



\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.1.2  Save image }
\bigskip
\hrule\bigskip
\rm


       Transfers an image or selected portion of the screen to a disk file.

\medskip
\it      File format         
\rm
       
       Format in which to save the image. See \it Custom format \rm below
       for details on creating files in your own customized format).

\medskip
\it       Save entire image/selected region -
\rm

       If ``entire image'' is selected, the currently-selected image will
       be saved in its entirety. Otherwise, only the currently-selected
       screen region (which can beyond an image or contain  2  or  more
       images)  will  be  saved. The actual size of the region saved is
       displayed after the file is written.

\medskip
\it       Bits/pixel - 
\rm
       
       You  can  select  standard  values  of  1,8,15,16,24,   or   32
       bits/pixel,  or  select  ``other''  to  specify  any  other value
       between 1 and 32. The resulting file size  is  proportional  to
       the  bits/pixel.  This  can result in a considerable savings in
       disk space. Monochrome (1 bit/pixel) is ideal for line drawings
       and graphs. Don't forget  that  saving  an  image  in  a  lower
       bits/pixel than it was created causes a loss in color accuracy.
       For  example, if you save an 8-bit image as a 3 bit/pixel image
       file, the colors in the image will look slightly different from
       the original colors when you load it back. If you save it as  a
       monochrome  (1  bit/pixel)  image,  all pixels above 50\% of the
       maximum color will come  out  white  and  those  below  50\%  of
       maximum will come out black.
                                
\bf       NOTE 
\rm    - Some file formats (e.g., GIF and PCX) only allow certain
       values  for  bits/pixel and number of colors. TN-Image displays
       an error message if an illegal value is selected. 
                                
\bf       WARNING 
\rm    - Due to limitations in  the  capabilities  of  some
       other  programs,  saving images using ``non-standard'' bits/pixel
       or using ``non-standard'' numbers of colors can result  in  image
       files  that  are  not readable by some other image viewers. For
       example, one well-known  shareware file interconversion program
       can only handle 4,8, and 24 bit/pixel TIF images, but  not  the
       common  15  and 16 bit images. One commercial Macintosh program
       can only handle 8,15,24, or 32 bit/pixel  images,  but  not  16
       bits/pixel.  Very few other programs can handle odd values such
       as 12 bits/pixel. However, these values can be extremely useful
       and widely used in handling radiological, electron  microscope,
       or MRI images, which are often of unusual pixel depths.
                             
       TN-Image  will  display  an appropriate warning if you select a
       ``non-standard'' file format.

\medskip\it       Treat data as Color / Gray scale -
\rm

       When  saving  images  greater  than  8  bits per pixel as TIF or
       Custom files, it is sometimes useful to save the image as if the
       image data represent shades of gray instead of colors. Selecting
       ``gray scale'' causes TN-Image to treat the image as if each pixel
       value was already a ``luminosity'', and skips the conversion  from
       RGB to luminosity. This setting is ignored if the image is saved
       as  8 or less bits/pixel, or if it is saved as a color image (by
       selecting ``2'' or ``3'' as the number of primary colors). Normally,
       this setting should be kept on ``Color''.


\medskip\it       Filename            - 
\rm
       The file name under which the image will be saved (can include 
       drive and path). The previous 20 filenames are kept on a stack 
       and can be selected with the up and down arrow keys.


\medskip\it       Image no.           - 
\rm                             
       Indicates  the  currently-selected  image which will be saved if
       you have selected ``save entire image''. Has no effect if you  are
       saving   a   ``selected   region''.  This  option  is  mainly  for
       informative purposes and does not normally need to be changed.

\medskip\it       Extra TIF Param.(for `Other') -
\rm

       If you select \it Other \rm, it is also possible to customize several 
       additional parameters. Currently, these values only have an effect
       for TIF and ``custom'' file formats.
                           
\medskip\it       No.of primary colors(1-4) - 
\rm 
      
       If you select ``1'', the image will  be  converted  to  grayscale
       (``luminosity'')  before  saving,  and  the red, green, blue, and
       black bits/pixel specified below are  ignored.  If  you  select
       more  than  1  color,  the  number of bits for each color, when
       added together, must equal the total number of  bits/pixel  you
       specified  under  ``other  bits/pixel''.  If they don't, TN-Image
       displays a message to that effect.

\item {} \it      Red bits/pixel    \rm No.of bits of red to save.
\item {} \it      Green bits/pixel  \rm No.of bits of green to save.
\item {} \it      Blue bits/pixel   \rm No.of bits of blue to save.
\item {} \it      Black bits/pixel  \rm No.of bits of black to save (CMYK files only).
          
\medskip
       For example, to save only 4 bits each of the red and blue planes 
       of your image, set the following values:

\item {}                      `Other' bits/pixel (on left side of  dialog box)   = 8
\item {}                       Number of primary colors = 2
\item {}                       Red bits/pixel   = 4
\item {}                       Blue bits/pixel  = 4
\item {}                       Green bits/pixel = 0
\item {}                       Black bits/pixel = 0

\medskip\bf
       NOTE: 
\rm    TN-Image currently cannot display more than 8  bits/pixel
       of each color (i.e., a total of 24 bits/pixel). 
       This is due mainly to limitations in the current
       generation  of  PC  video cards. Thus, there is no advantage in
       setting the bits/pixel for any one color higher than ``8''.

\medskip
       You can only specify black bits/pixel if the ``cmyk''  option  is
       checked.
          
\medskip\it       RGB to CMYK  -
\rm
       
       Convert the image from  RGB to CMYK (cyan, magenta, yellow \&
       black) format when saving. (When reading a CMYK  image,  it  is
       automatically  converted  to RGB for display, since there cannot be a ``CMYK
       computer monitor''). If you are using a non-standard  bits/pixel
       mode,  you also need to specify the number of red, blue, green,
       and black  bits/pixel  (the  values  will  be  changed  to  the
       corresponding   c,m,y,   and   k   values).  If  you  select  a
       non-standard format, TN-Image will display a  warning  to  that
       effect.  Selecting  CMYK  is only allowed for the 32 bit/ pixel
       standard mode and the ``Other'' (non-standard) mode.  If you  try
       to  save an image with CMYK checked in any other mode, TN-Image
       will  display  an  error  message.  This  is  because  the  TIF
       specification (as of version  6.0)  does  not  recommend  using
       lower color depths for CMYK.
       
       This option is useful for exporting the image to other programs
       which cannot create their own CMYK images for printing.

\medskip\it       JPEG quality factor - 
\rm 
      
       An integer between 1 and 99. Values above 90 or below 10 are not 
       recommended. Smaller values result in greater compression and 
       more signal loss. 
       
\bf       NOTE:
\rm    Jpeg is a lossy file format. This means an image saved in
       JPEG format will lose some information. Images consisting of text 
       and sharp lines are not good candidates for Jpeg compression, 
       because the compression algorithm is optimized for realistic 
       scenes such as images from photographs. Files should only be 
       saved in Jpeg format when all image processing has been completed,
       and the smallest possible size is needed.
       
       Also, some settings, such as red, green, blue, and black bits/
       pixel, and CMYK conversion, are ignored for JPEG.
       
       

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.1.3   Printing images }
\bigskip
\hrule\bigskip
\rm

    Prints the image or selected portion of the screen on a laser printer.
    A laser or inkjet printer that uses a page control language similar 
    to Hewlett-Packard's PCL3 or PCL5, or any PostScript printer supporting
    PostScript Level 2 or above is required. (Postscript Level 2 is not to
    be confused with ``PostScript Type 2 Fonts'', which don't exist).


\bigskip\hrule\bigskip
\bba { 8.1.3.1 Printing Black-and-White or gray scale images }
\bigskip
\hrule\bigskip
\rm

    Most  laser  printers  are optimized to print text. This means the
    pixels are printed by the printer as dark as possible and adjacent
    pixels partially overlap. The effect that  this  has  on  graphics
    printing  is  that  the  darkest  50\%  of the image will appear as
    black. For example, if you are printing at 8x8 dithering mode  (64
    gray  levels),  shades  1-32 will appear white to black and shades
    33-64 will all appear black. Thus, your gray-scale  resolution  is
    effectively  cut in half. Although you can make your image lighter
    before printing or select a lighter setting from TN-Image, the only
    way to avoid any loss of resolution is  to  set  your  printer  to
    print  lighter.  This  is  easy  to  do but varies from printer to
    printer. See your printer manual for the procedure. 

    To  select  a  lighter  print  intensity  from  TN-Image,   select 
    `file...print' from the menu, then click on `printer color adjustment'.
    Adjust the red, green, or blue intensity factors as desired. 128 is  
    normal (dark) printing. Any other values will be multiplied by 
    the data going to the printer to make it lighter or darker.  
    If you are using a monochrome printer, be sure to select ``B/W or
    grayscale''. The red, green, and blue intensity factors will be 
    averaged for grayscale printing.

    Currently, only laser and inkjet (bubble jet) printers are supported. 
    No support is planned for dot-matrix printers, because the
    image quality would be unacceptably low. 

    Print quality can often be improved by using glossy paper sold for
    pen plotters instead of regular paper.

\medskip\bf
       ---Column 1---


\medskip\it       Vertical/Horizontal   
\rm                          - Selects whether image will be printed
                               in ``portrait'' (vertical) or ``landscape''
                               (horizontal) mode.


\medskip\it       Positive/Negative  
\rm                          - Print normally (white on the screen =
                               white on the paper) or as a negative.

\medskip\it       Print entire image/ print selected area
\rm                           - Select whether to print the entire
                               currently-selected image, or the
                               currently-selected screen area which
                               may span 2 or more images.

\medskip\it       Color type  \it See Sec. 8.1.3.2   
\rm    


\medskip\it       Printer type: PCL / PostScript          
\rm                           - Select printer language to use. 

\medskip\bf
      ---Column 2---
     
                  
\medskip\it       No. of copies  
\rm                          - Number of copies of the image to print.
                               Not all printers accept this command.

\medskip\it       Printer Device/file name - See Sec. 8.1.3.4
\rm 

\medskip\it       Color adjustment 
\rm                          - Darkness of printed image (255=darkest).
                               The red, green, and blue factors are averaged
                               when \it color type \rm is ``B/W''.

\medskip\it       Vert. offset (inches)
\rm                           - Offsets the image by the specified no. of
                                inches down the page.

\medskip\it       Horiz. offset (inches)
\rm                           - Offsets the image by the specified no. of
                                inches to the right across the page.

\vfill\eject
\medskip\it       Media type 
\rm                             - Optimizes the output for the type of
                                  paper being used. 
                                  The following table shows the differences
                                  used for different media types on a typical
                                  PCL printer:

\medskip
\settabs 4 \columns
\+ \hfil Media    &  Print       &     No. of   & Recommended   \cr  
\+ \hfil Type     &  Quality     &    passes$^1$& Depletion$^1$ \cr
\+ \hfil ------   &  --------    &     -------- & -----------   \cr
\+ \hfil Plain    & Draft        &       1      & --            \cr
\+ \hfil          & Normal       &       2      & 25\% w/gamma  \cr
\+ \hfil          & Presentation &       4      & 50\% w/gamma  \cr
\+ \hfil Bond     & Draft        &       1      & --            \cr
\+ \hfil          & Normal       &       2      & 25\% w/gamma  \cr
\+ \hfil          & Presentation &       4      & 50\% w/gamma  \cr
\+ \hfil Premium  & Draft        &       1      & --            \cr
\+ \hfil          & Normal       &       2      & 25\% w/gamma  \cr
\+ \hfil          & Presentation &       4      & 50\% w/gamma  \cr
\+ \hfil Glossy   & Draft        &       2      & 25\%          \cr 
\+ \hfil          & Normal       &       4      & 25\%          \cr
\+ \hfil          & Presentation &       4      & 0\%           \cr
\+ \hfil Transpar-& Draft        &       2      & 25\%          \cr
\+ \hfil   ency   & Normal       &       4      & 25\%          \cr
\+ \hfil          & Presentation &       4      & 0\%           \cr
                                            
\medskip
                                  On certain printers, e.g., H/P 540, the
                                  number of passes and the depletion are 
                                  determined automatically by the printer 
                                  and may differ from the value in the table.
                                  On some other printers, depletion and no.
                                  of passes cannot be changed, and setting
                                  them to different values has no effect.

                                  $^1$ Recommended by H/P.

\bigskip
\bf PCL Printer settings
\rm

    For PCL printers, such as the HP LaserJet and most inkjet printers, 
    the following options also apply:

\bigskip


\medskip\it       Resolution  
\rm                           - Selects the desired dots/inch resolution
                               to print the image. Normally this is
                               set to the highest value your printer
                               can handle (see discussion above).

                               Typical values are:

                                    150 dpi  

                                    300 dpi

                                    600 dpi    

                                    1200 dpi

                               This number must be set \bf exactly \rm.
                               For example, a 300 dpi printer may ignore
                               the setting, or it may print nothing at all
                               if the resolution is set at 299 or 301.     

\medskip\it       Dither size 
\rm                          - Determines the number of separate gray or 
                               color levels that can be printed:
   
\medskip

\settabs 2 \columns
\+  \hfil    Dithering   &No. of gray/            \cr
\+  \hfil     size       &color levels            \cr
\+  \hfil    --------    &------------            \cr
\+  \hfil      1x1       &     2                  \cr
\+  \hfil      2x2       &     4                  \cr
\+  \hfil      4x4       &    16                  \cr
\+  \hfil      8x8       &    64                  \cr
\+  \hfil     16x16      &   256                  \cr  


\medskip

                               The size of the printed image also increases
                               proportionately with the dithering size.
                               No ``error propagation'' is performed, in order
                               to maximize resolution for text.
 

\medskip\it
       Print Quality:         
           Draft/
           Normal/
           Presentation
\rm                           - Selects the quality of printout. Presentation
                               quality takes longer, but gives slightly 
                               better results.

                               Not all printers support this option.

\medskip\it
   

\medskip                                 
\it       Depletion --            
\rm                               Improves image quality by removing a 
                                  certain percentage of the pixels. It is
                                  recommended to leave this setting at
                                  ``printer default'' unless unsatisfactory
                                  results are obtained.
                                  The highest two settings also apply
                                  gamma correction to the printed image, if
                                  this feature is supported by your printer.
                                  Gamma correction produces a smoother
                                  transition from one color to the next.
                                  
                                  See the table above for recommended
                                  depletion levels.

\it                               Not all printers support this option.
\medskip           
                      
       Printer gray balance    
\rm                             - If checked, the internal gray balance
                                  adjustment in the printer will be activated
                                  if present. This is supposed to adjust the
                                  colors so that blacks appear black instead
                                  of dark green. Do not check this box if
                                  you have changed any of the values under
                                  ``Printer color adjustment'' (see above),
                                  since this would result in correcting the
                                  gray balance twice. If your printer does
                                  not support this option, checking this
                                  will have no effect.
                                 

\bigskip           

\bigskip
\bf PostScript Printer settings
\rm

    For PostScript printers, the following additional options apply:

\medskip\it 
       Horizontal image size (inches)

       Image ratio (y/x)
       
\rm                            - The output will be scaled accordingly to
                                 shrink or enlarge the image to the specified
                                 size.
                                 
\medskip\it 
       Rotation (Degrees)    
\rm
                             - The printout will be rotated 
                                 counterclockwise by the specified angle. The
                                 angle is centered at the lower left corner
                                 of the paper. Note that a rotation may
                                 cause part of the image to be off the page
                                 unless 'horizontal position' is also
                                 adjusted.

\medskip\it 
       Interpolate            

\rm                            - If checked, and if the output resolution
                                 of the printer is high enough, additional
                                 pixels will be added to smooth the output. 

\medskip
\bf       NOTE: \it PostScript Level 2 or above is required. 
\rm     


\bigskip\hrule\bigskip
\bba { 8.1.3.2 Color printing }
\bigskip
\hrule\bigskip
\rm


       Color printing uses the same parameters as B/W printing, except
       you must select RGB, CMY, or CMYK color instead of
       grayscale. Color printing can take a much longer time than B/W
       printing, and requires more printer memory if you are using a 
       laser printer. Use B/W mode whenever possible. The choice between 
       the color types is subjective; however, CMYK generally gives darker 
       blacks. 

\bf       NOTE: \rm You do not have to convert your image to CMYK format to
       print it in CMYK mode.

\medskip\it       Color type 
\rm                             - Selects color printing mode.

\medskip\it       Grayscale
\rm                             - Recommended for non-color printers and
                                  for monochrome images.  The pixel values
                                  are sent to the printer without
                                  filtering them through the 
                                  colormap. Thus, if you made the image
                                  lighter or darker by dragging the
                                  colormap palette, these changes will \it not \rm
                                  be reflected in the printout. This setting should 
                                  not be used for the following types of images:

                                  \item{1.} Images that have been converted to
                                  a lower bit/pixel depth, e.g. from 24
                                  bits/pixel to 8 bits/pixel.
                                  
                                  \item{2.} Images containing color.
                                  
                                  \item{3.} Images such as GIFs which have
                                  a discontinuous colormap. 
                                       

\medskip\it       RGB/indexed color 
\rm                            - Recommended selection for PostScript color printers.
                                  Not recommended for PCL inkjet printers,
                                  because some PCL printers insist on
                                  interpreting this command to mean that 
                                  all pixels not explicitly defined are
                                  to be printed as ``black''. This causes
                                  a wide black stripe to be printed next 
                                  to the image, and causes printing to
                                  take a much longer time.
                                  
                                  For PostScript printers, this is a
                                  good setting to use for both grayscale
                                  and 8-bit color images.
                       
                                  If the image is 8 bits, the colors
                                  or gray levels are determined by the
                                  colormap. If it is a true-color image,
                                  the RGB values are used directly.
                                  
                                  Prints using red, green, and blue inks
                                  if available (not supported by all
                                  printers).
              

\medskip\it     CMY color      
\rm                             - Recommended selection for PCL color printers.
                                  Not recommended for black \& white printers.


\medskip\it    CMYK color    
\rm                           - For color PCL printers - gives darker blacks 
                                and brighter colors than CMY but takes 
                                33\% longer. For PostScript printers, this
                                option is the same as CMY.
       
\medskip\it   Printer color adjustment
\rm                             - Adjusts each color to allow you to match
                                  the printer output with the screen. For
                                  each color, a value of 128 (the default)
                                  is ``normal''. Increasing the value will
                                  increase the intensity of that color. 
                                  If CMY or CMYK is selected, the cyan,
                                  magenta, and yellow inks are changed.
                                  If RGB is selected, the red, green, and
                                  blue inks are changed. 
                                  If B/W-grayscale is selected, the black
                                  value is taken as the average of the 
                                  three color values.
                                  \bf NOTE: \rm For CMYK printing, it is
                                  important
                                  to keep the 3 colors balanced so that 
                                  the average is 128. Otherwise, the black
                                  ink, whose value is derived from the 3
                                  pigments, will also become lighter or 
                                  darker.
                                  

\vfill\eject       



\bigskip\hrule\bigskip
\bba { 8.1.3.3 Printing to a file or another printer }
\bigskip
\hrule\bigskip
\rm

       A 'print file' can be created by entering a filename 
       instead of a printer name under \it Printer device/file name \rm in
       the ``Print...'' menu. This will create a print file which can be 
       sent to the printer later, such as at night when it is less busy. 
       
       For example, in DOS, printing of a file can be done using the command:

\tt          copy /b print.tmp lpt1

\rm     However, \tt copy /b \rm does not work correctly on some printers. 
        In this case, you can use \hfill\break
        \tt print.exe \rm, which is a replacement 
        for DOS's  \tt print.exe \rm . 
        This program is available at the ftp site.
        Print.exe is also useful for printing large print files, such as 
        those created by Ghostscript.
       
       In Unix, printing of a file could be done using the command: 
\tt           lpr -Pmyprinter print.tmp
                    
\rm    To schedule the printing at a specific time, use a program such as 
       \tt tnshell \rm in DOS, or \tt cron \rm or \tt at \rm in Unix.

       If a printer device is entered, the image will be printed on that
       device. \it Printer device \rm refers to the printer name as it is 
       known  to the operating system, for example:

          DOS version:    lpt1   lpt2  prn 

       
          Unix version:   /dev/lp0  /dev/lp1 /dev/lp2 /dev/printer, etc.


\bigskip\hrule\bigskip
\bba { 8.1.3.4 Printing under Unix }
\bigskip
\hrule\bigskip
\rm
       
       The Unix version of TN-Image has the additional option \it Printer
       Name \rm. By default this is set to /dev/lp2. If you have multiple
       users on your system, or if you do not have write permission for
       /dev/lp2, it is recommended to change this to a regular file, e.g., 
       ``temp.print'' and print the file later using \tt lpr \rm. 

       \bf Warning: \rm If a device is specified that is not a printer or a 
       file, bad things will happen.                          

       Alternatively, in the box ``Printer command'', a command can be entered, 
       such as  $\tt lpr -P\it printer \tt -K\it copies\rm$.
                                 




\bigskip\hrule\bigskip
\bba { 8.1.3.5 Printing in Windows }
\bigskip
\hrule\bigskip
\rm

       In Windows and Windows95, it is possible to print to any network printer
       provided the printer has been set up correctly with the Print Manager.
       There are two ways of doing this: ``capturing a printer port'', and
       directly printing to a Windows-style shared printer name. If the ``Capture
       Printer Port'' in Windows is clicked, printing to DOS printer devices
       lpt1 to lpt4 is captured and sent to the specified network address.
       In this case, ``\tt lpt1\rm'' to ``\tt lpt4\rm'' should be entered. 
       Otherwise, enter a Windows address such as
       ``\tt \bs \bs MY\_NT\_SERVER\bs ITS\_PRINTER\rm''. Printer port capture
       must be ``off'' for the specified printer in order for this to work.
       

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.1.4 Change Title }
\bigskip
\hrule\bigskip
\rm


       Changes the name of the image. This must be a valid filename.
       If the title contains illegal characters (such as spaces or 
       control characters in the DOS version), they are automatically 
       removed and an error message is displayed.



\bigskip\hrule\bigskip
\bbb { 8.1.6  Create/Resize Object }
\bigskip
\hrule\bigskip
\rm
       You can create a new object by clicking and dragging with the mouse,
       setting a fixed size and position, copying another image, or 
       resizing another image.  An object can be a label, graphic element,
       or a complete image.
    
       For \it fixed size \rm, you must enter the x and y size (in pixels), and 
       the x and y position for the upper left corner of the object. The 
       screen contents at the specified location will be copied into the 
       new object.
    
       For \it use mouse \rm, use the mouse to select the region for the new object.
       The screen contents at that location will be copied into the new 
       object. The other parameters will be ignored.
    
       For \it copy another image \rm, enter the image number of the image to 
       duplicate and the x and y position for the upper left corner of the 
       new image. 

       For \it resize another image \rm, enter the image number of the image to 
       duplicate, the new x and y size (in pixels), and the x and y position 
       for the upper left corner of the new image. Any space beyond the
       copied image will be set to black.

       Once created, the properties of the object (such as transparency, title,
       etc.) can be changed in the ``Image...Image properties'' dialog.

      \bf Note: \rm If the foreground object is a transparent or chroma-keyed
      image, make certain the cursor is actually on a foreground pixel when 
      using the mouse to create a new image. Otherwise, the background image 
      will be brought to the foreground when the left mouse button is clicked.
      This behavior can be prevented by un-checking ``Raise image on focus''
      in the ``Configuration'' dialog.

\bigskip\hrule\bigskip
\bbb { 8.1.7  Switch to  }
\bigskip
\hrule\bigskip
\rm
       Make some other image the currently-selected, foreground image.
       This option has been replaced by ``About the program...'', which
       can also switch images.


\bigskip\hrule\bigskip
\bbb { 8.1.8  Create file format }
\bigskip
\hrule\bigskip
\rm
 

       Defines a new image file format. This allows you to add up to 100
       new formats to TN-Image, or create your own customized format.
       Once defined, the new format is automatically recognized by
       TN-Image and can be loaded and saved without any special action 
       on your part.
       
       If you know certain basic details about the image format, 
       or have a sample image file already in that format, you can easily
       create an image file in almost any file format imaginable, which
       will be readable by any Intel-based PC, Macintosh, IBM mainframe,
       and many UNIX systems. 
       
       Custom formats are particularly useful if reading medical images
       from an X-ray scanner, which vary from one manufacturer to the other.
       Currently, only uncompressed custom formats are available. 
       
       Of course, with this much flexibility it is impossible to test 
       every possible combination of parameters on every destination platform,
       so you should always make a test image before proceeding to make
       sure the file is readable on your non-PC system.
   
\smallskip    
       \bf IMPORTANT \it 
       Always test to make sure your custom file is readable on the target 
       system before erasing the original!
\rm
\smallskip

       The information you need to know is: 
   
\item{1}  Bits/pixel that the destination system expects. This can be
       calculated from the number of colors on the screen, using the formula

\hskip 1 in                No. of colors =  $2 ^ {(Bits/pixel)}$.

       Thus, if there are only 2 colors (black and white), there is 1 bit
       per pixel.
   
\item{2}  Destination system - If the destination computer is not a 
       PC, Mac, or IBM mainframe, pick whichever seems closest. Many UNIX
       systems use ``big-endian''-type processors similar to the Mac. VMS
       systems use ``little-endian'' processors similar to the PC.
      
\item{3} Size of the image file header. To get this information, you
       can either guess, or view your sample image with a hex editor.
       Often it is a power of 2 (32, 128, etc).
      
\item{4} Offset of the x and y size - This is the most difficult step
       if you are unfamiliar with hex notation. If you can't make a guess,
       if you are a registered user you can send us a copy of your sample 
       image and we will determine these numbers for you. 

\item{5} The no. of primary colors (1 for grayscale or 3 for color).
    
\proclaim       Example 1: 
       Creating a file format for images from a Lumisys X-ray 
       scanner.  No sample image file is needed.

\item{1}   Select ``File...Create file format''.

\item{2} Set the following settings in the dialog box:
\medskip
\settabs 2 \columns
\+  \hskip 1 in         Target platform      &-  Mac             \cr
\+  \hskip 1 in         Bit packing          &-  None            \cr
\+  \hskip 1 in         Format Identification&-  By Extension    \cr
\+  \hskip 1 in         Extension            &-  LUM             \cr
\+  \hskip 1 in         Identifier           &-  \it(leave blank)\rm\cr
\+  \hskip 1 in         Bytes to skip        &-  2048            \cr
\+  \hskip 1 in         Use header           &-  (not checked)   \cr
\+  \hskip 1 in         Header file          &-  \it(leave blank)\rm\cr
\+  \hskip 1 in         Header bytes         &-  0               \cr
\+  \hskip 1 in         Default bits/pixel   &-  16              \cr
\+  \hskip 1 in         Default No.of colors &-  1               \cr

\medskip
\item{3}   Set the following file offsets:

\settabs 2 \columns
\+  \hskip 1 in         x size             &  -  806  \cr
\+  \hskip 1 in         y size             &  -  808  \cr
\+  \hskip 1 in         Bits/pixel         &  -  810  \cr
\+  \hskip 1 in         All others         &  -  --1 \it(or 65535) \rm  \cr

\item{4}  Then click on ``OK''. The new file format has been created.

\item{5}  Reading and creating images in the new format will now occur
          transparently. 
\medskip
          Care must be taken not to allow the offsets (which take 2 bytes 
          each) to overlap with each other or with your identifier. The 
          identifier itself cannot exceed 40 characters. If an identifier
          is specified, the image file must contain it at the specified
          offset. If an identifier is not specified, the image file must
          have the specified 3-letter file extension (``LUM'' in this case).

\it          ``Bytes to skip'' \rm must be a multiple of 2 in this case, because 
          there are 2 bytes (16 bits) per pixel. If you skip an odd number
          of bytes, the image will look strange because the light and dark
          areas are partially reversed. 
          
          Similarly, if the wrong target platform is selected, the image
          could look posterized or grainy, because the bytes are being put
          into the wrong pixels. It is sometimes necessary to experiment
          if you have an unknown image format.


\medskip
\proclaim   Example 2: Creating an IMDS file. IMDS is a little-known and rarely 
       used monochrome format similar to GEM's IMG format, except that IMDS
       was used on IBM mainframes running MVS, and there seems to be no 
       documentation for it.
    
\medskip
\item{1}  Select ``File...Create file format''.

\item{2} Set the following settings in the dialog box:
\medskip
\settabs 2 \columns
\+  \hskip 1 in            Target platform      &-  MVS   \cr   
\+  \hskip 1 in            Bit packing          &-  TIF-like \cr       
\+  \hskip 1 in            Format Identification&-  By Extension \cr
\+  \hskip 1 in            Extension            &-  IMG          \cr
\+  \hskip 1 in            Identifier           &-  (none)       \cr
\+  \hskip 1 in            Bytes to skip        &-  0            \cr
\+  \hskip 1 in            Use header           &-  $\sqrt{}$(checked)\cr
\+  \hskip 1 in            Header file          &-  \it             
(Name of a sample IMDS file) \rm            \cr
\+  \hskip 1 in            Header bytes         &-  32           \cr
\+  \hskip 1 in            Default bits/pixel   &-  1            \cr
\+  \hskip 1 in            Default No.of colors &-  1            \cr
\medskip

\item{3}   Set the following file offsets:
\settabs 2 \columns
\+  \hskip 1 in            x size               &-  12   \cr
\+  \hskip 1 in            y size               &-  14   \cr
\+  \hskip 1 in            All others           &-  --1  \it(or 65535) \rm\cr
\medskip
\item{4}  Then click on ``OK''. The new file format has been created.

\item{5}  Click on an image, or select something on the screen, and
          save it in the new IMG format (by clicking on ``Format'' then
          the last ``IMG'' item. Your sample IMDS file must always be
          present to create image files in this format.

\item{6}  Test to make sure the image is readable. Since TN-Image
          can already read this format, simply select ``File...Read'' 
          and press \it Enter \rm. If you set the above settings correctly,
          the image should appear as a black-and-white version of
          your original. 
    
\medskip
       The default bits/pixel and default no.of colors are needed only if
       the these values are not in the header. 


\proclaim       Example 3: Define a file format for raw byte images.
       
\item{1} Select ``File...Create file format''.

\item{2}  Set the following settings in the dialog box:
\settabs 2 \columns
\+  \hskip 1 in         Extension            &-  RAW           \cr
\+  \hskip 1 in         Target platform      &-  PC            \cr
\+  \hskip 1 in         Bit packing          &-  None          \cr
\+  \hskip 1 in         Format Identification&-  By Extension  \cr
\+  \hskip 1 in         Identifier           &-  (none)        \cr
\+  \hskip 1 in         Bytes to skip        &-  0             \cr
\+  \hskip 1 in         Use header           &-  (unchecked)   \cr
\+  \hskip 1 in         Header file          &-  (none)        \cr
\+  \hskip 1 in         Header bytes         &-  0             \cr
\+  \hskip 1 in         Default bits/pixel   &-  8             \cr
\+  \hskip 1 in         Default No.of colors &-  1             \cr
\+  \hskip 1 in         Default x size       &-  382 \it(substitute actual size)\rm\cr
\+  \hskip 1 in         Default y size       &-  362 \it(substitute actual size)\rm\cr
\+  \hskip 1 in         Default red bpp      &-  0             \cr
\+  \hskip 1 in         Default green bpp    &-  0             \cr
\+  \hskip 1 in         Default blue bpp     &-  0             \cr
\+  \hskip 1 in         Default black bpp    &-  0             \cr
\medskip
\item{3}  Check the file offsets to make sure they are all either --1 or
          65535.

\item{4}  Then click on ``OK''. The new file format has been created.
          Because ``by extension'' was specified, the raw image must have
          the extension .RAW to be identified. 


\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.1.9 Save FFT }
\bigskip
\hrule\bigskip
\rm

       Saves the currently-selected FFT matrix to disk in ASCII format.
       This allows you to precisely change any desired frequencies with a
       text editor, then reload the FFT and reverse-transform.
\bf       Warning:\it These files can be quite large.
\rm

\bigskip\hrule\bigskip
\bbb { 8.1.10 Erase FFT }
\bigskip
\hrule\bigskip
\rm
   
       Erases the matrix used in storing the FFT, if a Fourier transform
       has been performed on the image, thus freeing up a considerable
       amount of memory. It will not erase the Fourier transformed image
       that appears on the screen. If no FFT's have been performed, this
       has no effect.

\bigskip\hrule\bigskip
\bbb { 8.1.11  Unload image  }
\bigskip
\hrule\bigskip
\rm
       
       Removes the currently-selected image from the screen and frees up its
       memory. Also erases the image's backup and its FFT if present.
       If your image is large, and there are other images above it in RAM, 
       on rare occasions it may not be possible to free the memory right 
       away. In this case, it is occasionally necessary to select \it unload 
       image \rm a second time.  Unloading an image may take several seconds
       because TN-Image performs extensive garbage collection to defragment
       memory as much as possible after an image is unloaded.

\bigskip\hrule\bigskip
\bbb { 8.1.12 DOS Command }
\bigskip
\hrule\bigskip
\rm
       Shell to DOS to execute a command or run a different program. Or, 
       to obtain a DOS command line, enter \tt Command\rm. Type \tt Exit
       \rm to 
       return to TN-Image. DOS requires a small amount of memory below
       1 megabyte to exit commands. Thus you could get an ``insufficient
       memory'' error even if there is a lot of high memory.
       
       This function is, of course, not available in the Unix version.

\bigskip\hrule\bigskip
\bbb { 8.1.13 Quit }
\bigskip
\hrule\bigskip
\rm
       Return to operating system. If any images have been modified, you
       are given an opportunity to save them. 
       Alt-X also can be used to quit.       


\bigskip\hrule\bigskip
\bbb { 8.1.14 Load FFT }
\bigskip
\hrule\bigskip
\rm         

       Reads a Fourier-transformed image stored in ASCII format. 
       The file format is as follows:
\item{}            FFT of (image name)
\item{}            xsize (x size in pixels)
\item{}            ysize (y size in pixels)
\item{}            Real
\item{}            (Real frequencies from row 1)
\item{}            ...
\item{}            (Real frequencies from row n)

\item{}            Imaginary
\item{}            (Imag frequencies from row 1)
\item{}            ...
\item{}            (Imag frequencies from row n)

        This format differs from the format used in TN-Image prior to
        version 2.18. The header in these earlier files must be changed
        before they can be loaded.
        


\bigskip\hrule\bigskip
\bbb { 8.1.15 Acquire }
\bigskip
\hrule\bigskip
\rm         


    (Unix version only) Acquires an image from a H/P compatible scanner.
    Currently only HP-compatible scanners are supported.

\vskip  0.1 in   

    \bba Setting up a scanner \rm

\vskip  0.1 in   
    
    Here is a brief outline of the procedure for attaching a scanner in
    Linux on an x86 system. For more details, consult the \it Linux SCSI-HOWTO\rm. 
    For Sun and SGI systems, these steps should not be necessary.

\item{1}  Install a supported SCSI-2 card and H/P scanner. One combination
    known to work is an Adaptec AHA-1542CF card and H/P 4C scanner. 

\item{2} Throw away the cheap printer-type cable and the SCSI card supplied with 
    the scanner and use a good quality SCSI cable (Centronics-type connector at 
    both ends) and a good SCSI card to connect the scanner. 

\item{3} Recompile your kernel if necessary to add ``generic SCSI'' support and support 
    for the low-level driver for your SCSI card (see the \it Linux Kernel-HOWTO\rm ). 

\item{4} Shut down your system and make sure the scanner and the SCSI card
    are both properly terminated.  Set the SCSI ID of the scanner to some 
    known value less than 7. Power up the scanner before turning your computer
    back on. The scanner must be connected and powered on before booting the
    computer in order to be recognized.
    
\item{5} The SCSI card should display a message at boot-up indicating its presence.
    Most Adaptec cards can be configured for IRQ, SCSI ID, etc. at this point by 
    typing Ctrl-A during boot-up. Be warned that the card will also try to write 
    to your BIOS, which on some older computers doesn't work properly and can cause 
    a loss of your computer's configuration accompanied with various unusual beeping 
    sounds. Therefore, it is prudent to record the BIOS values
    before starting.  On some computers, after adding a SCSI card, it may take 
    several tries with cold booting before the computer will boot up again. If you
    get a message such as ``CMOS Memory size mismatch'' after installing a SCSI card, 
    power the system off and try again a few times before giving up. This is not an 
    OS or TN-Image problem but is dependent on the hardware and BIOS.

\item{6} At boot-up, if the SCSI card is recognized, you will see a message
    such as:
    
    \tt kernel: scsi0 : Adaptec 1542

        kernel: scsi : 1 host.

    \rm If your scanner is hooked up correctly, you will also see a message 
    such as:
    
    \tt kernel: scsi: type is processor

        kernel:   Vendor: HP        Model: C2520A            Rev: 3503

        kernel:   Type:   Processor                          ANSI SCSI revision: 02

        kernel: Detected scsi generic sga at scsi0, channel 0, id 5, lun 0

        kernel: scsi : detected total.

\item{}\rm If this message does not appear, the most likely cause is that the scanner 
    is not terminated or an incorrect cable was used (or, quite possibly, you don't 
    actually have a scanner). Remember the device name (in this case ``sga'').
    It may be helpful to create a link to this device named ``scanner'' in /dev. 
    

\item{7} As a last check, `` \tt cat /proc/devices \rm '' should list 
    `` \tt 21 sg \rm '' as one of the character devices.  This device will be
    listed only if the scanner device is detected at boot-up. If it is not listed,
    it may be necessary to create a device file using MAKEDEV and then 
    change the permissions on the device file. It should look something like this: 
    
\tt     crwxrwxrwx   1 root     root      21,   0 Feb  9 17:30 /dev/scanner \rm


\vskip  0.1 in   

    \bba Scanning an image \rm

\vskip  0.1 in   
    
\item{1} Select ``File...Acquire..'' and change the scanner device name, resolution,
    brightness, contrast, etc. as desired. The scanner should immediately begin
    to scan a small, temporary, preview image. (The preview image is scanned at
    50 dpi).

\item{2} The dialog box will appear again. Change the contrast, brightness,
    resolution, etc. if necessary and click on ``Image scan'' and ``OK''.  
    Although it is possible to enter any number for resolution, some
    scanners may only accept specific values, such as 50, 75, 100, 150, 300, 600, 
    or 1200 dpi. Entering a resolution inappropriate for a given scanner may result
    in the parameter being ignored by the scanner.
    
\item{3} Select a region with the mouse in the preview image to scan.  During this
    phase, the mouse is constrained within the preview image to prevent scanning
    of impossible coordinates. The selected region will be outlined with a 
    ``crawling box'' and, when the mouse button is released, scanned
    at the selected resolution and placed in a permanent image buffer.
    Additional regions may be selected and scanned as many times as desired to
    create more images. 
    
\item{4} To scan a new original, click ``Preview'' again to create a new preview image,
    or click Cancel if finished. The temporary image is automatically erased.

   \bf NOTE: Scanner support has not been tested in the Irix or Solaris versions.
   Information as to whether this works will be appreciated. The scanner interface
   is not supported in MS-DOS or ConvexOS. \rm

   \bf WARNING: \rm If TN-Image detects an unsupported type scanner, it displays
   the message: \tt

            Not an HP scanner 
            
            Continuing may cause a lockup 
            
            Do you want to continue? 

   \rm Click ``OK'' to attempt to use the scanner. 
   \it Do this at your own risk. \rm

\vskip 0.1 in

   \bf Notes: \rm
   
\item{1.} ADF, transparency adapters, and the ScanJet Button Manager on the HP5c
   are not currently supported. 

\item{2.} Not all scanners support all scanning modes. For example, the HP4c 
   handles 8 and 10-bit B/W and 24 and 30-bit color, but not 12 bit B/W or 36 bit 
   color. 
     
\item{3.} 30- and 36-bit/pixel images are stored internally as 48 bits/pixel
   but currently are handled in a pseudo-24 bits/pixel format with the low
   bits discarded. These images must be converted to 24 bits/pixel before they
   can be saved. A future version of TN-Image will correctly handle 48 bit/pixel 
   images.

\item{4.} Brightness and contrast settings have no effect on 10 bit/pixel images.   







\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.1.16 Creating, executing, and testing plugins }
\bigskip
\hrule\bigskip
\rm         

   In the event that specialized features not included in TN-Image are needed,
   it is possible to create a ``plug-in''. TN-Image can send data to an external
   program and retrieve it after processing. 

\vskip 0.1 in   
   \bf Running plug-ins \rm
   
\item{1.} Create a text file in the start-up directory named ``plugins'' containing
   a list of plugins, each on a separate line, for example,
\tt

              plugin

              /usr/local/bin/myplugin

             ./joes\_plugin

\rm

\item{2.} Select ``File...Execute plugin'' and select the desired plugin. 
   
\vskip 0.1 in   
   \bf Creating plug-ins \rm
   
   The plug-in interface is still experimental and may change slightly in
   future versions.

\item{1.} The files ``plugin.cc'' and ``plugin.h'' provide a template for 
    creating new plugins. TN-Image passes the data for all images as well as
    a large amount of configuration data to the plugin through a stream pipe,
    then reads it back afterwards. Stream pipes are used because the amount
    of shared memory in most versions of Unix is quite limited. All data 
    shown in ``plugin.cc'' must be sent back, regardless of whether it has
    been changed. In addition, it is necessary to set the flag variable
    `g--$>$changed[image\_number]' for each image that has been changed to cause
    it to be redrawn.
    
\item{2.} A message of up to 1024 characters may be sent back to the parent.
    No information should be sent to stdout. Error messages can write to stderr
    if necessary. 
    
\item{3.} The new plugin may be compiled with the command line:
    
\tt    gcc -o plugin -O3 -Wall plugin.cc  \rm
(use \tt -O2 \rm on Irix).   
   
\vskip 0.1 in   
   \bf Testing plug-ins \rm

   To debug a plug-in, create a macro containing the following line:
 
\tt executeplugin \it plugin\_name \tt 0 \rm

or equivalently,

\tt testplugin \it plugin\_name \rm

   The `0' causes the plugin to be executed in `debug mode', i.e., its stdout
   is not redirected, whereas `1' causes it to be executed normally.



   
\vfill\eject
\bigskip\hrule\bigskip
\bbc { 8.2.0  Image menu }
\bigskip
\hrule\bigskip
\rm

\bigskip\hrule\bigskip
\bbb { 8.2.1  Delete region }
\bigskip
\hrule\bigskip
\rm
 
       Erase part or all of an image or background. After selecting `delete
       region', move to one corner of the region to erase, and click and 
       drag to the other corner. This rectangular region will be set to 
       the background color. (If there is another image behind the topmost 
       image, the obscured part will be unaffected.)

       Pressing the \tt Del \rm key after selecting a region has the same effect.

\bigskip\hrule\bigskip
\bbb { 8.2.2  Crop  }
\bigskip
\hrule\bigskip
\rm

       Similar to `delete region', except erases everything except the
       currently-selected region, including  the  background  and  any
       portions  of  any  image currently visible on the screen. If an
       image is obscured by another image, the obscured  part  is  not
       cropped.
 
\bigskip\hrule\bigskip
\bbb { 8.2.3  Erase background }
\bigskip
\hrule\bigskip
\rm
  
        Removes  everything  on  the  screen  that is not a part of an
        image, and sets it to the background color.

\bigskip\hrule\bigskip
\bbb { 8.2.4  Copy/Move }
\bigskip
\hrule\bigskip
\rm
       Copies or moves part of an image or drawing to another region.
       After selecting `copy/move', click and drag on the image to select a
       region to copy. 
       The region is copied and pasted in the new location as soon as you 
       release the mouse button. If the pasted portion falls partly on an 
       image and partly on the background, the portion that falls
       on the image sticks to the image and the part that falls on the 
       background sticks to the background.

       Clicking on ``move'' additionally causes the original area to be 
       replaced with the current background pixel value.

       The mode of interaction of the moved region with the background or 
       other images can be changed by changing the ``Pixel interaction mode''
       from the ``Config'' menu.  For example, if the pixel interaction
       mode is ``subtract'' the moved region will be subtracted from
       whatever is there. (See \it Pixel interaction mode \rm below).

       The source and destination do not have to be in the same window.
       To copy or move an area from the main window to an image in another window,
       continue pressing the mouse button and move the mouse cursor to the
       new window. The copied area will be invisible while the cursor is
       outside one of TN-Image's windows and will reappear when the cursor
       moves to the new window. Copying to other programs is not yet
       supported.

       The copied region is converted to the image depth and color type
       of the destination. Thus, a region moved from a 32-bit color image
       and pasted onto a grayscale image will be converted to grayscale
       values. Pixels copied onto indexed-color images are converted to 
       the pixel value with the closest matching color so as not to disturb
       the existing colormap. The tradeoff of this is that, for indexed-color
       images, the copied region may appear slightly different from the 
       original; thus it is recommended that indexed-color
       images be converted to 24 bits/pixel before cut/paste operations.
       This remapping feature can be disabled by un-checking the ``Remap pixels''
       button in the ``copy/move'' dialog. If ``remap pixels'' is unchecked, 
       the pixels will be pasted without modification, and pixels pasted onto 
       an indexed-color image having a different colormap from the source 
       image will most likely only appear normal when the original image is 
       selected.


\bigskip\hrule\bigskip
\bba { 8.2.4.1  Chroma-keyed Copy }
\bigskip
\hrule\bigskip
\rm

       If the ``Chroma-keyed copy'' button is checked, only pixel values 
       between the specified ``Minumum opaque pixel'' and ``Maximum 
       opaque pixel'' values will be copied to the new location. Chroma-keyed 
       copying is considerably slower than opaque copying. On some computers, it 
       may be necessary to keep the cursor at the destination point for several 
       seconds after clicking to allow the screen display to catch up.
       
       You should un-click the ''Remap pixels'' button when performing 
       Chroma-keyed copies; otherwise, some of the pixels may get remapped
       into or out of the transparency range (see \it Chroma-key,  \rm Sec. 
       8.2.12.1 below), causing unexpected results. 
       
\vskip 0.1 in\noindent
       \bba Examples \rm
       
       \proclaim Example 1. Pasting a white text label onto an image. \rm
       (Note that an ordinary text label can be more easily pasted using
       the ``Label'' option).
       
       \item{1.} Select ``Color..Foreground color'' and set the color for
       the label to 255. Select ``Draw..Font..'' to change the font if desired.

       \item{2.} Move the mouse cursor to a region in the background or in
       an unwanted area of the image and type the label. The label can actually 
       be anything, including parts of images, different fonts, and graphic
       elements. 
       
       \item{3.} Select ``Copy/Move'', click ``Chroma-keyed copy'' and 
       adjust the Minimum and Maximum transparency values. For example,
       if the label contains colors 253, 254, and 255, set the minimum
       to 0 and the maximum to 252. (This assumes you are working on an
       8-bit display).

       \item{4.} (Optional). Un-click the ``Remap pixels'' button.

       \item{5.} Click Ok and select the label with the mouse. Continue pressing
       the left mouse button.
       
       \item{6.} Move the mouse to the desired location and unclick the left
       mouse button. 
       
       \item{7.} Click the ``Cancel'' button in the information area when
       finished.
       
       \proclaim Example 2. Creating and pasting a cutout image. \rm
       
       \item{1.} Select ``Image..Backup'' to make a backup copy of the image
       in case you make a mistake.

       \item{2.} Select ``Color..Foreground color'' and set the drawing color 
       to 0 (or some other color not contained in the desired region of the 
       image). (Note: if the image contains every color, it may be necessary
       to first remap one of the colors in the image, see \it Remap\rm , Sec. 8.4.5).
       
       \item{3.} Select ``Draw..spray'', select ``fine spray'', 
       click the left mouse button, and and drag the mouse cursor around
       the outside of the area to be cutout, to create a region of uniform
       color around the outside.   

       \item{4.} Select ``Copy/Move'', click ``Chroma-keyed copy'', make sure
       ``Remap pixels'' is unchecked, and set the minumum and maximum 
       opaque values to 1 and 255, respectively (This assumes you are 
       working on an 8-bit display. For a 16-bit display, the maximum 
       should be set to 65535).

       \item{5.} Click Ok and select the entire region (including the 
       blacked-out area) with the mouse. Continue pressing the left mouse button. 
       When the mouse is unclicked at the destination point, the cutout will 
       be pasted in the new location.

       \bf Note: \rm The image must be on the main window, and not in a separate
       window, before Chroma-keyed copy will work properly.       



\bigskip\hrule\bigskip
\bbb { 8.2.5  Paste }
\bigskip
\hrule\bigskip
\rm
       Selecting ``Paste'' or clicking on the main ``Paste'' button
       activates a small dialog box that selects what will
       be pasted onto what. This provides a range of options useful for 
       stenciling, adding labels, and creating mattes and composite images.
       
       \item{1} Background to transparent part of image --- copies pixels from
       the background into the image, only in regions of the image that are
       currently transparent. If transparency is ``off'', it does nothing.
       
       \item{2} Background to opaque part of image --- copies pixels from
       the background into the image, only in regions of the image that are
       currently not transparent. Note that if the chroma-key bit of the image is 
       ``on'', the image will suddenly blend in with the background and seem
       to disappear until chroma-key is turned ``off''. Conversely, if 
       chroma-key is ``off'', it copies everything behind it, obliterating 
       the original image.

       \item{3} Opaque part of image to background --- copies all pixels from the
       image onto the background unless they are transparent. This effect is 
       identical to the main ``Paste'' button in the information area.

       \item{4} Transparent part of image to background --- copies the original,
       hidden pixels from the part of the image that is transparent onto the
       background. If chroma-key is ``off'', it does nothing.

       \item{5} Stencil transparent part of image to background --- same as 
       option 4, except that the pixels are all set in the current drawing
       color to create a stencil.

       \item{6} Entire image to background --- copies the entire, original
       image onto the background, regardless of any chroma-key settings.

\vskip 0.1 in

       \bf Notes: \rm 
       
\item{1} These operations do not create any new images. If the result
       is to be saved, it is necessary to use ``File..Create/Resize object''
       to create a new image.

\vskip 0.1 in
\item{2} The ``paste'' feature can also be used to paste between parts of 
       images that are in separate windows, provided that they are
       properly superimposed.       

\vskip 0.1 in
\item{3} ``Paste'' and ``Copy/move'' do not utilize the X Window clipboard
       and cannot be used to copy between applications.


\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.2.6  Change size   }
\bigskip
\hrule\bigskip
\rm
       
       Creates a new image of a different size than the currently-selected   
       image. You can specify different size factors for the x and y  
       dimensions.  However, both x and y factors must be either greater  
       than or less than 1.0. For example, setting the x factor to 1.1 and  
       y factor to 4.78 creates a vertically elongated image. 
       
       If the  image  does  not  contain  fine  detail,  it  is  often
       convenient  to shrink the image to x and y sizes of 0.5 or less
       before saving it. Setting the x and y factors to 0.5  decreases
       the  file  size  by 75\%. Conversely, enlarging the image allows
       you to fine-tune each pixel value before shrinking it  back  to
       normal size. (Note that in this case, you will have 3 images in
       memory:  the original, the enlarged image, and the new shrunken
       modified image. It is recommended to delete the enlarged images
       as soon as they  are  not  needed,  to  avoid  running  out  of
       memory.)
 
\bigskip\hrule\bigskip
\bbb { 8.2.7  Rotate image    }
\bigskip
\hrule\bigskip
\rm
       Creates a new image identical to the currently-selected image, 
       except that it is rotated by 90�.

\bigskip\hrule\bigskip
\bbb { 8.2.8 Flip horizontally   }
\bigskip
\hrule\bigskip
\rm

       Converts  the  currently-selected  image  or  region into a 
       left-right mirror image of itself. For images > 8 bits/pixel,
       only the selected color planes are flipped. Color planes can be
       selected in the ``Config'' dialog box.


\bigskip\hrule\bigskip
\bbb { 8.2.9 Flip vertically    }
\bigskip
\hrule\bigskip
\rm

       Converts  the  currently-selected  image  or  region into a 
       vertical mirror image of itself. For images > 8 bits/pixel,
       only the selected color planes are flipped. Color planes can be
       selected in the ``Config'' dialog box.


\bigskip\hrule\bigskip
\bbb { 8.2.10   Backup   }
\bigskip
\hrule\bigskip
\rm

        Creates a backup copy of the current image in memory. This is
        recommended before manipulating the image or adding text, in
        case you don't like the results.  Selecting ``Restore'' will retrieve 
        the screen back onto the screen.


\bigskip\hrule\bigskip
\bbb { 8.2.11   Restore  }
\bigskip
\hrule\bigskip
\rm

     Replaces the current image with the backed-up copy if one exists.
     
     Note: if you change the depth of an image, the original backup is no longer 
     valid and is automatically discarded. 

\bigskip\hrule\bigskip
\bbb { 8.2.12   Image properties  }
\bigskip
\hrule\bigskip
\rm

     Sets a variety of modifiable properties for each screen object or image.
     
     \it Copy tables \rm - Copies the colormap, gamma table, or calibration
     parameters from some other image.
     
     \it Color type \rm - Sets the `colortype' flag for the image to Grayscale, 
     Indexed, or Color.  \bf Warning: \rm Changing color types is not always
     a reversible process.
     
     \it Image Number \rm - Sets the source and destination image numbers
     for the `copy tables' option.
     
     \it Image attributes \rm - Sets the title, position, image depth, and
     transparency (see Sec. 8.2.12.1) for the image.

\bigskip\hrule\bigskip
\bba { 8.2.12.2   Transparency  }
\bigskip
\hrule\bigskip
\rm

    Checking the ``Transparent'' button in the ``Image properties'' dialog
    causes pixels in the image whose values lie between the 'minimum' and
    `maximum' transparency values to be treated as transparent. This means
    that images behind the transparent image or on the background will show
    through in those regions marked as transparent.  This feature greatly
    facilitates pasting of labels and creating composite images and cutouts. 
    Clicking the ``Paste'' button in the information area at the left causes
    the opaque pixels in the currently-selected region to be pasted onto
    whatever is behind it (\it i.e., \rm onto the background or the image 
    behind the transparent image). 
    
    Copying and pasting of transparent images is also supported. See 
    ``Transparent Copy (sec. 8.2.4.1) for more information.
\vskip 0.2 in
    
    \bba Note. \rm The transparency feature is still under development and
    still has some minor limitations:
\vskip 0.1 in
    
    (1). Currently, only the raw pixel value is used in determining transparency. 
    For indexed-color images, you should sort the color palette by selecting 
    ``Color..Colormap..Sort colormap'' to achieve good results. This will not
    be necessary in future versions.
\vskip 0.1 in
    
    (2). If the image does not appear transparent after performing some
    operation, moving the image by clicking on the arrow buttons should 
    restore the transparent effect.
\vskip 0.1 in
    
    (3). No conversion between pixel types or image depths is currently
    performed by the ``Paste'' button. 

\vskip 0.1 in
    
    (4). Saving images as transparent GIF's is not yet supported. 
    
\vskip 0.1 in
    
    (5). Transparency can be quite slow with color images, because calculating
    the new pixel value requires fetching and performing calculations on the 
    RGB values for both the foreground and background. This can take up to several
    seconds for a large image. If possible, convert the image to grayscale first.


\bigskip\hrule\bigskip
\bbb { 8.2.13   Repair  }
\bigskip
\hrule\bigskip
\rm

   Re-builds and remaps the screen display for the image in case it is incorrect.


\bigskip\hrule\bigskip
\bbb { 8.2.14   3D / Frame Controls  }
\bigskip
\hrule\bigskip
\rm

   Activates the 3D control for the image. Each 3D control permits selection of
   the visible frame of one image. If the image only has a single frame, it has
   no effect. The frame may be selected manually, or the time interval between
   frames can be adjusted for a ``movie''. (\it Note: Sound is not supported.\rm)

   Click on ``Start'' to automatically change frames and ``Pause''
   to stop. The interval between frames in milliseconds can be adjusted.
   On slower computers or with large images, the actual interval may be
   larger. If frame rates are too low, it may be helpful if \tt tnimage \rm 
   is started in a screen mode that has the same depth as the image.


\vfill\eject
\bigskip\hrule\bigskip
\bbc { 8.3.0  Process menu   }
\bigskip
\hrule\bigskip
\rm

\bigskip\hrule\bigskip
\bbb { 8.3.1  Filter  }
\bigskip
\hrule\bigskip
\rm


        Modifies  the currently-selected image, or the selected screen
        region, without creating  a  new  image.  The  original  image
        should  be  backed  up  before filtering it, in case you don't
        like the results. The amount of filtering is adjustable from 1 
        to 10 (maximum).
 
        For images greater than 8 bits/pixel,  only the selected color planes are 
        filtered. Color planes can be selected in the ``Config'' dialog box.


\bigskip\hrule\bigskip
\bba { 8.3.1.1  High-pass filter (Sharpening) }
\bigskip
\hrule\bigskip
\rm

        Extracts  only  the  highest spatial frequencies in the image.
        More low frequency components are saved if a larger 'kernel' is
        selected. If the image contains few high-frequency components,
        and you selected too much sharpening, the result may appear
        dark or black. You can compensate for this by  increasing  the
        contrast of the image after filtering it.   
  

\bigskip\hrule\bigskip
\bba { 8.3.1.2 Low-pass filtering   }
\bigskip
\hrule\bigskip
\rm

     
        Low-pass filtering eliminates sharp edges from the image,
        causing a blurring effect. The total intensity is unchanged,
        but is spread throughout the neighboring pixels.    


\bigskip\hrule\bigskip
\bba {  8.3.1.3 Background subtract }
\bigskip
\hrule\bigskip
\rm

   
        This is similar to high-pass filtering except it removes only
        the lowest frequencies.  This has the effect of removing uneven 
        background in the image. As with high-pass filtering, it can
        make the image appear darker. Selecting a larger kernel removes
        less of the low frequencies, but will require much more processing
        time. A preferred method is to use the ``kernel multiplier''. 
        Selecting a multiplier of 5 with a 3x3 kernel produces results 
        similar to using a multiplier of 1 with a 15x15 kernel, but is
        many times faster. For this reason, it is recommended to set
        the kernel to 3x3 for background subtract. 
     
        You can specify whether ``black'' or ``white'' pixels should be
        considered as the background. If you select ``white'', the image 
        will generally get lighter in regions of unvarying pixel intensity.
        If the background value is ``black'', the image will get darker 
        wherever the pixel intensity does not vary. You can compensate 
        for this by increasing the contrast.

        Background subtraction will also trash any text in the image.
        
        See \it Background flatten \rm below for an alternative (and faster) way 
        to remove background gradients.
     

\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.3.1.4  Background Flatten (de-trending)  }
\bigskip
\hrule\bigskip
\rm

        This filter removes large-scale gradients from the image or
        selected region by measuring the average pixel value in each
        corner and then adding or subtracting a value to equalize the
        overall intensity. This could also be done manually, by creating
        a gradient region on the screen and adding the image to it (see 
        \it Gradient fill \rm). However, the manual method is not 2-dimensional.

        In contrast to Background Subtraction, this filter does not trash 
        text.


\bigskip\hrule\bigskip
\bba { 8.3.1.5  Noise filtering (median filtering)  }
\bigskip
\hrule\bigskip
\rm
   
        Median filtering removes extraneous pixels from the image.
        This is useful if the image contains noise which consists
        of little dots that are clearly outside the range of the other
        pixels. If a given pixel varies by more than a certain amount
        from the pixels around it, median filtering substitutes the 
        median of the neighboring pixels, thereby eliminating noise from 
        the image. The image is otherwise unaffected. The range in 
        +/- pixel 
        value units, outside of which a value is to be considered noise, 
        can be changed. A higher value results in less noise removal.
        Excessive noise filtering can make an image appear posterized. 
        A setting of 0 will create a smoothing effect.



\bigskip\hrule\bigskip
\bba { 8.3.1.6 Laplace edge enhancement  }
\bigskip
\hrule\bigskip
\rm

        This filter finds any edges in the image whose length is equal
        or greater than the kernel size. The edges are then increased
        in intensity while non-edge regions are eliminated. The effect
        on text is to create an outline of the text. 


\bigskip\hrule\bigskip
\bba { 8.3.1.7 Sobel edge enhancement  }
\bigskip
\hrule\bigskip
\rm

        This filter is similar to Laplace edge enhancement except that
        the effects are gentler. A Sobel filter enhances the color or
        intensity gradient, so that areas of constant color become black.


\bigskip\hrule\bigskip
\bba { 8.3.1.8 Edge detection and edge sharpening  }
\bigskip
\hrule\bigskip
\rm

\item{} Edge detect |         
\item{} Edge detect --      
                                 Detects and enhances edges in the image
                                 preferentially in the horizontal or
                                 vertical direction.
                              
\medskip
\item{}   Sharpen |                            
\item{}   Sharpen /             
\item{}   Sharpen --           
\item{}   Sharpen $\backslash$
           
                                 Sharpens the selected region or image 
                                 preferentially in the indicated direction,
                                 creating a `freeze-fracture' 3-D effect.
                                 This is particularly useful for images
                                 of biological specimens that have low
                                 contrast, since it highlights the overall 
                                 shape of the cells.


\bigskip\hrule\bigskip
\bba { 8.3.1.9 Adjustable parameters  }
\bigskip
\hrule\bigskip
\rm

\it       Kernel
\rm     
        The kernel is the number of pixels used in calculating a  pixel
        in the new image. The processing time needed increases with the
        square of the kernel size.

\medskip     
\it       Kernel multiply factor
\rm     
        A \it kernel multiply  factor \rm allows you to select an arbitrarily 
        large convolution kernel without an increase in computation time.
        This is possible because usually only a small sample of the  
        surrounding pixels are really needed to calculate the new pixel
        value. For most types of filters, a 3x3 kernel with a kernel 
        multipier of 3 gives the same results as a 9x9 kernel, but is 3
        times faster.  For sharpening and blurring, this doesn't work,
        and the factor is automatically set to 1.

\medskip
\it        Amount of filtering    
\rm        
        The amount of filtering applied to the image, from 1 (minimal 
        filtering) to 10 (maximal filtering).
     
\medskip
\it        Range (median filter)  
\rm        
        For  median  filters,  you can specify a range of pixel values
        outside of which the pixel will be considered to  be  a  noise
        pixel.  For instance, if the median value of all the pixels in
        a given area is 123, and the range is set  to  +/- 10,  
        then  the
        pixel will be replaced with the median value (123) only if its
        value higher than 133 or less than 113.                         
                              

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.3.2  Warp   }
\bigskip
\hrule\bigskip
\rm
      Corrects (or adds) distortion in the image. Currently works in vertical
       direction only.
       
\item{1.} Select a series of control points to define the distortion
           to be corrected. For example, if you have  an  SDS  gel  in
           which  the  bands  are U-shaped, trace out a U-shaped curve
           somewhere on the image that follows the U shape. 
       
\item{2.} Press any key. This fixes the curve in place (it becomes
           invisible).

\item{3.} With the mouse, select a y-value somewhere below the lowest 
           point in the curve which you traced out.

\item{4.} Click the left mouse button at the desired y-value.

\item{5.} Each vertical line on the screen will be shifted up or down so 
           that each point on the curve you traced out is lined up with the
           selected y-value.
           
        Future versions of TN-Image will have a more elaborate, 2-dimensional 
        distortion-removal feature. Contact the author for availability 
        dates.
                                  
        
\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.3.3   Measure...  }
\bigskip
\hrule\bigskip
\rm

\bigskip\hrule\bigskip
\bba { 8.3.3.1 Distance measurement   }
\bigskip
\hrule\bigskip
\rm

 
        Measure distance between two points. Click the left mouse button,
        move to the end point, and release the mouse. Click on the top
        menu bar or press \it ESC \rm when finished.
        
        Before making distance measurements, you can calibrate your image 
        as described in Sec.8.3.9, using ``2D linear calibration'' mode.
        This will cause the results to be in known units (such as 
        centimeters) rather than pixels.
        
        If the mouse button is clicked inside an image, the mouse is grabbed
        by TN-Image and prevented from being moved outside the image (\it Unix 
        version only)\rm. This prevents inaccurate calibration results.
        If the mouse button is clicked while on the background, or the image 
        has been calibrated in a ``1D'' mode,the results are reported in 
        uncalibrated pixel units.
   
\bigskip\hrule\bigskip
\bba { 8.3.3.2 Angle measurement  }
\bigskip
\hrule\bigskip
\rm

        Measure the angle between 2 lines. Same as distance measurement
        except you must click and drag twice. The angle is always given
        as the most acute of the two angles between the two lines.


\bigskip\hrule\bigskip
\bbb {  8.3.4  Calibrate }
\bigskip
\hrule\bigskip
\rm

       Calibrates the image or screen x and y coordinates. To calibrate
       an image, select ``New calibration'' from the menu, then click on the 
       known calibration points in your image and enter the calibration 
       values. The calibration points (which appear as small squares) can 
       be dragged to new locations if desired. When finished, press any key. 
       A dialog box will appear; select ``linear'' or ``logarithmic'' 
       calibration, and change the title if desired.  A small window will 
       appear displaying the calibrated value for the current mouse position. 
       The calibration does not have to be vertical or horizontal, but can 
       be in any direction on the screen.
              
       To end calibration mode, select ``Calibrate'' again and select 
       ``Hide calibration''. To restore the previous calibrations, select
       ``Unhide calibration''.

       Calibrating an image affects distance measurements and strip
       densitometry area calculations.

       Each image, as well as the background, can be calibrated separately
       and can have a different title. 
\medskip
      
       Four types of calibration are possible:
\item{1.}  1-D linear calibration: Measures the distance from a line 
           perpendicular to the best-fit line passing through your calibration
           points. This calibration is useful for images of isoelectric
           focusing gels, or other situations where the distance in one
           direction is the parameter of interest.
\item{2.} 1-D logarithmic calibration: Same as (1) except distances are
           logarithmic (For example, if 10 pixels corresponds to 1 unit of 
           distance, 20 pixels would be 10 units, and 30 pixels would be 
           100 units). This calibration is suitable for acrylamide and
           agarose gel electrophoresis images.
\item{3.} 1-D 2nd-order polynomial calibration: Same as (1) except 
           distances are fitted to a quadratic equation. Not really very
           useful, but it was easy to program.
\item{4.} 2-D linear calibration: Distances are calculated as the distance
           from the point (0,0). This calibration type is suitable for
           calibrating to objects of known size on the image (Sec. 8.3.4),
           for example if a ruler was included in the image.
       
\proclaim
       Example 1: Calibrate an SDS-PAGE gel for molecular weight
       standards.

\item{1.}  Select ``New calibration''.
\item{2.} Click on ``OK'' to start calibration.
\item{3.} Click on each size standard in the image, then enter the
           corresponding molecular weight. Each point will be shown by a
           small box. If you make a mistake, you can go back and drag
           any of the boxes to a new location. A best-fit line is 
           automatically drawn connecting the boxes. Make sure that this 
           line is in the same orientation as the lanes in your gel 
           (i.e., vertical or near vertical if your lanes are straight).
\item{4.} When finished, press a key. The boxes and line will disappear.
\item{5.} Select ``logarithmic'' calibration from the dialog box.
\item{6.} Change title to ``Molecular weight'' (optional).

\item{7.} The molecular weight is now displayed continuously. You can
           move the display window to any location by clicking on its edge
           and dragging to the new location.

\proclaim     
       Example 2:
       Calibrate coordinates on the image to centimeters using a ruler
       in the image.
       
\item{1.}  Select  Process...Calibration...New Calibration.
\item{2.}  Click  OK.
\item{3.} Click on the ruler markings on the strip in your image.
            A small box indicates the calibration point. Move the box by
            clicking-and-dragging if necessary. After releasing the mouse
            button, enter the centimeter value. Repeat for at least 2 more
            calibration points. The program uses least squares calculations
            to find the best calibration fit to your points.
\item{4.}  When finished, press \it ESC \rm.
\item{5.} Select ``2D Linear'' from the menu, change the title to 
            ``Centimeters'', and click OK.
\item{6.}  The image is now calibrated. Each image, as well as the 
            background, can have a different calibration. The distance is 
            measured as the distance from 0,0 as defined by your
            calibration points. You can now perform calibrated distance 
            measurements.

                              
 

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.3.5  Spot Densitometry  }
\bigskip
\hrule\bigskip
\rm


       Performs densitometric analysis on parts of the image. 
       See also \it Strip densitometry \rm.
       For a tutorial, view the image DENSITOM.PCX.
                               
       In  high-color and true color modes, the image is treated as a 15,
       16,or 24-bit deep monochrome image during densitometry. This is  
       the traditional method of densitometric analysis (as opposed to 
       analyzing each color separately). \bf WARNING: \rm 
       If a monochrome or 8-bit
       image is converted to color, the original correspondence of pixel 
       values to optical density (if one existed), may be lost. 
                               
       Pixel compensation - If checked, this will cause TN-Image to use
       in  its  calculations  the  actual  optical  density value that
       corresponds to each pixel, instead of the raw pixel value. This
       information is often provided by digital scanners in  the  form
       of a `gray response curve' that is embedded in the TIF file. It
       is  recommended  that pixel compensation be checked 
       $\sqrt{}$ for all
       densitometry.
       
       Pixel compensation is not applicable for color (15,16,24, or
       32-bit/pixel) images.

\medskip
\it       Maximum signal 
\rm   - Selects whether pixel value corresponding to
       `black' or `white' (0 or 255 in 8 bpp mode) is to be considered 
       the strongest signal. If you have an image of a protein gel,  
       for instance, the bands appear black and maximum signal should 
       be set to ``black''. For DNA gels, the bands appear white and 
       maximum signal should be set to ``white''. 

\bf       NOTE:
\rm    Selecting ``Black'' as the maximum signal will cause the 
       reported values to be calculated as 1 - (measured value). Thus,
       if the average uncorrected pixel intensity of a spot is 0.25,
       the density (with ``pixel compensation'' off) will be 0.75.
\medskip

\it       Area selection
 
       - Automatic: 
\rm      Automatically finds the boundary of
         the region. Move to a point near the middle of the region  to
         be analyzed  and  click  the left mouse button. TN-Image will
         automatically determine the boundaries  of  the  area  to  be
         densitometrically  measured.  This boundary is defined by the
         set of contiguous pixels whose value is between  the  maximum
         value (which can be selected above as ``black'' or ``white'') and
         the background value (which can be selected to any value). It
         is  important  that  there  is no unbroken trail of pixels in
         this range that  extends  out  of  the  region  of  interest,
         otherwise  an  area  larger  than desired may be selected. As
         long as you continue clicking, new areas will be selected and
         analyzed. To stop densitometric analysis, either click on the
         right mouse button, or click somewhere on the menu bar at the
         top of the screen. If the background is set  inappropriately,
         the  quantitated  region  may  be too small or too large. The
         densitometric operation can be aborted by pressing the  \it ESC \rm
         key.
       
         If there is no clear boundary around the region of interest,
         the region can be traced out beforehand by sketching a black 
         or white border around it.
       
\it       Manual: 
\rm      In this mode, you must select (by clicking and dragging) 
         a rectangular region to be analyzed each time. 
          
\it       Fixed size:
\rm      In this mode, you select (by clicking and dragging)
         a rectangular region the first time. From then on, as long
         as densitometry is active, when you click on a point, a
         region of size and shape identical to the first region will
         be analyzed. This region will be centered at the point where
         you click.
         
\medskip                            
\it       Background 
\rm    -  Select the fractional pixel value (between 0 and 1) which is to be 
          considered the `background level'. The background level is important
          in automatic area selection as described above. The background
          value can also be automatically subtracted from the results
          if desired.
                               
\it       Calibration factor 
\rm - If a value is entered here, the result is
         multiplied by that number. This is useful in converting to 
         micrograms of protein, for example, on an image of an SDS gel.
 
\it       Subtract background - 
\rm     If checked, the background value will  be
         automatically subtracted from each pixel during calculations.

\medskip      
       After each analysis, a message box appears with the results.
       This is : (1) The area (total number of pixels) analyzed; (2) 
       The total signal measured (either in total pixel values or total 
       O.D. units, depending on whether pixel compensation is active); 
       (3) The average signal, i.e., the quotient of (2)/(1); (4) The 
       corrected total signal - background. For most purposes, including 
       gel analysis, the number of interest is (2) or (4), because you 
       need to measure the total amount of absorbing (or fluorescing) 
       material in the entire band. For other purposes, you may be more 
       interested in the signal density or concentration per unit area 
       on the image. The area is of interest in photomicrographs.
  
\bf       NOTE: \rm See the warning under \it Contrast \rm.

\bf       WARNING: \rm Pixels beyond the edges of the screen are not included
       in the area or density calculations. 
    


\bigskip\hrule\bigskip
\bba { 8.3.5.1 Area measurements  }
\bigskip
\hrule\bigskip
\rm

       Making area measurements:
\item{1.} Before starting, obtain a histogram on the image to find the
          desired background value for use with automatic spot detection
          (select ``Color...Histogram''). Alternatively Use ``Draw...Sketch'' 
          before starting, and completely encircle the objects to be 
          measured with a white line. Outlining the objects manually
          will obviate the need to select an appropriate background value.
\item{2.} Select ``Image...Spot densitometry''. Leave all the settings at
          their defaults except for the Background Value. 
\item{3.} If you wish TN-Image to identify the spot automatically, set
          the background value to the pixel value that corresponds to the
          brightest pixel in the background. Otherwise, if you have outlined
          the regions beforehand, set the background value to any large
          number (for example, if you outlined the areas with white 
          (=255), set the background to 254).
\item{4.}  Click on OK, then click again to dismiss the message box.
\item{5.}  Click anywhere inside the object to measure. The area being 
          measured will temporarily be painted in black, then a list box
          will appear displaying the area.
\item{6.}  Click on the background (or the upper left corner of the list box)
          to hide the list box. Then click on the next object to measure.
\item{7.}  Press \it Esc \rm when done.
       

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.3.6  Strip Densitometry  }
\bigskip
\hrule\bigskip
\rm

    See also  \it Spot densitometry \rm
     For a tutorial, view the image file DENSITO2.TIF.

     Strip densitometry is not as exciting as it sounds. It is similar to 
     spot densitometry, but is easier 
     to perform and interpret because it is not necessary for TN-Image 
     to find the edges of the object.

    
     If the image has been calibrated, moving the cursor over the plot 
     area of the graph causes two different x-values are printed. The
     upper x value is the data point number, and the lower x value is 
     the calibrated value for the center pixel of the line along which
     the strip densitometry was performed. If the image has not been 
     calibrated, the two x values will be identical. Clicking-and-
     dragging within the plot selects a portion of the graph for area
     calculation. The selected area is highlighted in reverse color. 
     If the image has been calibrated, this area (printed at the lower 
     right of the graph) is also calculated from the calibrated values.


     To obtain a densitometric tracing of a trapezoidal region, select 
     ``Strip densitometry''  from the ``image'' menu. Do not confuse this 
     option with obtaining a scan from a scanner, which would require 
     a hardware interface, which is not provided with TN-Image. The
     options are:
\medskip
           
\item{} \it  Select coordinates \rm
                               - If `select coordinates' is checked, you must
                                select the region to scan each time.
                                
\item{}  \it    Repeat prev. scan \rm
                              - If `repeat previous scan' is checked, the same 
                                region as the last time will be 
                                re-scanned without you having to select it.
                                This is useful if you modified the image in
                                some way, such as by filtering it, in order
                                to see the effects on scanning.
     
\item{} \it     Maximum signal  \rm
                         - select whether a ``black'' or ``white'' pixel is to
                           be regarded as the most intense value. Note:
                           in 8 bit/pixel modes(monochrome/indexed color),
                                this will be affected by the optical density
                                table which is often included in TIF files, 
                                if `pixel compensation' is set to `on'. 
                                Most scanners set their optical density 
                                table so that `0' is the maximum optical
                                density. (To find out whether your image
                                file has an O.D. table, select ``Configure...
                                Show O.D. table''.)
                                
                                
\item{} \it     Pixel compensation \rm
                         - if set to `on', the optical density table in
                           the image file is used to correct the pixel
                            values from a range of { 0,255 } to values
                                that are proportional to the actual optical
                                density of the original image. This table is
                                usually generated by a scanner and is found
                                mainly in TIF files. 
                              It is recommended to set pixel compensation to
                                `on' when analyzing images from a scanner. 
                              This setting is automatically turned ``off'' in
                                the color modes, because these modes have 
                                enough dynamic range that a gray scale table
                                is not needed. 

\item{}  \it   Scan type  \rm
                              - This option determines what type of region you
                                can select for scanning. Selecting `snap to
                                90 ${\deg}$ ' causes the starting and ending edges of
                                the scan to ``snap'' to either vertical or 
                                horizontal, whichever is closest.  This is 
                                fastest because it does not require any of the
                                anti-aliasing calculations which are needed 
                                when you scan diagonally. However, if your 
                                image contains objects that are oriented 
                                diagonally, some resolution would be lost in 
                                the scan because the objects will be scanned 
                                at an angle to their true orientation.

                                  The first two points always determine the
                                orientation of scanning. Scanning is always
                                done along a line parallel to these 2 points.
                                The 3rd and 4th points determine the direction
                                and shape of the region to scan. The area 
                                being scanned is indicated by a sweeping
                                wave of temporarily inverted pixels.

                                  Selecting \it permit diagonal scan \rm allows you
                                to select any trapezoidal area with no 
                                restrictions on the starting angle. However,
                                the angle of the far side of the trapezoid is
                                always adjusted to make it parallel to the 
                                starting side. This avoids confusion that 
                                would otherwise be caused by having a small 
                                `tail' at the end if the starting and ending 
                                sides were not parallel. 

                                  Because of the grid nature of the screen, 
                                this option is slower because it is
                                necessary to correct for `aliasing' caused
                                by pixels being at unpredictable distances
                                from the starting point. However, you can 
                                scan objects that are oriented in any direction. 
                                To compensate for the slower speed,
                                the pixels are no longer inverted as they
                                were in earlier versions of TN-Image.

                                  \it Fixed width \rm only requires that you select
                                the two end points instead of 4. Densitometry 
                                is performed in a rectangular region between 
                                the two points using the specified width in 
                                pixels (which can be 0 to 200). If the region 
                                is not perfectly vertical or horizontal, 
                                anti-aliasing is performed.

                                  This method is the most useful for obtaining
                                results which need to be compared to each 
                                other, or when the density of a very narrow
                                region (such as a line) is desired. Of course,
                                a narrower region will tend to be noisier
                                than a wide one.

                                  \it Fixed width \rm densitometry is slower than 
                                the other two methods because more floating
                                point calculations and memory accesses are 
                                needed. However, it may be more accurate.
                                Using fixed-width densitometry with a width of
                                1 gives a ``transept line''.

\bigskip
                                
     Options
\medskip

\item{}  \it      Automatically save scan
\rm                            - If this option is checked, each scan will 
                              automatically be saved in an ASCII file.  
                                
\item{}  \it      Filename for scan  
\rm                         - A default filename of ``1.scn'' is provided.
                              If the 1st 8 characters of the filename 
                              consist entirely of digits, the program will 
                              automatically increment the filename after 
                              each scan (For example, if the starting 
                              filename was `` 1000.dat'', subsequent scans 
                              would be saved under 1001.dat, 1002.dat, 
                              etc.). If the filename contains letters, 
                              the filename must be typed in each time.

\item{}  \it      Plot results   
\rm                         - If checked, the scan results will
                              automatically be plotted on the screen
                              after each scan. Clicking the ``OK'' button
                              on the graph makes the graph disappear and
                              returns you to scanning mode. The graph is
                              always automatically scaled in the Y
                              direction to fill the entire box. When the
                              graph is visible, the data can be saved to
                              disk, a background curve can be subtracted
                              from the data, or the graph can be captured
                              into a new image (See ``Plotting densitometry
                              results and other data'').
                                
\item{} \it       Pause to show region- 
\rm                           If checked, the program pauses after drawing
                              the 4 boxes, allowing you to verify that you
                              selected the correct region. Press a key to
                              continue.
                                                      

\medskip
\bf       Procedure:
\rm

\item{1.}  Select ``Image...Strip densitometry'' from the menu.

\item{2.}  Click on ``Maximum signal=black'' or ``Maximum signal=white'' depending
          on whether the features of interest are darker or lighter than
          the background.

\item{3.}  Click on ``Snap to 90 $\deg$'' , ``Diagonal scan'', or ``Fixed width''
          (see above). If you select ``Fixed width'', enter the desired width
          in pixels.

\item{4.}  Click on ``OK'', then click anywhere to start.

\item{5a.}  Click once on each corner of the rectangular area to be scanned,
          in a clockwise direction, so that 4 boxes appear on the screen.
          The region will be scanned from the first 2 to the last 2 boxes.

\item{5b.}  For 'Fixed-width' densitometry, click at the center of the starting
          and ending points, so that 2 boxes appear on the screen.

\item{6.}  If any of the boxes are in the wrong position, or the lines 
          connecting them are crossed, click and drag the boxes to the
          correct position. (NOTE: if the lines are crossed, the algorithm
          automatically swaps the coordinates to un-cross them).

\item{7.}  Press any key, or click anywhere to start scanning. The scan 
          results will be automatically plotted if ``plot results'' is checked.
          The densitometry scan can be saved to disk or captured into a
          new image from the plot window.

\item{8.}  Click on ``Save to disk'' to save the densitometry tracing in an
          ASCII file.

\item{9.}  Click on ``OK'' to scan the next region, or press \it ESC \rm or click
          the right mouse button to stop.     

\bf       NOTE: \rm See the warning under \it Contrast \rm.
          
   

\bigskip\hrule\bigskip
\bbb { 8.3.7  Plotting densitometry results and other data  }
\bigskip
\hrule\bigskip
\rm

      There are several useful options available
       in the plot mode: 
\medskip

\it      Save to Disk
\rm    --
       Saves the currently-displayed graph into an ASCII file.
       
\medskip
\it       Smooth
\rm    --
       Performs Gaussian smoothing on the data being displayed.
       
\medskip
\it       Auto Baseline
\rm    --

       Automatically calculates an optimal curved baseline and
       subtracts it from the data. The smoothness of the calculated
       baseline can be changed by clicking on ``BL smoothness''. The
       calculated baseline is displayed for 1 second before
       subtracting it.
       
\medskip
\it       Manual Baseline
\rm  --

       Allows you to select a baseline manually. Click at several
       locations on the graph where you want the baseline to go. Small
       squares will appear to indicate where you clicked. You can
       click-and-drag these squares to move them. When finished, press
       a key to subtract the baseline. The baseline curve is constructed  
       using a B-spline (see `B-spline curve'). The squares can be anywhere 
       on the screen, and do not have to be inside the plot. Also, you can 
       subtract a baseline from only a portion of the data by placing boxes 
       only under the portion you wish to change.  However, any negative
       numbers  created  by baseline subtraction are truncated to 0's.
       Up to 200 boxes (`control points') can be used.
       
\medskip
\it       Capture Image
\rm  --
       
       Clicking `capture' allows you to capture all or part of the
       graph into a new image. After clicking on `capture', use the
       mouse to select the desired portion of the graph. A new image
       which includes that region is then automatically created. The
       new image is put into the background, behind the image you are
       currently scanning, so that you can continue with the next
       scan.


\medskip
\it       Help
\rm  --
       Calls a help screen.
       
\medskip
\it       OK
\rm       --
       Ends plotting, returns you to densitometry mode.
 

\bigskip\hrule\bigskip
\bba { 8.3.8  Peak Areas  }
\bigskip
\hrule\bigskip
\rm


       Finds the x and y coordinates of each peak and  calculates  the
       peak  area.  The  integration  limits  are shown as short black
       lines on either side of each peak. No baseline  subtraction  is
       carried  out  before calculating peak areas. Thus, best results
       are usually obtained  if  you  first  subtract  a  baseline  by
       clicking on `Auto.baseline' or `Manual baseline'.
                                   
       When the list of peaks is displayed, most of the click buttons
       on the left side of the plot are still active, but now apply to the 
       peak list. This includes:

\hskip 2 in                      Save to disk    

\hskip 2 in                      Capture image

\hskip 2 in                      Help

\hskip 2 in                      OK

       The other buttons (`peak areas',`smooth', `manual baseline', and 
       `auto baseline') are inactivated while displaying the list.
       
       You can also close the peak area list by clicking on the `-' symbol 
       in the upper left corner.                 
      
\it       Area calculations:  
\rm    While the graph is displayed, you can also 
       manually measure peak areas by selecting the desired region 
       of the graph. To select a region, click with the left mouse
       button and drag horizontally within the graph area. When the
       mouse button is released, the total area of the selected region
       is automatically displayed.




\bigskip\hrule\bigskip
\bba { 8.3.9  Trace curve  }
\bigskip
\hrule\bigskip
\rm


     If you have an image of a graph, chromatogram, etc., TN-Image can
     convert this into an ASCII file. Currently, TN-Image only traces
     in 1 dimension, and from left to right. Contour tracings will be
     implemented later. 
     
\it     Procedure:
\rm   
  
\item{1.}  First, clean up the image to remove any stray specks, labels, or
        other points that could be confused with the graph. The entire
        image must be clean, including the edges. The trace will jump 
        to the darkest y-value point for each x value, regardless of where 
        it is located on the image, even if it is not visible on the screen.
        Use ``Paint region'' if necessary to eliminate white areas from the
        image.
\item{2.} Select ``Image...Trace curve''.
\item{3.} If you want the trace to be saved automatically, check ``Save trace''.
\item{4.} If you check ``Plot trace'', the data will be displayed. You will then
        be able to click on the ``Save'' button to save it. While the graph
        is visible, you can smooth it, subtract a background, measure
        areas, etc. (See ``Plotting densitometry results'').
\item{5.} Find the pixel value of the curve to trace by moving the mouse onto
        the desired area.  The pixel value is displayed in the information box 
        on the left after ``i=''.  Set ``Color to track'' to this value.
\item{6.} Click on ``OK'', then move the mouse cursor to the left end of the 
        curve and click the left mouse button.

\medskip
     A cross-hair cursor indicates what is being traced out. 
     Click on ``Cancel'' when finished.
     
     Sometimes, sharpening or thresholding the image can improve the 
     tracing. If there are extremely sharp corners in the image, it may 
     be necessary to manually create a channel between the ascending and
     descending parts of the peak to force the trace to follow to the
     top. This can be done by selecting ``Draw'' from the menu, or pressing 
     \it F2 \rm (=manual draw), and carefully moving around with the cursor keys 
     (Be sure to back up your image before starting).
     
     Checking ``Debug'' waits for a keypress after each x increment (in the
     DOS version) and prints the x, y, and the pixel value being tracked. 
     This is helpful if stray noise pixels are accidentally getting included 
     in the scan. 
     In Unix, it is possible to get a file containing this debug information
     by starting tnimage with the command \tt tnimage > debug.file \rm.

     Only pixels on the selected image are included in the trace. Thus,
     in order to trace something in the background, you must convert it
     to an image first (use ``File...Create/resize image'').  The tracing
     algorithm tracks whatever pixel is closest to the selected tracking
     color for each x value. Thus, if the image contains a pixel closer to 
     the tracking color than any pixels on the curve, the cursor 
     will jump to this area instead of tracing your curve. If the pixel
     is beyond the edge of the screen, the cursor will jump to the edge 
     of the screen. If this occurs, it will be necessary to delete the 
     offending area before tracing anything (The ``backspace'' key is the 
     most convenient way to do this).
     



\vfill\eject
\bigskip\hrule\bigskip
\bbb {  8.3.10  Mathematical pixel operations (Image Algebra) }
\bigskip
\hrule\bigskip
\rm


        Although it is possible to add or multiply pixel values by any 
        factor by using the ``brightness'' or ``contrast'' menu items, 
        TN-Image also has a more powerful tool -- mathematical pixel
        operations.                      
 
        Using the ``math'' menu, you can enter any mathematical formula
        to transform each pixel value in one pass. This formula could
        be any legal mathematical equation consisting of constants, 
        variables, and operators from the following list:
 
\it        Constants 
\rm    -  any real number (floating point or integer)

\it        Variables 
\rm            -  one of 4 pre-defined variables:

\hskip 2 in                        i  =  intensity (total pixel value)

\hskip 2 in                        r  =  red component of the pixel   

\hskip 2 in                        g  =  green component of the pixel 

\hskip 2 in                        b  =  blue component of the pixel  


\it        Operators -    
\rm

\hskip 2 in                        () =  parentheses
 
\hskip 2 in                        *  =  multiplication

\hskip 2 in                        /  =  division

\hskip 2 in                        +  =  addition

\hskip 2 in                        --  =  subtraction

\it       Integer operators -

          NOTE: The operands are truncated to integers before integer operators
          are applied. 
\rm          

\hskip 2 in                       \^ \- =  bitwise XOR

\hskip 2 in                       \&  =  bitwise AND

\hskip 2 in                       $ | $ =  bitwise OR

\hskip 2 in                        \~ \- =  bitwise NOT

        
\it        Single parameter functions
\rm

\hskip 2 in      sin cos tan 

\hskip 2 in      sinh cosh tanh 

\hskip 2 in      asin acos atan 

\hskip 2 in      sqrt  abs 

\hskip 2 in      log \it (natural logarithm) \rm 

\hskip 2 in      ln \it (natural logarithm) \rm

\hskip 2 in      log10 \it (base 10 logarithm) \rm 

\hskip 2 in      exp 

\hskip 2 in      pi 

\hskip 2 in        rand \it (random number based on specified seed, scaled 0-255.0)


\it      The following 4 functions are only available on Linux:
\rm
        
\hskip 2 in        asinh 

\hskip 2 in        acosh 

\hskip 2 in        atanh 

\hskip 2 in        cbrt \it (cube root) \rm


\it        Two-parameter functions
\rm

\hskip 2 in        max 

\hskip 2 in        min     

\hskip 2 in        pow \it (pow(x,y) = x raised to the power y) \rm
  
  
        For example, if you entered the following equations:

\hskip 2 in                    r=r+3

\hskip 2 in                    g=(r/4)+1.2345

\hskip 2 in                    b=g--pow(b,2)

        each pixel would have its red component increased by 3, its
        green component would be set equal to red/4 + 1.2345, and blue
        would be set equal to green minus (blue squared).
        
        To edit the equation, use the mouse or arrow keys to highlight
        the desired row. Press \it Enter \rm and edit the equation. Click on
        \it OK \rm or press \it Enter \rm again when finished. 
        
        To perform ``gamma correction'' to your image, enter the following
        equations:

\hskip 2 in                    r = pow(r,1.8)

\hskip 2 in                    g = pow(g,1.8)

\hskip 2 in                    b = pow(b,1.8) , 

        where 1.8 is the gamma correction factor.  For monochrome, a higher
        value (e.g., 2.35) is often used.
                    
        To eliminate all pixels below 100 and above 200:

\hskip 2 in        i = min(200,max(i,100))
        
\vskip 0.2 in
\bba Using data from other images\rm
\vskip 0.1 in
    
        Mathematical operations can also be performed using data from other
        images, other frames, or other regions in the same image using the [][][][]
        operator:

\vskip 0.05 in
\it Unix version: \rm

\hskip 2 in                 image[image\_number][frame][x][y]

\hskip 2 in                 red[image\_number][frame][x][y]

\hskip 2 in                 green[image\_number][frame][x][y]

\hskip 2 in                 blue[image\_number][frame][x][y]

\vskip 0.05 in
\it DOS version: \rm

\hskip 2 in                 image[image\_number][x][y]

\hskip 2 in                 red[image\_number][x][y]

\hskip 2 in                 green[image\_number][x][y]

\hskip 2 in                 blue[image\_number][x][y]

\vskip 0.05 in

        where:
        
\vskip 0.1 in
         \it image\_number \rm is the number assigned to the source image by 
        \tt tnimage \rm (This number may change unexpectedly when images 
        are unloaded).
        
        \it frame \rm is the frame number of the source image (3D images only). 
        For non-3D images, the
        frame number must be 0. It may be convenient to create an image with 2 or 
        more frames to hold intermediate calculations. By default, no intermediate 
        values are stored; therefore, an equation such as
        
\hskip 2 in                 i = image[0][0][x-1][y-1]
                 
        will overwrite its own source data.
 
        \it y \rm and \it x \rm are the coordinates of the source pixel.  
        The coordinates are relative to the upper left corner of the source image. 

\vskip 0.1 in
        All numbering of frames, images, and x and y coordinates starts with 0.
        An invalid coordinate, frame, or image does not cause an error but returns
        a value of 0.0. The formula is iterated over every (x,y) in the selected
        destination image or region.

        If this form is used, all 4 bracketed parameters must be specified even 
        if only one frame exists.  

        Since 3D images are not supported in the DOS version, only the image number
        and x and y coordinates need to be specified.
        
\vskip 0.2 in
        \it Example: \rm Subtracting 2 images with a small offset and increase the
        brightness of the result by a factor of 2.5.
        
        1. Click on destination image. (Assume source image is \#1).
        
        2. Select ``image math''.
        
        3. i=2.5*(i-image[1][0][x-2][y-2])

\vskip 0.2 in
        \it Example: \rm Making all the pixel values in image \#0 an even number:\par
        \tt i=image[0][0][x][y]\&254


\rm\vskip 0.2 in
        Mathematical formulas may also be entered in the macro editor as single-line
        formulas such as

\hskip 2 in            \tt  math \it formula

\rm      or multiple line formulas such as:

\hskip 2 in            \tt  math 1   \it (starts image math mode)

\hskip 2 in            \it  formula1

\hskip 2 in            \it  formula2

\hskip 2 in            \tt  ...

\hskip 2 in            \tt  math 0    \it (ends image math mode)

\hskip 2 in            \tt  ... \it other macro commands \tt ... \rm

        This has the advantage that multi-line formulas may be used and
        saved to disk or copied from the X Window clipboard using the mouse.


\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.3.11  Transform (FFT)  }
\bigskip
\hrule\bigskip
\rm

                  
        Performs a Fast Fourier Transform on the image or selected
        region. This can use a lot of memory because the frequencies are 
        stored as double-precision complex numbers, which require 16 
        bytes for each pixel. Thus, an FFT is 4 times as expensive as 
        a 32-bit image. Additionally, the mathematics of the FFT requires 
        that the image be first enlarged so that each dimension is the next
        higher power of two. For example, if your image is 129 x 67 pixels, 
        TN-Image has to create a new buffer of 256 x 128 pixels (524,000
        bytes) to carry out the calculations.
        
        The FFT result is a matrix which is displayed as a new 128 bit/pixel 
        image. This new image can be saved, unloaded, annotated, filtered, 
        and manipulated like any other image. Any changes you make
        to this image (such as adding text) are also converted to the 
        appropriate floating point numbers and inserted at the appropriate 
        position into the displayed component (real or imaginary) of the 
        FFT matrix. Therefore, changing pixels on the displayed image could 
        change the real component of the FFT, the imaginary component, or 
        both. After editing the image to enhance or eliminate specific 
        spatial frequencies, you can then perform a reverse FFT to obtain 
        the filtered result. 
        
\medskip\it
        Forward/Reverse/Change display only            
\rm    
                       
        Selects whether to carry out a forward or reverse FFT, or to
        merely change which component (original image, imaginary, real, 
        or power spectrum) is being displayed. No actual change is made 
        to the FFT data.
       
        
\medskip\it        Real/Imaginary/Power spectrum     
\rm        

        Selects whether to display the real, imaginary, or power spectrum 
        component of the transformed image, or only the original image.
        
\bf        NOTE: 
\rm     If you select ``imaginary'' or ``power  spectrum'', the displayed 
        image will appear black if you perform a FFT followed by a reverse 
        FFT. This is because the original data do not have an imaginary 
        component. The original data are not lost!
                           

\medskip      
        Although a complete description of the many applications of
        FFT's and deconvolution is beyond the scope of the manual, there 
        are a few TN-Image- specific points worth remembering:

\item{1.}  Regardless  of  the  screen  mode  or color depth of the
        image, the FFT and deconvolution algorithms treat  all  pixels
        as  monochrome.  Thus, a 24-bit/pixel image is treated as a 24
        bit deep grayscale image. In other words, the colors  are  not
        deconvoluted separately in the current version of TN-Image.

\item{2.} The grayscale mapping algorithm sets the most negative 
        FFT result to black and the most positive FFT result to white.
        Thus, zero will be some shade of gray.
                           
\item{3.} Editing  power  spectra will lead to unpredictable results 
        in your image. 
                   
\item{4.} Select ``About...About the image'' to view some of the FFT
        parameters. These include:

\hskip 1 in         Minimum FFT value (which is mapped to black)

\hskip 1 in         Maximum FFT value (which is mapped to white)

\hskip 1 in         FFT=0 color value (the color to which FFT values of zero are mapped)

\hskip 1 in         FFT=0 RGB values (the corresponding red, green, and blue components 
           of the FFT=0 color value).
 
\hskip 1 in        These  numbers can be used to calculate the color values needed
        to edit the image in the frequency domain to remove or accentuate  
        specific fequencies. The filtered image can then be reverse-
        transformed to obtain the result.

\vfill\eject
         
\item{5.}  FFT's are displayed in the conventional manner,  i.e.  with
        lowest  positive  frequencies  at  the  top  and  left,  lowest
        negative  frequencies  on  the right and bottom, and Nyquist in
        the center, with the exception that only the real or  imaginary
        components are shown, as illustrated in the diagram below:
        

% In the table below, any text inside the vbox has to be a superscript
% to prevent descenders from adding a space in the box.
% Unfortunately, it is impossible to select the size of a superscript.
% Also, you can't have labels outsize the box.

\rma
\def\va { \vrule height .4 cm }
\def\vb { \vrule height .6 cm }
\def\v { \vrule height 1 cm }
\def\vv { \vrule height 2 cm }
\def\vvv { \vrule height 3 cm }
\def\hhhhhhh { \hrule width 7 cm }
\medskip              % sets ``horizontal mode''
\settabs \+ \hskip 3.5 cm & \hskip 2.5 cm & \hskip 1 cm & \cr
\moveright 1 in
\vbox
{   \offinterlineskip
    \hhhhhhh
    \+ \vb $^{0,0 Frequency}$ & \vb     & \vb         & \vb \cr        % .6 cm vertical lines 
    \+ \va                    & \va     & \va         & \va \cr        % .4 cm vertical lines 
    \+ \v                     & \v      & \v  \hfil a & \v  \cr        %  1 cm vertical lines 
    \+ \v                     & \v      & \v          & \v  \cr        %  1 cm vertical lines 
    \+ \va                    & \va     & \va         & \va \cr        % .4 cm vertical lines 
    \hhhhhhh                                                           %  7 cm horizontal line
    \+ \vb         & \vb $^{Nyquist}$     & \vb         &  \vb  \cr    % .6 cm vertical lines
    \+ \va         & \va $^{Frequency}$   & \va         &  \va  \cr    % .4 cm vertical lines
    \+ \v          & \v                   & \v \hfil a  &  \v  \cr     %  1 cm vertical lines
    \+ \va         & \va                  & \va     z   & \va  \cr     % .4 cm vertical lines 
    \hhhhhhh                                                           % 7 cm horizontal line    
    \+ \va \hfil a & \va   \hfil a        & \va \hfil a & \va  \cr     % 0.25 cm vertical lines
    \+ \vb         & \vb                  & \vb         & \vb  \cr     % 0.75 cm vertical ines
    \hhhhhhh                                                           % 7 cm horizontal line   
}

\bigskip
\rm
  In this diagram, 'z' marks the lower right corner of the original image.
  The 0,0 frequency is in the upper left corner, and the f=0 frequencies run vertically
  along the left and top edge, from f=0, f=1/N, ... f=n, f=-n, ... f= -1/N. 
  

  If the x or y size of the image is not a power of 2, the portion of the FFT from the
  original size of the image up to the next power of 2 is not visible in the displayed
  result.  These regions, which consist of the lowest negative frequencies, are marked 
  'a'. The Nyquist frequency will also be off-center in this case. It is
  possible to change the image size to make its dimensions a power of 2 before calculating 
  the FFT with the ``File...Create/resize image'' option. This will greatly facilitate
  interpretation of the results and also facilitate frequency-domain filtering.

        
\item{6.} FFT's should be done with as few other images present as possible.
        Because an FFT is extremely memory-intensive, if TN-Image is forced 
        to use virtual memory, the FFT may take a very, very long time.
        
\item{7.} When deconvoluting or convoluting, the two images should be 
        approximately the same size for optimal results. 
        
\item{8.} Avoid image sizes that are just larger than a power of 2, such 
        as 129 x 129 pixels. This will cause the complex array for FFT to 
        be allocated as the next higher power of 2 (i.e., 256 x 256).
        The additional pixels will also be set to solid black, which will
        create artifacts in the FFT.
                             
\item{9.} The screen mappings of FFT intensity values are automatically 
        rescaled whenever the FFT image is redrawn. Thus, changing the 
        contrast of an FFT'd image will appear to have no effect.


\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.3.11.1 Convolution  }
\bigskip
\hrule\bigskip
\rm

       
        View the image DECONVOL.TIF for a quick tutorial on convolution 
        and deconvolution. 
         
\it        Convolution      - 
\rm
                           
        Convolutes two images. Convolution is the same as multiplication   
        in the frequency domain. Therefore, the resultant image will have 
        the characteristics of both images. In the simplest possible example, 
        a sharp image convolved with an image of a blurred point will become 
        blurry. An image convolved with a single point is unchanged. 
  


\bigskip\hrule\bigskip
\bba { 8.3.11.2 Deconvolution and image reconstruction  }
\bigskip
\hrule\bigskip
\rm


        Deconvolution is a form of image reconstruction which was made 
        famous by successfully being used on the distorted images from 
        the Hubble space telescope. As with convolution, two images are
        required. Typically, one of the two images is a \it point spread 
        function \rm, or psf, which represents the effect of distortion on 
        a single pixel, and the other is the image from which this distortion
        is to be removed. The two images must be approximately the same size. 
        For example, if your image is blurred by spherical distortion from 
        a bad lens, you would create an image the same size as your blurry 
        test image, but consisting of a single point in the upper left of the 
        image on a black background, subjected to the same blurring effect. 
        If the point spread function is known accurately, after deconvolution
        the blur will be removed. In effect, a priori knowledge from outside 
        the image is used to remove the distortion.
        
        In principle, any degraded image can be reconstructed by 
        deconvolution if the point spread function is known.  If a photo 
        is blurred due to movement in one direction, the point spread
        function would be a line in the direction of motion whose length 
        depends on the amount of movement. In practice, deconvolution will
        not work for every image.

        This method is far more powerful than using a ``sharpening'' filter, 
        because any arbitrary type of degradation of the image can be 
        eliminated. In practice, noise (especially noise in the psf) or 
        low precision in the FFT will cause inaccuracies in the recovered 
        image. For this reason, FFT's in TN-Image are maintained as 
        double-precision numbers. Also, if the spatial frequency of the 
        psf at any point happens to be zero, it will also be impossible 
        to reconstruct that point (since it would require dividing
        by zero). Adding a little noise to the psf will ensure that all 
        frequencies are non-zero. Thus, sometimes it is necessary to 
        tolerate some noise in the psf to get good image recovery.
        
\bf     Important: 
\rm     The point spread function must be centered at the upper
        left corner of the image to be used as a psf. Otherwise, a
        translation effect will also be convoluted into or out of the image.

\medskip
\it        Exercise: 
\rm     Try deconvoluting fft1.tif and fft2.tif. It should be
        possible to reconstruct the original image in fft1.tif, which was 
        a small square, despite the complicated point spread function in 
        fft2.tif which renders the distorted image unrecognizable. The more 
        complicated the point spread function, the more difficult it is to 
        recover a noise-free image.


\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.3.11.3 Digital Filtering of images using the FFT  }
\bigskip
\hrule\bigskip
\rm

     
        Digital filtering can be easily done while the FFT spectrum is being
        displayed, by changing the pixels which correspond to the frequencies
        you wish to change. This is most conveniently done by setting the
        background  color to ``black'' and using \it delete \rm or \it backspace
        \rm to
        erase the frequencies you wish to remove; or by selecting ``sketch''
        ( \it F2 \rm ) and adding points at the desired frequencies by drawing with
        the mouse. It is necessary to change both the real and imaginary components
        as well as the positive and negative 
        frequencies to achieve good filtering. This means the entire FFT
        matrix must be visible, i.e., the original image must be close to
        a power of 2 in each dimension.

\proclaim        Example: High-pass filtering.

\item{1.} Make sure the original image size is a power of 2.

\item{2.} Set background color to black by right-clicking on ``black'' in
           the colormap palette.
\item{3.} Forward-FFT the image.
\item{4.} Delete the low-frequency regions (as shown with a 'L') with the
           'delete' key.
\item{5.} Alternatively, use the mouse to select these regions and use
           ``paint region'', ``change contrast'' or ``color/intensity'' to make
           them darker.
\item{6.} Optionally, you can also enhance the higher frequencies by 
           using ``enhance contrast'' in the high-frequency region (shown 
           by 'H'.
\item{7.} Drawing on a FFT'd image only affects the component being 
           displayed (``real'' by default). Apply the same filtering
           procedure to the imaginary component by selecting ``FFT...
           change display...imaginary'' and repeat the changes.
       
\bigskip\tt
\settabs 1 \columns
\+                 .LLLL---------------------LLLLL    \cr
\+                 LLLLL..........|..........LLLLL    \cr
\+                 |..............|..............|    \cr
\+                 |..............|..............|    \cr
\+                 |..............|..............|    \cr
\+                 |..........HHHHHHHHH..........|    \cr
\+                 |----------HHHHHHHHH----------|    \cr
\+                 |..........HHHHHHHHH..........|    \cr
\+                 |..............|..............|    \cr
\+                 |..............|..............|    \cr
\+                 |..............|..............|    \cr
\+                 LLLLL..........|..........LLLLL    \cr
\+                 LLLLL---------------------LLLLL    \cr

\rm
\medskip
\item{8.} Reverse-FFT to obtain the filtered image. \it Note: \rm Changing
          the zero-frequency pixel (at the upper left corner of the FFT)
          will have drastic effects on the image.
\vfill\eject        




\bigskip\hrule\bigskip
\bbb { 8.3.12 Macros  }
\bigskip
\hrule\bigskip
\rm
    
       TN-Image can execute a series of predefined commands. This is
       particularly useful when a large number of images need to be 
       processed in an identical manner. Technically, the macros in
       TN-Image are not macros but small programs. The macro editor 
       can also edit small text files (up to 255 lines), making it useful 
       as a clipboard for making notes.

       Macro commands consist of the text of one of the menu items,
       followed by a series of parameters which are usually numeric.
       A number of other commands, not visible in the menus, are also
       available.
       Any menu item from any menu can be part of a macro, with the 
       following caveats:
\item{1.}  Spaces should be replaced by underlines (\_) or omitted.
\item{2.} Periods and check marks should be omitted.
\item{3.} Capitalization is not significant.
       
       The numbering of command parameters corresponds to the 
       order in which the item would appear in the menu or dialog box.
       It is not necessary to give all the parameters. If a parameter
       is not given, it will be unchanged from the last time the command
       was executed.  Macro names include:
      

\tt
  3d \par
  aboutthefile \par
  abouttheimage \par
  abouttheprogram \par
  acquire \par
  addborder \par
  arrow \par
  automaticundo \par
  backgroundcolor \par
  backup \par
  beep \par
  border \par
  box \par
  brightness \par
  calibration \par
  changecolordepth \par
  changepalette \par
  changepixelvalues \par
  changesize \par
  changetitle \par
  chromakey \it Toggles chroma-key on or off for current image \tt\par
  circle \par
  color \par
  color->grayscale \par
  colorbrightness \par
  colormap \par
  configure \par
  contrast \par
  convert \par
  copy \par
  createfileformat \par
  createimage \par
  createresizeimage \par
  crop \par
  curve \par
  deleteregion \par
  erasebackground \par
  erasefft \par
  executeplugin \par
  exit \par
  fft \par
  fileformat \par
  fill \par
  fillregion \par
  filter \par
  fliphoriz \par
  flipvertically \par
  font \par
  foregroundcolor \par
  grayscale->color \par
  help \par
  histogram \par
  howtoregister \par
  image \it(select an image)\tt\par 
  imagemath \par
  invertcolors \par
  label \par
  line \par
  loadfft \par
  loadimage \par
  macro \par
  math \par
  measure \par
  move \par
  new \it Creates new image \tt\par
  paint \par
  paintregion \par
  palette \par
  pixelinteractmode \par
  printimage \par
  print \par
  quit \par
  remapcolors \par
  repair \par
  resizeimage \par 
  restore \par
  rotate \par
  rotateimage \par
  save \par
  savefft \par
  saveimage \par
  savescandata \par
  select \it(select a region)\tt\par 
  selectaregion \par
  selectregion \par
  selectimage \par
  testplugin \par
  scan \it Same as ``acquire'' \tt\par
  showodtable \par
  showpalette \par
  size \par
  sketch \par
  smooth \par
  spotdensitometry \par
  spray \par
  stripdensitometry \par
  testplugin \par
  textdirection \par
  tracecurve \par
  transparency \it Sets amount of transparency (0-255)
  undo \par
  unloadimage \par
  unload \par
  unloadall \par
  warp \par
  windows \it Toggles separate window mode for new images\tt\par
  windowborder \it Toggles window manager border for new images\tt\par

\tt    

\medskip\rm       
       Of course, interactive commands (such as \tt sketch \rm and \tt help 
       \rm) are not too
       useful in a macro. But they can be quite useful as commands for user-defined
       buttons (Sec. 7.1.4).



\rm\bigskip

       You can cause the macro to ask for any parameter by substituting the
       value with a question mark followed (with no spaces) by a prompt
       string. For example, for the  `load' command, the first parameter
       is the filename. If instead of putting an actual filename in the
       macro, such as
  
\tt                   load myimage.tif 
\rm

       you use 

\tt                   load ?Enter\_some\_kind\_of\_filename
\rm

       the program will ask you to enter a filename each time, by presenting
       a message box like the following:

\medskip\tt       
             -----------------------------------

             |Enter\_some\_kind\_of\_filename.......|

             |---------------------------------|

             |.................................|

             |.................................|

             |.................................|

             |.................................|

             -----------------------------------
\rm\medskip

       At this point, you can type the filename and press \it Enter \rm to 
       continue. The prompt string cannot contain spaces, because a space
       is interpreted as the beginning of the next parameter. There can
       be any number of prompts for each command.
       
       
\bf       NOTES:
\rm    No checking is done on the response to make sure it is a valid 
       answer. In the case of a filename, the macro interpreter itself does 
       not check whether the answer is a valid filename or even that a 
       filename is actually required for this parameter. Similarly, no 
       checking of your commands is done to make sure the macro is a valid 
       command. A command that is invalid, for example, by being misspelled,
       will either be skipped, or if it generates a fatal error, will cause
       the macro to be stopped.
       
 
       This is a partial listing of commands which require parameters. 
       Parameters must be specified in the indicated sequence and
       separated by spaces. All parameters must be on the same line as 
       the command. Each command must be on a separate line.
       
       Anything that appears in any of the menus may also be used as a
       command. Those commands that do not require parameters are not 
       listed here. Some, such as 'automatic\_undo' toggle a feature on 
       or off. For these commands, use the same command a second time 
       to turn the feature back on.
       
       Unless noted otherwise, all parameters can be omitted. This 
       causes the current default setting to be used. However, parameters cannot
       be skipped. Thus, if you wish to set parameter \#3, for example,
       you also must set parameters \#1 and \#2.

       If a fatal error occurs, the macro is automatically terminated
       and an error message is displayed showing what line caused the error.

\medskip
       If images are in separate windows, the desired image should be selected
       before selecting coordinates. Otherwise, the coordinates may be 
       calculated relative to some other image. These coordinates could
       be well off screen and result in unknowingly corrupting some other
       image. For example: \par
           
           \tt image 2 \par
               select 100 100 200 200
           \rm
           
\bigskip\bf
\settabs 5 \columns   
\+ \hfil   Command   &Parameter\# &Refers to      &Value       &Meaning     \cr
\rm
\+ \hfil   --------  &----------- &-----------    &-----        &--------    \cr     
\+ \hfil  filter     & 1          &filter type    &0            &low pass    \cr
\+ \hfil             &            &               &1            &high pass   \cr
\+ \hfil             &            &               &2            &laplace     \cr
\+ \hfil             &            &               &3            &background subtract \cr
\+ \hfil             &            &               &4            &background flatten  \cr
\+ \hfil             &            &               &5            &noise (median)      \cr
\+ \hfil             &            &               &6            &sharpen /           \cr
\+ \hfil             &            &               &7            &sharpen \tt|\rm     \cr
\+ \hfil             &            &               &8            &sharpen --          \cr
\+ \hfil             &            &               &9            &sharpen $\backslash$\cr
\+ \hfil             &            &               &10           &edge detect --      \cr
\+ \hfil             &            &               &11           &edge detect \tt|\rm \cr
\+ \hfil             &            &               &12           &sobel               \cr
\+ \hfil             & 2          &kernel size:   &1            &3x3  \cr
\+ \hfil             &            &               &2            &5x5  \cr
\+ \hfil             &            &               &3            &9x9  \cr
\+ \hfil             &            &               &4            &15x15 \cr
\+ \hfil             &3           &amount of      &             &      \cr
\+ \hfil             &            &filtering      &(1-10)       &      \cr
\+ \hfil             &4           &range  (median filter)       &      \cr     
\+ \hfil             &5           &kernel multip. &(any integer)&      \cr
\+ \hfil             &6           &max background &0            &black \cr
\+ \hfil             &            &               &1            &white \cr

\bf                         Examples: 

\tt filter 5 1 3 10 1 1
\rm

                                          Filters the currently-selected
                                          image or area using a 3x3 median
                                          filter, with a filtering level
                                          of 3, a range of +/-10, kernel
                                          multiplier of 1, and white declared
                                          as the background.

\tt                                   filter 11 2
 
\rm                                          Filters the currently-selected
                                          image or area using a 5x5 Sobel 
                                          filter.

\medskip
\settabs 4 \columns
\bf   
\+ \hfil   Command          &Parameter\# &Refers to                \cr
\rm
\+ \hfil   --------         &----------- &-----------              \cr
\+ \hfil   select\_region   & 1          & upper left x coord.     \cr
\+ \hfil                    & 2          & upper left y coord.     \cr
\+ \hfil                    & 3          & lower right x coord.    \cr
\+ \hfil                    & 4          & lower right y coord.    \cr
\medskip

                                Sets boundary for other operations such
                                as contrast. The coordinate values are 
                                relative to the upper left corner of the
                                screen (= 0,0). Select\_region is cancelled
                                by select\_image and vice versa. All 4 
                                parameters must be given.
                                
\bf                             Example:  

\tt                             select\_region 100 100 200 200

\rm                             This has the same effect as clicking-and-
                                dragging the mouse from (100,100) to (200,200).

\bigskip
\settabs 4 \columns
\bf      
\+ \hfil   Command          &Parameter\# &Refers to                \cr
\rm
\+ \hfil   --------------   &----------- &-----------              \cr
\+ \hfil   select\_image    & 1          &image no.                \cr
 

\bigskip
\bf                                        NOTE: 
\rm                                        Image numbering changes 
                                           unpredictably when an image is
                                           unloaded. This is because images
                                           are rearranged to compact the
                                           free space.
                                           
\bf                                Example:

\tt                                    select\_image 5

\rm                                Has the same effect as double-clicking on
                                   image \#5.           
           
\bigskip
\settabs 6 \columns   
\bf
\+ \hfil   Command          &Parameter\# &Refers to                \cr
\rm
\+ \hfil   --------------   &----------- &-----------              \cr
\+ \hfil   load             & 1          & filename (can include wildcards)  \cr
\+ \hfil                    & 2          & x position for upper left corner  \cr
\+ \hfil                    & 3          & y position for upper left corner  \cr
\+ \hfil                    & 4          & x size (0 to 1) (1=full size)     \cr
\+ \hfil                    & 5          & y size (0 to 1)                   \cr

                        The remaining arguments (6 to 15) are used only for 
                        reading raw images.


\bigskip\settabs 6 \columns   
\bf
\+ \hfil   Command   &Parameter\# &Refers to        &Value    &Meaning     \cr
\rm
\+ \hfil   ----------&------&-----------      &-----    &--------    \cr     
\+ \hfil    load     & 6    & platform        & 0       & PC         \cr
\+ \hfil             &      &                 & 1       & Mac        \cr
\+ \hfil             &      &                 & 2       & IBM        \cr
\+ \hfil             & 7    & color type      & 0       & RGB color  \cr
\+ \hfil             &      &                 & 1       & grayscale/indexed color \cr
\+ \hfil             &      &                 & 2       & CMYK color \cr
\+ \hfil             & 8    & bit packing     & 0       & TIF-like   \cr
\+ \hfil             &      &                 & 1       & GIF-like   \cr
\+ \hfil             &      &                 & 2       & none       \cr
\+ \hfil             & 9    & x size in pixels&         &            \cr
\+ \hfil             & 10   & y size in pixels&         &            \cr
\+ \hfil             & 11   & No.of bytes     &         & \cr 
\+ \hfil             &      & to skip at start&         & \cr 
\+ \hfil             &      & of file         &         & \cr
\+ \hfil             & 12   & image bits/pixel&         & \cr
\+ \hfil             & 13   & red bits/pixel  &         & \cr  
\+ \hfil             & 14   & green bits/pixel&         & \cr                   
\+ \hfil             & 15   & blue bits/pixel &         & \cr
\+ \hfil             & 16   & black bits/pixel&         & \cr
\bigskip



\bf                             Examples: 
\tt                             load myimage.tif 100 100 1 1
                                 
\rm                             Reads myimage.tif from disk, positions it at
                                (100,100), at full size. 
                                 
\tt                                           load *.gif

\rm                             Reads all .GIF files from disk. Since no
                                position or size is specified, the values
                                set by the previous command will be used.
                                
                                The most recently loaded image becomes
                                the currently-selected image for other
                                operations.


\bf                             Example: 
\rm                              Load an image of raw bytes.
                                
\tt                                   file\_format 9

                                      load raw.img 0 0 1 1 0 1 0 382 362 10 8


\rm                             The first command is necessary to override
                                the automatic file detection, which would
                                otherwise display a message ``Invalid file
                                type''. 
                                
                                The second command loads the image at x=0,
                                y=0, x size=100\%, y size=100\%, platform=PC,
                                color type=indexed color, x size=382 pixels, 
                                y size = 362 pixels, skip 10 bytes, and 
                                interpret data as 8 bits/pixel.

                                If a large number of raw byte images having
                                identical parameters are to be read, it is
                                easier to create a custom file type and
                                define these values as the defaults. This
                                will eliminate repetitive retyping of the 
                                arguments.
                                
                                

\bigskip
\settabs 4 \columns   
\bf
\+ \hfil   Command &Parameter\# &Refers to &Value    \cr
\rm
\+ \hfil   --------&--------- &----------- &--------------------\cr     
\+ \hfil   save    &1        &filename     &                    \cr
\+ \hfil           &2        &file format  & see under ``file\_format'' for \cr
\+ \hfil           &         &             & permissible values \cr
\+ \hfil           &3        &bits/pixel   & (Any value between 1-32).\cr

\bigskip
 The bits/pixel be a legal value for the specified
 format otherwise it is a fatal error. If omitted,
 it uses the image's current bpp.
\bigskip

\bf                                Example:  
                                    
\tt                               save test.tif 0  
                                    
\rm                                Creates a TIF file named ``test.tif'' using 
                                the currently-selected area or currently-
                                selected image.

                                If no arguments are given, the image's 
                                original filename and format will be used. 
                                Use `file\_format' to override the default
                                image format. You must change the extension
                                manually in case the file is to be read by
                                file viewers, which may require a 
                                specific file extension. If the image was 
                                created within TN-Image it will not have a
                                filename until you save it. If a macro tries
                                to save a file without specifying a filename,
                                a fatal error occurs, terminating the macro.
                                
       

\bigskip\settabs 4 \columns   
\bf
\+ \hfil   Command    &Parameter\# &Refers to   \cr
\rm
\+ \hfil   -----------&-----&------------------------------\cr     
\+ \hfil   color,     &     &                              \cr
\+ \hfil   brightness &     &                              \cr
\+ \hfil              & 1   & change in brightness for monochrome \cr 
\+ \hfil              &     & portion of selected area if any     \cr
\+ \hfil              &     & (If the entire area is color,       \cr
\+ \hfil              &     & this parameter is ignored).         \cr
\+ \hfil              & 2   & change in red for color portion \cr
\+ \hfil              & 3   & change in green for color portion\cr
\+ \hfil              & 4   & change in blue for color portion  \cr
\+ \hfil              &     & If the entire area is monochrome, \cr
\+ \hfil              &     & parameters 2-4 are ignored.\cr
\bigskip                        

\bf                         Example: To increase the red in a color image by 10:
           
\tt                                 color 0 10 0 0

\rm                         The color, brightness, and color\_brightness commands
                           are synonymous.

\vfill\eject
\bigskip\settabs 4 \columns   
\bf
\+ \hfil   Command    &Parameter\# &Refers to   \cr
\rm
\+ \hfil   -----------&-----&------------------------------\cr     
\+ \hfil   contrast   & 1   & change in contrast for monochrome portion\cr
\+ \hfil              &     & if any (1 = no change)(If the entire area \cr
\+ \hfil              &     & is color, this parameter is ignored).     \cr
\+ \hfil              & 2   & change in red contrast for color portion  \cr
\+ \hfil              & 3   & change in green contrast for color portion \cr
\+ \hfil              & 4   & change in blue contrast for color portion  \cr
\+ \hfil              &     & If the entire area is monochrome, parameters\cr
\+ \hfil              &     & 2-4 are ignored. \cr
\bigskip       
                  
\bf                         Example: 

\rm                               To increase blue contrast in a color image
                                  by a factor of 1.5:
           
\tt                                 contrast 0 0 0 1.5
                        

\bigskip
\settabs 5 \columns   
\bf
\+ \hfil   Command             &Parameter\# &Refers to   \cr
\rm
\+ \hfil   --------------------&--------- &------------------------------\cr     
\+ \hfil   convert,            &          &                              \cr
\+ \hfil   change\_color\_depth&          &                              \cr
\+ \hfil                       &1         & bits/pixel to convert image  \cr
\+ \hfil                       &1         & to (must be 8, 16,24, or 32).\cr 
                             

\bigskip
\settabs 5 \columns   
\bf
\+ \hfil   Command        &Parameter\# &Refers to      &Value    \cr
\rm
\+ \hfil   ---------------&------ &-----------    &--------------------\cr     
\+ \hfil  change\_palette,&       &               &                    \cr  
\+ \hfil  palette         & 1     & Palette number& 1 - gray scale     \cr
\+ \hfil                  &       &               & 2 - spectrum       \cr
\+ \hfil                  &       &               & 3 - multi colors 1 \cr
\+ \hfil                  &       &               & 4 - multi colors 2 \cr
\+ \hfil                  &       &               & 5 - multi colors 3 \cr
\+ \hfil                  &       &               & 6 - RGBI           \cr
\+ \hfil                  &       &               & 7 - black to green \cr
\+ \hfil                  &       &               & 8 - zebra          \cr
\+ \hfil                  &       &               &-1 - Other (random) \cr
\+ \hfil                  &       &               & 0 - Other (e.g., inverse) \cr
\+ \hfil  pixel\_interact\_mode&  &               &                    \cr  
\+ \hfil                  & 1     &Pixel inter-   & 1 Overwrite        \cr
\+ \hfil                  & 2     & action mode   & 2 Maximum          \cr
\+ \hfil                  & 3     &               & 3 Minimum          \cr
\+ \hfil                  & 4     &               & 4 Add              \cr
\+ \hfil                  & 5     &               & 5 Subtract new - old \cr
\+ \hfil                  & 6     &               & 6 Subtract old - new \cr
\+ \hfil                  & 7     &               & 7 XOR              \cr
\+ \hfil                  & 8     &               & 8 Average          \cr
\+ \hfil                  & 9     &               & 9 Superimpose      \cr
   
           
\bigskip\settabs 4 \columns   
\bf
\+ \hfil   Command         &Refers to    \cr
\rm
\+ \hfil   --------------- &--------------------------------------\cr     
\+ \hfil   unload          &(No parameters, unloads currently selected image, \cr
\+ \hfil                   &Use 'select\_image' command to select an image.)  \cr
\+ \hfil   unload\_all     &Unloads all images. If `messages' is `on', you are \cr
\+ \hfil                   &prompted to save any image that has been modified. \cr
\+ \hfil   quit            &Quits the program and asks if you want to save \cr
\+ \hfil                   &your changes. \cr
\+ \hfil   exit            &Quits the program \it without \rm asking if you want \cr
\+ \hfil                   &to save your changes. Useful when running TN-Image \cr
\+ \hfil                   &macros in batch mode (See ``Batch-mode processing''). \cr
\+ \hfil  loop             &Causes the macro to be repeated. Each time \cr
\+ \hfil                   &       a message box appears asking if you want to \cr
\+ \hfil                   &       repeat the macro - you must type a 'y' or 'n'. \cr

\bigskip\bf                                Example:     

\tt                                        dos pkunzip image.zip 


\bigskip\rm\settabs 5 \columns   
\bf
\+ \hfil   Command         &Parameter\# &Refers to    \cr
\rm
\+ \hfil   --------------- &--------------------------------------\cr     
\+ \hfil   goto            &1   line number in macro to execute next. \cr
\+ \hfil                   &    A jump to a lower line number causes an  \cr
\+ \hfil                   &    infinite loop. Press \it ESC \rm to stop the \cr
\+ \hfil                   &    macro. \cr
\+ \hfil   math            &1   1=activates math mode \cr
\+ \hfil                   &    0=deactivates math mode \cr
\+ \hfil                   &    Any other string=a formula \cr
\+ \hfil                   &    In math mode, all macro commands are interpreted\cr
\+ \hfil                   &    as image math formulas. If a formula is given,\cr
\+ \hfil                   &    it must start with the variable i,r,g, or b.\cr
\+ \hfil  dos              &         \cr
\+ \hfil  dos\_command     & 1-5    Execute a DOS command with up to 5 parameters\cr
\+ \hfil                   &    (not available in Unix version)\cr
                        
\bigskip
\bf
\+ \hfil   Command        &Parameter\# &Refers to      &Value    \cr
\rm
\+ \hfil   ---------------&------ &-----------    &--------------------\cr     
\+ \hfil   macro          &1 Macro file name. Control is transferred \cr
\+ \hfil                  &       & to the first line of the new macro. After \cr
\+ \hfil                  &       & the new macro is finished, the old macro \cr
\+ \hfil                  &       & continues. There is no limit on the depth \cr
\+ \hfil                  &       & of nested macros except as imposed by \cr
\+ \hfil                  &       & available memory. Do not create recursive \cr
\+ \hfil                  &       & macros (macros which call themselves  \cr
\+ \hfil                  &       & directly or indirectly). \cr
\+ \hfil  messages        & 1     & Disables messages, including all requests \cr
\+ \hfil                  &       & for confirmation and requests for filenames.  \cr
\+ \hfil                  &       & Messages are automatically re-enabled after  \cr
\+ \hfil                  &       & the macro ends. Useful in batch mode. Turning  \cr
\+ \hfil                  &       & messages off is dangerous and should only be  \cr
\+ \hfil                  &       & used in fully-debugged macros. If messages \cr
\+ \hfil                  &       & are turned off, a macro could overwrite  \cr
\+ \hfil                  &       & files, unload images, create a file in a  \cr
\+ \hfil                  &       & non-standard format, or exit to DOS without  \cr
\+ \hfil                  &       & asking for confirmation. \cr
\+ \hfil                  &       &               & 0  Messages off \cr
\+ \hfil                  &       &               & 1  Messages on \cr


\bigskip\bf                                Example:  
\tt                                                  messages 0
\rm

\bf                                              
\+ \hfil   Command        &Parameter\# &Refers to      &Value    \cr
\rm
\+ \hfil   ---------------&-------&-----------    &--------------------\cr     
\+ \hfil   fft            & 1     &Direction      &1  Forward  \cr
\+ \hfil                  &       &               &2  Reverse  \cr
\+ \hfil                  &       &               &3  Convolute 2 images  \cr
\+ \hfil                  &       &               &4  Deconvolute 2 images  \cr
\+ \hfil                  &       &               &5  Change display only  \cr
\+ \hfil                  &2      &Display        &1  Real  \cr
\+ \hfil                  &       &               &2  Imaginary  \cr
\+ \hfil                  &       &               &3  Power spectrum  \cr
\+ \hfil                  &3      &Image \#1 (may be left blank for FFT of&  \cr
\+ \hfil                  &       &currently-selected image)&  \cr
\+ \hfil                  &4      &Image \#2 (required for deconvoluton)&  \cr

\bigskip\bf                                Examples: 

\tt                                          fft 1 1 \rm    (forward fft)

\tt                                          fft 4 1 7 8   \rm (deconvolute images
                                                          7 and 8)


\bigskip
\bf                                               
\+ \hfil   Command        &Parameter\# &Refers to      &Value    \cr
\rm
\+ \hfil   ---------------&-------&-----------    &--------------------\cr     
\+ \hfil   file\_format   & 1     & Sets the default file format for loading \cr
\+ \hfil                  &       &and saving images.    \cr
\+ \hfil                  &       & &  -1  (automatically detect) \cr
\+ \hfil                  &       & &   0  NONE \cr
\+ \hfil                  &       & &   1  TIF \cr
\+ \hfil                  &       & &   2  PCX \cr
\+ \hfil                  &       & &   3  IMA \cr
\+ \hfil                  &       & &   4  IMG (Frame grabber) \cr
\+ \hfil                  &       & &   5  GIF (GIF87a) \cr
\+ \hfil                  &       & &   6  IMM \cr
\+ \hfil                  &       & &   7  GEM \cr
\+ \hfil                  &       & &   8  IMDS \cr
\+ \hfil                  &       & &   9  RAW \cr
\+ \hfil                  &       & &  11 JPG \cr
\+ \hfil                  &       & &  12 TARGA (Targa RLE) \cr
\+ \hfil                  &       & &  16 BMP (Windows bitmap) \cr
\+ \hfil                  &       & &  23 ASCII \cr
\+ \hfil                  &       & & 100 first custom format \cr
\+ \hfil                  &       & & 101 2nd custom format \cr
\+ \hfil                  &       & &   ...etc. \cr
\+ \hfil                  &       & & This will supercede the image's existing \cr
\+ \hfil                  &       & & default file format for the duration of \cr
\+ \hfil                  &       & & the macro. \cr
                                
\bigskip\bf                                Example:

\tt                                        file\_format 5

\rm                                            = sets default format to GIF

\bigskip
\bf                                               
\+ \hfil   Command        &Parameter\# &Refers to      &Value    \cr
\rm
\+ \hfil   ---------------&-------&-----------    &--------------------\cr     
\+ \hfil   create\_image  &\cr
\+ \hfil   resize\_image  & \cr
\+ \hfil                  &1      & Method for obtaining image coordinates. \cr
\+ \hfil                  &       &               &1 Use mouse \cr
\+ \hfil                  &       &               &2 Use specified coordinates \cr
\+ \hfil                  &       &               &3 Copy another image \cr
\+ \hfil                  &       &               &4 Resize another image using \cr
\+ \hfil                  &       &               &  specified coordinates \cr
\+ \hfil                  &2      &Border         &0 No border  \cr
\+ \hfil                  &       &               &1 Add border  \cr
\+ \hfil                  &3      &x size (in pixel units) \cr
\+ \hfil                  &4      &y size (in pixel units) \cr
\+ \hfil                  &5      &x position (0,0 = upper left) \cr
\+ \hfil                  &6      &y position (0,0 = upper left) \cr
\+ \hfil                  &7      &No. of image to copy. Remember that the image \cr
\+ \hfil                  &       &number changes unpredictably if an image \cr
\+ \hfil                  &       &is unloaded. If the image no. does not exist, \cr
\+ \hfil                  &       &it is an error. \cr


\bigskip
\settabs 4 \columns
\bf      
\+ \hfil   Command          &Parameter\# &Refers to                \cr
\rm
\+ \hfil   --------------   &----------- &-----------              \cr
\+ \hfil   windows          & 1          &0=images are placed on main window \cr
\+ \hfil                    &            &1=images are placed in separate windows \cr
 

\bigskip
\settabs 4 \columns
\bf      
\+ \hfil   Command          &Parameter\# &Refers to                \cr
\rm
\+ \hfil   --------------   &----------- &-----------              \cr
\+ \hfil   windowborder     & 1          &0=minimal border  \cr
\+ \hfil                    &            &1=images are given a full border \cr

        If windowborder is 0, images are given a minimal border and
        positioned according to the coordinates specified as ``x position''
        and ``y position'' in the ``load'' command. If windowborder is 1,
        images are positioned interactively and are given a title bar. 
        This parameter only has an effect when windows=1. The actual
        behavior depends on the window manager.





\vfill\eject
\bigskip\hrule\bigskip
\bbb {  8.3.12.2   Macro Programming Guide }
\bigskip
\hrule\bigskip
\rm

           Here is a brief tutorial on some of the finer points on creating
           useful macros. In general a macro should reset the program to its
           original state.  If a macro does something different the second
           time it is executed, the cause is almost always a failure to reset
           the original conditions.  In a real macro, you should also always 
           execute  ``select\_image'' or ``load'' first to make sure the operation
           is performed on the correct image. 


\bigskip
\proclaim  Example macro \#1. Nested macros

             Macro ``beep.mac''

             Line \#    Command  

             ------    --------   
\item{}       1 \hskip 0.3 in \tt     beep  \rm   
\item{}       2 \hskip 0.3 in \tt     beep  \rm   
\item{}       3 \hskip 0.3 in \tt     beep  \rm    

\medskip
\bf         Note: \rm the words ``Line \#'' and ``Command''     
            and the numbers 1,2, and 3 are not part
            of the macro. In this example, the macro 
            would consist of only 3 words (``beep''), 
            one on each line.

\medskip
             Macro ``test.mac''

             Line \#    Command   
     
             ------    --------

\item{}        1 \hskip 0.3 in  \tt    macro beep.mac \rm
\item{}        2 \hskip 0.3 in  \tt    beep           \rm

\medskip
             Executing ``test.mac'' should cause a total of 4 beeps.
             A macro must never call itself - this would cause a system hang
             (at least in DOS).
\medskip
           
           
\bigskip           
\proclaim   Example macro \#2. Converting GIF image to TIF format interactively

             Line \#    Command        

             ------    --------

\item{}        1 \hskip 0.3 in  \tt    load ?Filename \rm
\item{}        2 \hskip 0.3 in  \tt    messages 0     \rm
\item{}        3 \hskip 0.3 in  \tt    file\_format 0 \rm
\item{}        4 \hskip 0.3 in  \tt    save           \rm
\item{}        5 \hskip 0.3 in  \tt    messages 1     \rm
\item{}        6 \hskip 0.3 in  \tt    loop           \rm
           
\medskip
\it          Line 1 \rm - Prompts you for a filename each time (because of the
             question mark).
             
\it          Line 2 \rm - Resets default file format to 0 (TIF). If this line is
             omitted, the file format would default to the original format 
             of each image.
             
\it          Line 4 \rm - Saves the image in TIF format. Don't forget to rename
             the file extension to TIF later. You could also use:
\item{}  \tt          save ?Filename\_to\_save\_as ?Format

\rm          which would ask you for both the filename and the format 
             each time.          
                       
\it          Line 5 \rm - Resume error messages \rm 
             
\it          Line 6 \rm - Unconditional loop back to line 1. Press \it ESC \rm to stop.




\bigskip
\proclaim   Example macro \#3. Converting GIF image to TIF format in batch mode

             Line \#    Command  
      
             ------    --------

\item{}        1 \hskip 0.3 in  \tt    messages 0     \rm
\item{}        2 \hskip 0.3 in  \tt    load *.gif     \rm
\item{}        3 \hskip 0.3 in  \tt    file\_format 0  \rm
\item{}        4 \hskip 0.3 in  \tt    save           \rm
\medskip

             This macro could be executed at 3 a.m. by setting the following
             timed events in \tt tnshell \rm  or other command scheduler:

\item{}        Event 1: \tt  cd c:$\backslash$ tnimage  \rm 3:00am
\item{}        Event 2: \tt  tnimage -macro convert.mac \rm 3:01am
\item{}        Event 3: \tt  ren *.gif *.tif            \rm 4:00am
\item{}        Event 4: \tt  cd c:$\backslash$          \rm 4:01am
\medskip
             Event 3 could also be replaced by a new line in the macro:

\tt                      dos ren *.gif *.tif
\rm

             Make sure there is enough free disk space before starting this
             macro.

\bigskip
\proclaim    Example macro \#4. Subtracting two images
\medskip

             Line \#    Command        

             ------    --------

\item{}         1 \hskip 0.3 in \tt     pixel\_interact\_mode 1   \rm
\item{}         2 \hskip 0.3 in \tt     load cells.tif 0 0 1 1  \rm
\item{}         3 \hskip 0.3 in \tt     pixel\_interact\_mode 5   \rm
\item{}         4 \hskip 0.3 in \tt     load cells.tif 1 1 1 1  \rm
\item{}         5 \hskip 0.3 in \tt     pixel\_interact\_mode 1   \rm
\item{}         6 \hskip 0.3 in \tt     contrast 1.85           \rm
\medskip

             This macro loads an image, then subtracts the same image
             after offsetting it by (1,1), then increases the contrast. 
             All 6 lines are essential for a good macro. 

\it          Line 1: \rm The pixel interaction mode is set to 1 (overwrite) 
             in case a previous operation changed it.
            
\it          Line 2: \rm  All 4 parameters (x offset, y offset, x size, and y 
             size) must be given. Otherwise, if the macro was executed again,
             the default parameters would be { 1,1,1,1 } because of line 4.
             This would cause the image to be placed at (1,1) and then
             subtracted from itself, giving solid black.
             
\it          Line 3: \rm The pixel interaction mode is set to 5 (subtract).
             It is usually helpful to change the screen background color to
             0 (black) before doing this.
             
\it          Line 4: \rm Load the image to subtract.
           
\it          Line 5: \rm Reset the pixel interaction mode to overwrite.
             
\it          Line 6: \rm Increase the contrast by a factor of 1.85.

\medskip           
           Be careful using ``DOS command'' in combination with ``messages 0''.
           If there is insufficient low DOS memory to execute the command,
           ``messages 0'' may cause you to miss the fact that the command
           was not executed.
           

\bigskip
\proclaim    Example macro \#5. Multiple image math formulas
\medskip

             Line \#    Command   
     
             ------    --------

\item{}        1 \hskip 0.3 in  \tt    selectregion 50 50 100 100  \rm
\item{}        2 \hskip 0.3 in  \tt    math 1                      \rm
\item{}        3 \hskip 0.3 in  \tt    i=i+5                       \rm
\item{}        4 \hskip 0.3 in  \tt    i=i+image[2][0][x][y]       \rm
\item{}        5 \hskip 0.3 in  \tt    r=r*1.23                    \rm
\item{}        6 \hskip 0.3 in  \tt    math 0                      \rm
\item{}        7 \hskip 0.3 in  \tt    math i=i-5                  \rm


\medskip
\it          Line 1: \rm Select a region to modify. If this line is omitted,
             it would modify the entire image.

\it          Line 2: \rm Start math mode. Lines between ``math 1'' and ``math 0''
             do not need to begin with ``math''.

\it          Line 3: \rm Lighten the image by 5 intensity units.

\it          Line 4: \rm Add the corresponding region from image \#2.

\it          Line 5: \rm Increase the red contrast by 1.23 fold.

\it          Line 6: \rm End math mode.

\it          Line 7: \rm Subtract 5 intensity units from the selected region.
             Since math mode is turned off by line 6, the formula must be preceded 
             by the word ``math''.


\medskip
\vfill\eject




\bigskip\hrule\bigskip
\bbc { 8.4.0   Color menu   }
\bigskip
\hrule\bigskip
\rm

   Colormaps are only needed for indexed-color (8-bit/pixel) images.
   If an 8-bit (256-color) image which lacks a colormap of its own 
   is loaded and converted to color, the most recently-selected 
   colormap will be used to perform the conversion. 


\bigskip\hrule\bigskip
\bbb { 8.4.1   Invert colormap   }
\bigskip
\hrule\bigskip
\rm


        Switches the colormap so that all images become a negative.
        Changes the appearance only, and has no effect on the actual
        pixel values in the image.
 

\bigskip\hrule\bigskip
\bbb { 8.4.2   Color intensity / brightness   }
\bigskip
\hrule\bigskip
\rm


        There are 3 ways to change the brightness: you can drag the 
        colormap palette bar to change the color LUT, or you can select 
        ``Color intensity'' or ``Change pixel values'' from the menu.
 

\bigskip\hrule\bigskip
\bba { 8.4.2.1 Changing brightness using the colormap palette bar  }
\bigskip
\hrule\bigskip
\rm

        This method is very fast, but only works on images that have a
        continuous colormap, and only in 8-bit/pixel screen modes.
        Files with a discontinuous colormap should be adjusted using the
        ``Color intensity'' menu option instead of the colormap palette bar.

        Click on the top part of the bar and drag down to ``squash'' the
        colors downward, or click on the bottom part of the bar and drag
        up to squash the colors upward. This increases the contrast in
        all images of the screen.
        
        Then, click in the middle of the bar and drag up or down to adjust
        the brightness as desired. The currently-selected image will be
        set to contain the new colormap.
        
        If you change the colormap from the menu, or select ``restore original
        colormap'', the brightness and contrast settings return to normal.


\bigskip\hrule\bigskip
\bba { 8.4.2.2 Changing brightness and color using the menus   }
\bigskip
\hrule\bigskip
\rm

        This method is also fast, and allows you to change the red, green,
        blue, and intensity values independently. The action is different
        depending on the screen mode.

        For 8 bit/pixel modes, the colormap (palette) of the image is 
        changed. The pixel values in the original image is unaffected. 
        It is not possible to change the color of only part of the image
        with this method. To change only a portion of the image, you must 
        either use ``Change pixel value'' or convert the image to 
        24 bits/pixel first.
        
        The clickbox that is presented will depend on whether TN-Image
        thinks the image is mono\-chrome or color.  This information can be
        found by selecting ``About...About the Image''. Any image can be
        converted to monochrome or color by selecting ``Color...Color to
        Gray scale'' or ``Color...Gray scale to Color'' from the main
        menu, respectively. If TN-Image thinks the image is gray scale,
        only one slider (Brightness) will be presented. Otherwise, four
        sliders will be presented, permitting independent adjustment of 
        red, green, blue, and brightness. 
        
        In true-color screen modes, the action is the same as ``Change
        pixel value'' (see below).  A value is added or subtracted for the 
        red, green, and blue components of the currently-selected image or
        screen  region, making it darker or lighter or altering its color 
        balance. The original colors can be restored by selecting 
        ``Image..Restore''.


\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.4.3   Contrast   }
\bigskip
\hrule\bigskip
\rm


        There are also two ways to change the contrast: you can drag the 
        colormap palette bar to change the color LUT, or you can select ``Contrast'' 
        from the menu.
        
        Changing the LUT is much faster, but only works in 8-bit 
        (indexed color) screen modes, and it always changes the entire screen.
        Selecting ``Contrast'' from the menu works in all screen modes, and
        can be used to change contrast in selected regions of an image.


\bigskip\hrule\bigskip
\bba { 8.4.3.1 Changing contrast using the colormap palette bar  }
\bigskip
\hrule\bigskip
\rm

       Click on the top part of the bar and drag down to ``squash'' the
        colors downward, or click on the bottom part of the bar and drag
        up to squash the colors upward. This increases the contrast in
        all images of the screen.
        
        Then, click in the middle of the bar and drag up or down to adjust
        the brightness as desired. The currently-selected image will be
        set to contain the new colormap.
        
        If you change the colormap from the menu, the brightness and contrast
        settings return to normal.


\bigskip\hrule\bigskip
\bba { 8.4.3.2 Changing contrast using the menus  }
\bigskip
\hrule\bigskip

\it        For 8 bit/pixel images:

\rm        Multiplies all pixels in the currently-selected image or screen 
        region by a value (100=no change), increasing the contrast. 
        Note that if the contrast or brightness is increased or decreased
        too much, information will be lost from the image due to saturation.

\medskip\bf     NOTE***WARNING

        When using 8  bit/pixel  modes,  adjusting  the  contrast,  or 
        making  the  image  lighter  or  darker,  may  invalidate  the 
        correspondence  between  pixel values and the original optical 
        density in the image. This will occur if the  O.D.  table  for 
        the  image  is  non-linear  and densitometry  is done with `pixel 
        correction' set to `on'. The  numerical  results  obtained  by 
        scanning   under  those  conditions  could  be  scientifically
        invalid.                                                       
                                                                       
        If you plan to quantitatively analyze your image after altering
        its contrast or brightness, first check that the O.D. table for
        the image is a straight line (Select `Configure...Show O.D.    
        table'). Alternatively, set `pixel compensation' to `off'      
        before any quantitative analysis.                              
                                                                      
        This does not apply to changes made by dragging the    
        colormap bar.                                                   
\rm \medskip

\it        For color images:

\rm     Multiplies the r,g, and b components  of  all  pixels  in  the
        currently-selected  image  or screen region by separate values
        (100=no change), increasing the contrast. 
        
        If the selected region has both color and monochrome pixels,
        you can select independent contrast factors for the monochrome
        intensity and the red, green, and blue components of the color
        region.
  

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.4.4   Change colormap  }
\bigskip
\hrule\bigskip
\rm


        In 8-bit/pixel modes, each pixel value is translated through a
        ``colormap'', a look-up table which you can easily modify in TN-Image. 
        The new table is saved along with the image (for TIF,BMP,and TGA
        files) so the next time you load the image, the display changes 
        to the modified colormap. Changing the colormap has two advantages
        over other methods of changing brightness or color: (1) it is
        much faster, and (2) it is always reversible since it never 
        affects the original image data. The disadvantages are that 
        changing the colormap only works in indexed color screen modes, 
        and it always changes the entire screen. If you need to brighten 
        just a portion of the screen, use the ``color intensity/brightness'' 
        menu option.
    
        In color modes, the current colormap table is used as a guide
        to determine how an monochrome image is converted to color when 
        it is loaded from disk, but does not otherwise affect the display.
 


\bigskip\hrule\bigskip
\bba { 8.4.4.1 Select colormap  }
\bigskip
\hrule\bigskip
\rm


        You can select from a variety  of  different  color  colormaps.
        Changing  the  colormap  has  no effect on the image when it is
        stored or densitometrically  analyzed. However, it can be used 
        to enhance the visibility of details in the image. Each image
        can have a different colormap.
\bigskip  
       
        The following pre-set colormaps are available: 

\it     Gray scale \rm    - continuous shading of 256 levels of gray. 

\it        Multi-color 1 \rm - a  continuous  blend  of  colors useful for
                         enhancing low-contrast images.

\it        Multi-color 2 \rm  - a  discontinuous  sequence  of  short  color
                         gradients 

\it        Multi-color 3   \rm - a discontinuous sequence of color gradients
                         arranged oppositely from multi-color 2.

\it        RGBI      \rm     - 4 continuous gradients, 0-63=red, 64-127=green,
                         128-192=blue and 193-255=gray scale.

\it        Spectrum  \rm     - A single continuous gradient from blue through the
                         colors of the spectrum to red and then white.

\it        Black to green \rm - Same as gray scale except black to green
                         instead of black to white.

\it        Zebra     \rm     - Alternating black and white - useful for finding  
                         very subtle patterns in the image.  Creates a
                         contour-line effect.

\it        Brightness \rm    - Lightens or darkens colormap, increasing or
                         decreasing color saturation.

\it        Other \rm  - User-selected colormap. Select the desired number with
                          the mouse to select from  a  wide  range  of
                          different computer-generated colormaps. 
                          
\hskip 0.5 in  \it             1-100  \rm   = Various gray scales  
 
\hskip 0.5 in  \it          101-1000  \rm = randomly-generated gradients. The 
                                      amount of color gradually increases  
                                      in intervals of 100.    

\hskip 0.5 in  \it        1000-10000 \rm = continuous, smooth  gradients without  
                                      sharp breaks in the colors.  The number
                                      of light and dark cycles varies from 
                                      1 upwards.  Some are a single color,  
                                      others  are  gray scales, and others
                                      are multiple colors. 

\bf                          Example: \rm 2345 = shades of `gold'




\bigskip\hrule\bigskip
\bba {  8.4.4.2 Grayscale intensity mapping }
\bigskip
\hrule\bigskip
\rm


        Grayscale images of greater than 8 bits/pixel often contain subtle
        details which would not ordinarily be visible. This option permits
        interactively changing the way the pixels are mapped to the screen,
        creating, in effect, a ``sliding scale''. 
        
        This sliding scale uses 4 parameters: the maximum and minimum 
        values in the image to display, and the maximum and minimum
        values on the screen to which these are mapped (these latter 2
        do not normally need to be changed). When a monochrome
        image is first loaded, TN-Image automatically determines the
        maximum and minimum values in the image to allow the entire image
        to be viewed. By selecting ``Grayscale brightness'', you can use the
        mouse to select the actual range of values to be displayed. 
        
        For example, if the image has 12 bits of grayscale depth, it will
        be possible to set the maximum and minimum to any number between 0 
        and 4096. Setting the numbers close together enhances the contrast
        in that intensity range. Similarly, making the numbers small 
        enhances the contrast in the darker areas of the image. To make
        the change visible, click on ``Preview''.
        
        The maximum can also be lower than the minimum, creating an 
        inverse image. Each image on the screen can have a different 
        brightness/contrast level. 
         
        Note: Color images must be converted to monochrome before this
        feature can be used.



\bigskip\hrule\bigskip
\bba { 8.4.4.3  Read colormap  }
\bigskip
\hrule\bigskip
\rm

   
        Reads a colormap file from disk. Colormap files are ASCII text
        files which can be created with a text editor, or created
        graphically within TN-Image (see \it Create colormap \rm ).

        If you create a colormap file manually, your colormap file
        should consist of 4 columns of up to 256 rows. The first
        column is the color number or `index', an integer between 0
        and 255, indicating which color.  The other 3 columns  are
        integers between 0 and 63, which define the amount of red,
        green, and blue respectively for each color. For example:
\medskip\tt
           
\item{}        0    0    0   63    
\item{}        1   63   63   63    
\item{}      255    7    7    7    
     

\medskip\rm   This file would set color 0 to light blue, color 1 to bright
        white,  and  color 255 to dark gray. All other colors would be
        unchanged (Normally, a colormap file would have 255 rows
        instead of only 3).


\bigskip\hrule\bigskip
\bba { 8.4.4.4 Save colormap   }
\bigskip
\hrule\bigskip
\rm
        Saves the current colormap into a disk file.


\bigskip\hrule\bigskip
\bba { 8.4.4.5 Create colormap  }
\bigskip
\hrule\bigskip
\rm

                      
        Allows you to graphically create a custom colormap. There are 3
        boxes,  one  for  red,  green,  and  blue,  which  graphically
        represent  the  red, green, and blue intensities of each color
        in the colormap. To change the  colormap,  click  on  the  graph
        corresponding  to  the desired color and trace out the desired
        new graph while holding the left mouse button down. The  graph
        and  colormap will both adjust in real time to reflect the new
        values.
        
        Clicking `smooth' causes the computer to automatically  smooth
        out  the  newly-drawn curve to create a more even dispersal of
        colors in your colormap. When you are satisfied  with  the  new
        colormap, click on ``OK''.
   


\bigskip\hrule\bigskip
\bba { 8.4.4.6 Invert colormap  }
\bigskip
\hrule\bigskip
\rm

        Inverts the color look-up table so the image appears as a 
        negative. This differs from ``invert colors'' in that inverting
        the colormap has no effect on the actual image data. The two
        extreme colors (black and white) are not switched.



\bigskip\hrule\bigskip
\bba { 8.4.4.7 Rotate colormap  }
\bigskip
\hrule\bigskip
\rm

        Rotates the colormap table through all 255 colors. This effectively  
        increases the number of predefined colormaps to 2.5 million. Useful 
        in achieving fine control of the appearance of the image and 
        enhancing subtle details.

        If  you find a number that gives a useful effect, write the number 
        down for future reference or save it using ``Save colormap''. The actual 
        pattern of colors in the colormap is not easily predictable from the 
        color number. (Saving the currently-displayed screen or a portion 
        of it as a TIF or PCX file, or selecting `Save colormap' will also 
        save the colormap.)


\bigskip\hrule\bigskip
\bba { 8.4.4.8 Restore original colormap  }
\bigskip
\hrule\bigskip
\rm

        Restores the colormap the image had when it was originally loaded
        from disk. Useful when you accidentally rotate the colormap of
        a GIF file.


\bigskip\hrule\bigskip
\bba { 8.4.4.9  Sort colormap  }
\bigskip
\hrule\bigskip
\rm

        Sorts the colormap from lowest to highest luminosity and remaps the image
        accordingly. This is often an essential step before performing densitometry
        on an image, or before setting chroma-key for an image, as these functions 
        rely on a correspondence between the raw pixel value and intensity.


\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.4.5   Remap colors   }
\bigskip
\hrule\bigskip
\rm

        Changes the colors in an image by substituting
        from a map file. It acts differently on indexed color and color images.
        
\medskip\it        8-bit/pixel images:

\medskip\rm        Changes the pixels in the image or screen region by substituting 
        from a set of values specified in an ASCII file. This file should 
        consist of a list of 2 columns of numbers.  The 1st column is the 
        pixel value to change, the 2nd column should be the desired new 
        values. For example:

\tt\medskip
\item{}              1         255
\item{}              2         200
\item{}              3         180
\item{}              4         175
\item{}            255           0  
\rm\medskip

        This  file would change all pixels with a value of 1 to pixels
        with a value of 255, those with values of 2 to 200, 3 to  180,
        4  to 175, and 255 to 0. Any other pixels would be unaffected.
        Typically in a remap file, you would remap all 255 colors, but
        this is not essential.  Be  sure  colors  0  and  255  do  not
        accidentally get remapped to the same value, otherwise it will
        be impossible to use the menus (this applies only to DOS version).

        The most common use of this is to reduce the number of separate
        intensity values in an image, by eliminating those values in regions
        that are not of interest. This can greatly improve the 
        compressibility of an image.
        
        Another use is to stretch the contrast. Since the new intensity
        values can be known in advance, contrast enhancement can be done
        on multiple images in an exactly reproducible manner.

        The Macro Editor can be used to create remap files without leaving TN-Image.
        
\medskip\it        Color images:
        
\rm     Interchanges r,g, and b color values. This could be used, for
        example, to convert an image to a single color or to correct  
        for color errors in a corrupted image file.


\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.4.6   Invert colors   }
\bigskip
\hrule\bigskip
\rm

        
        Changes  the  image into a negative. This differs from ``invert
        colormap'' in that the pixel values themselves are changed.
 

\bigskip\hrule\bigskip
\bbb { 8.4.7   Change color depth  }
\bigskip
\hrule\bigskip
\rm


        Converts the selected image to a different number of bits per
        pixel. This option only works on entire images. When working
        with indexed-color images, it is advisable to use this option to 
        convert them to color images before filtering them (see ``Filtering
        color images'') or using other operations that assume the image
        is color. Images can be converted from any depth (8, 16, 24, or
        32 bits per pixel) to any other depth. 
        
        If the starting image is an 8-bit image with a colormap, the 
        colormap colors are used to select the appropriate colors for 
        the new image. These can be easily changed (see \it Change colormap \rm ).
        
        If the starting image is a color image, and it is being converted
        to 8 bits/pixel, the currently-selected  palettization method is 
        used to calculate the colors.  The default method is ``quantization''.
        This can be changed (see \it Color Settings \rm ).
        3D images are always converted using the closest-fit method.
        
        Once converted, writing the image to disk will cause it to be
        saved in its new depth.



\bigskip\hrule\bigskip
\bba { 8.4.8   Color -- Gray scale  }
\bigskip
\hrule\bigskip
\rm
        Converts the image from color or indexed-color to gray scale
        (luminosity). The relative contributions to luminosity from
        the red, green, and blue components are determined by the
        ``Luminosity factors'' which can be changed by selecting
        ``Color...Color settings''.
         
        The default is: $$   value = .299*r + .587*g + .114*b  $$

        The results for 8-bit images may be different from the results
        of merely changing the colormap to gray scale, because for 8-bit
        images, the conversion creates a new colormap to match the luminosities
        in the image as closely as possible.


\bigskip\hrule\bigskip
\bba { 8.4.9   Gray scale -- color  }
\bigskip
\hrule\bigskip
\rm

        Deactivates grayscale mapping, reactivates color manipulation
        features, and tries to restore previous color information if 
        possible. 
        
        \bf WARNING: \rm Converting color to grayscale and back is not 
        always a reversible process.

  
\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.4.10  Histogram  }
\bigskip
\hrule\bigskip
\rm

       
        Plots a histogram of the no. of  pixels  with  a  given  value
        within  the  selected  area  vs. the pixel value. Quite useful
        when trying to optimize  the  contrast  or  brightness  of  an
        image.  Clicking  on  the  edge of the histogram allows you to
        move it to some other screen location in the  same  manner  as
        moving the dialog boxes and click boxes.                           
 
        Clicking  \it capture \rm  allows  you to capture all or part of the
        graph into a new image. After clicking on \it capture \rm,  use  the
        mouse  to select the desired portion of the graph. A new image
        which includes that region is then automatically created. 
 
        Clicking \it subtract baseline \rm allows you to subtract a baseline
        from the histogram. Select the desired baseline by clicking as
        many times as  desired  to  create  the  baseline  curve.  The
        baseline  curve  is  constructed  using  a B-spline (see under
        \it B-spline curve \rm ). You can modify  the  curve  as  desired  by
        clicking and dragging the small boxes (which represent control
        points  for  the curve). Up to 200 control points can be used.
        The control points do not have to be within the graph  region;
        however,  any negative numbers created by baseline subtraction
        are truncated to 0's.

        See  \it strip densitometry \rm above for more details on the plot
        functions.
        
\bf        Note: \rm When a graph is being displayed, smoothing, subtracting
        baseline, etc., affect the displayed data only,  and  have  no
        effect on the image.



\bigskip\hrule\bigskip
\bbb { 8.4.11 Change pixel value  }
\bigskip
\hrule\bigskip
\rm
       This menu option was previously called \it Change brightness/contrast \rm.
       The effect is consistent across all image types and screen modes,
       but is slower in 8-bit modes than the \it Change brightness \rm option.
       
\it    For 8 bit/pixel images:
        
\rm    This adds a value (-255  to 255) to all pixels in the currently-
       selected image or screen region, generally making it darker or 
       lighter. (The actual effect on the image will depend on the 
       colormap).
\bf    NOTE: See the warning under ``Contrast''.
        
\it    For color images:

\rm    This adds or subtracts a value for the red, green, and blue
       components of the currently-selected image or  screen  region,
       making it darker or lighter or altering its color balance.
       


\bigskip\hrule\bigskip
\bbb { 8.4.12 Separate colors }
\bigskip
\hrule\bigskip


\rm  Creates 3 8-bit monochrome images containing the red, green, and blue
     components of the original color image.


\bigskip\hrule\bigskip
\bbb { 8.4.13 Composite image }
\bigskip
\hrule\bigskip


\rm  Combines 3 8-bit monochrome images containing the red, green, and blue
     components into a 24-bit color image. All 3 images must be the same size.


\vfill\eject
\bigskip\hrule\bigskip
\bbc { 8.5.0   Draw  menu   }
\bigskip
\hrule\bigskip
\rm

        Most of the drawing operations listed below put TN-Image in the
        drawing mode, in which each mouse click creates another graphic
        element. To return to normal mode, click anywhere on the top menu 
        bar or the \it Cancel \rm button.


\bigskip\hrule\bigskip
\bba { 8.5.1   Label  }
\bigskip
\hrule\bigskip
\rm

       Adds a label. This option is identical to the process of typing a
       label and doing a chroma-keyed copy, but is less flexible in that only
       text can be pasted. The function is mainly provided to provide 
       similarity to other programs, in case someone tries to use the program 
       without reading the manual. 


\bigskip\hrule\bigskip
\bba { 8.5.2   Set foreground color   }
\bigskip
\hrule\bigskip
\rm
        Changes the foreground (drawing) color. 
        The foreground color is used for all text, lines, circles,  spray,
        arrows,  etc.  
        The foreground color can also be changed by clicking the left
        mouse button when the mouse cursor is pointing to the desired
        color in the `colormap display' (the long vertical bar or
        square at the right of the screen). 
        

\bigskip\hrule\bigskip
\bba { 8.5.3   Set background color   }
\bigskip
\hrule\bigskip
\rm
        Changes the background color. 
        The  background color is used for the backspace
        and delete keys, and when erasing an image from the screen.
        The background color can also be changed by clicking the right 
        mouse button on the colormap display. Because it is possible
        to have images and text on the background, changing the background
        color does not immediately redraw the background in the new 
        color. This can be done by selecting ``Erase background''.



\bigskip\hrule\bigskip
\bba { 8.5.4   Line  }
\bigskip
\hrule\bigskip
\rm


        Draws lines. Click at the starting position, drag to  the  end
        position,  and  then  release  to  draw a straight line. Click
        anywhere on the top menu bar to return to normal mode.


\bigskip\hrule\bigskip
\bba { 8.5.5   Circle    }
\bigskip
\hrule\bigskip
\rm
 Draws circles of the specified size.

\bigskip\hrule\bigskip
\bba { 8.5.6   Box   }
\bigskip
\hrule\bigskip
\rm
   Draws boxes by the click-and-drag method.


\bigskip\hrule\bigskip
\bba { 8.5.8  Curve  }
\bigskip
\hrule\bigskip
\rm

  Draws a curve or line defined by user-selected control points.  

\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.5.8.1  Bezier curve   }
\bigskip
\hrule\bigskip
\rm

       Draws  a  smooth  curve. Click on the desired locations for the
       control points. At least 3 points are required to draw a curve.
       The position of each control point is indicated by a small box.
       The control points can be moved interactively by clicking on an
       existing box and  dragging  it  to  a  new  location.  Clicking
       outside  a  box  creates  a  new  control  point.  When you are
       satisfied with the shape of the curve, pressing any key  erases
       the  small  boxes and makes the Bezier curve permanent. You can
       have a maximum of 199 control points.
   


\bigskip\hrule\bigskip
\bba { 8.5.8.2  B-spline curve   }
\bigskip
\hrule\bigskip
\rm


       Similar to Bezier curve, except has a maximum  of  196  control
       points.  B-spline  curves differ from Bezier curves in that the
       curve tends to be closer to the control points and  sharper  in
       appearance. 
 

\bigskip\hrule\bigskip
\bba { 8.5.8.3 Least-squares line  }
\bigskip
\hrule\bigskip
\rm

 Fits a straight line between the control 
       points using a least-squares algorithm.
 

\bigskip\hrule\bigskip
\bba { 8.5.8.4  Polygon  }
\bigskip
\hrule\bigskip
\rm
  Draws a polygon through an arbitrary number of control points.

\bigskip\hrule\bigskip
\bba { 8.5.8.5  Trapezoid  }
\bigskip
\hrule\bigskip
\rm
  Draws a trapezoid through 4 control points. The control points should be
  selected in a clockwise direction.

\bigskip\hrule\bigskip
\bba { 8.5.8.6  Snap trapezoid  }
\bigskip
\hrule\bigskip
\rm
  Draws a trapezoid through 4 control points. The control points should be
  selected in a clockwise direction. The first and third line segments are
  forced parallel to each other (so it is really a parallelogram).

\bigskip\hrule\bigskip
\bba { 8.5.8.7  Fixed-width rectangle  }
\bigskip
\hrule\bigskip
\rm
  Draws a rectangle with the specified width (in pixels) through two 
  control points.





\bigskip\hrule\bigskip
\bba { 8.5.7   Text direction    }
\bigskip
\hrule\bigskip
\rm
 Toggles between normal and 90 $\deg$ rotated text.



\bigskip\hrule\bigskip
\bba { 8.5.8  Font  }
\bigskip
\hrule\bigskip
\rm


   Currently, fonts are only available on the Unix version. You can 
   select from any font available in X Windows. See the X man pages for 
   additional information. If you add new fonts, delete the file ``fonts''
   so that the font list will be regenerated.



\bigskip\hrule\bigskip
\bba { 8.5.9   Sketch    }
\bigskip
\hrule\bigskip
\rm

  In sketch mode, whenever the left mouse button is pressed, a continuous 
  line is drawn on the screen. Sketch mode is also toggled on/off by the F2 key.
                            

\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.5.10  Fill region   }
\bigskip
\hrule\bigskip
\rm

        Flood fill

        Fill type

\it          Solid    \rm       - fills a region with a constant color

\it          Horiz.Gradient  \rm - fills a region with colors increasing or
                            decreasing left to right    

\it          Vert.Gradient \rm  - fills a region with colors increasing or
                            decreasing top to bottom
                            
\it        Solid fill color  \rm - Used for `solid' fills only. Specifies the
                            color to be used when filling.
                            
\it        Max border color, 
           Min border color    

\rm      In  a  flood  fill, all pixels in a given region bounded by a
         ``border color'' are changed. Outside the border, the image  is
         unchanged.  In  TN-Image, instead of one single border color,
         you can select a range of colors. Any pixel within that range
         will act as a border. For example, if  you  set  Max.  border
         color = 200 and Min. border color = 127, then only the region
         containing  pixels  less than 127 or greater than 200 will be
         filled. This is useful since many real-world  images  do  not
         contain  a single continuous line of pixels which could serve
         as a ``border''.
         
         If you try to fill a bounded region (such as a box), the color 
         of the boundary must be between the minimum and maximum border
         colors. Otherwise, the color will spill out of the region and
         possibly ruin other images on the screen.


\bigskip\hrule\bigskip
\bba { 8.5.10.1 Gradient fill  }
\bigskip
\hrule\bigskip
\it

        Grad start coordinate,  
        Grad end coordinate -
        
\rm      Specifies the starting and ending reference coordinates that will 
         be used to calculate the color. The closer the starting and ending 
         coordinates are to each other, the steeper the gradient. The ``Start
         Gradient Color'' will be used at the Start Coordinate and the ``End
         Gradient Color will be used at the End Coordinate. All other colors
         will be calculated from these 2 points. Note that filling itself  
         is bounded by the Border Color and not by the Start and End 
         coordinates.

         For horizontal gradients, use x values for the start and end
         coordinates; when making vertical gradients, use y values.

\bf        For 8 bit/pixel screen modes:

\it          Start gradient color

          End gradient color  
\rm                             - Selects the intensity value that is to be 
                                used at the starting and ending coordinates,
                                respectively.

\bf      For other bit/pixel screen modes:

\it       Start gradient red

          End gradient red   

          Start gradient green

          End gradient green 

          Start gradient blue 

          End gradient blue \rm  - Selects the RGB color value that is to be 
                                used at the starting and ending coordinates,
                                respectively.

\medskip
       These parameters specify the color values to use at the gradient
       starting and ending coordinates. Note that the  ``starting'' color
       can  be  larger  or smaller than the ``ending''  color. This gives
       greater flexibility, especially in true-color modes, for creating
       a blend of one color into another. 
                            
       Sometimes,  as when filling the inside of letters in text, it is
       desirable to have the appearance of the same gradient  extending
       out  of  sight  between  the letters. This can be done easily in
       TN-Image, simply by not changing the starting and ending gradient
       colors. Clicking inside each area to be filled sequentially will
       cause  the  same  colors  to be used as if the entire region had
       been filled with a gradient.
                            
       Special care should be given to starting and ending r,g,  and  b
       values  when  working  in  15-  and  16-color  modes. You should
       specify slightly different starting and ending values for each color
       in order to avoid a  ``stepped''  appearance of the gradient. This
       prevents all 3 colors from being incremented at the  same  place
       on the screen, due to the fact that each color only has 31 or 63
       discrete values.
                            
\proclaim       Example 1.
       Creating a rectangular area with a gradient increasing in brightness
       from left to right.
       
\item{1.}  Start TN-Image in mode 103 by typing:
\tt             tnimage -mode 103 \it ( DOS version )
\rm
\item{2.} Click on the colormap palette to select a light color, e.g., 250.
\item{3.} Select ``Draw...Box'' and draw a box. Note that the box is drawn in
          color 250.
\item{4.} Make a note of the starting and ending x coordinates of the box
          (Shown on the menu bar).
\item{5.} Select ``Draw...Fill region''.
\item{6.} Click on ``Horizontal gradient''.
\item{7.}For ``Grad start coordinate'' enter the leftmost x position of
          the box.
\item{8.} For ``Grad end coordinate'' enter the rightmost x position of
          the box.
\item{9.} Enter 251 and 249 for ``Max border color'' and ``Min border color'',
          respectively. The flood fill will stop at any pixel that is a
          249, 250, or 251.
\item{10.}For ``Start gradient color'' and ``End gradient color'' enter 0 and
          255, respectively. This will cause the color to change from 0
          to 255 as x changes from the starting to ending coordinate of
          the box.
\item{11.}Click on ``OK''.
\item{12.}Move the mouse to any point inside the box and click. The box 
          should fill up with the gradient.
          
\bigskip
\proclaim       Example 2.
       Removing a gradient background from an image (flattening the
       background). 

           If an image is too light on one side and too dark on the other,
       one way to fix it is by adding or subtracting an artificial gradient.
       In the Registered version, this can be done automatically, by 
       selecting ``Filter...Background Flatten''.

\medskip       
\item{1.} Move all images off to one side to create a blank area on the 
          screen.
\item{2.} Select ``Color...Set colors'' and change the background color to
          black (0) and the foreground color to white (e.g.,255).
\item{3.} Draw a box as in Example 1, slightly larger than the image that
          has the uneven background.
\item{4.} Set the Grad Start and Grad End Coordinates to match the position
          of the box.
\item{5.} Set the Max and Min Border Colors so that the color of the box
          is between the Max and Min Border Color.
\item{6.} Set the Start and End Gradient Colors to values which, when added
          to the corresponding parts of the image, will equalize the 
          intensity. For instance, if the image colors are mostly 10-20 on 
          the left and 90-100 on the right, set the Start and End Gradient
          Colors to 80 and 0, respectively. The imarge should be dark enough
          so that adding these colors will saturate the image. If the image
          is too light already, you should set the Start and End Gradient
          Colors to 0 and 80, respectively, and use ``Subtract'' instead of
          ``Add'' below.
\item{7.} Fill the box with the gradient.
\item{8.} Move your image back onto the screen (don't cover the gradient).
\item{9.} Select ``Configure...Set pixel mode'' and click on ``Add''.
\item{10.} Select ``Image...Copy'' and click-and-drag to copy a region from
          your image. Paste it on top of the gradient. The image will be
          ``added'' to the gradient.
\item{11.} Select ``Configure...Set pixel mode'' and set the pixel mode back
          to ``Overwrite''.
\item{12.} Select ``File...Create Image'' and select the area you just pasted.
          This will put the modified area into an image buffer.
\item{13.} Select ``Image...Erase Background'' to clean up the desktop.


\vfill\eject
\bigskip\hrule\bigskip
\bba { 8.5.11  Paint Region  }
\bigskip
\hrule\bigskip
\rm
       Sets a rectangular  region  to  the  foreground  color.  After
       selecting  `paint region', move the mouse cursor to one corner
       and click and drag to the other corner. The selected area will
       be painted.



\bigskip\hrule\bigskip
\bba { 8.5.12  Spray  }
\bigskip
\hrule\bigskip
\rm
      Creates a spray-paint  effect. Click the left mouse button at
      the center of the region to be sprayed.  The  area  covered  is
      determined by the ``spray factor'' in the ``configuration'' menu.
      Click the main ``Cancel'' button at left to return to normal mode.

\bf 8.5.12.1 Fine spray  \rm

      Creates a solid spray painting effect. Click the left mouse button at
      the center of the  region to be sprayed. The area covered is
      determined by the ``spray factor'' in the ``configuration'' menu.

\bf 8.5.12.2 Diffuse spray   \rm

      Diffuse spray sets the pixels around the cursor to the foreground (drawing) 
      color, but in a diffuse pattern.

\bf 8.5.12.3 Math spray   \rm

     Math spray allows you to enter any mathematical formula to be applied to
     all the pixels in a fixed area around the cursor. This can be used to
     interactively copy small parts of another image or a different part of
     the image. For example, you could enter the formula
     
     \tt i=image[1][0][x+100][y+100] \rm  .
     
     This would copy pixels from image no. 1, frame 0, 100 pixels to the right
     and below the mouse cursor, for a pattern retouching or texture mapping
     effect. The image number can be the same image or a different one (see 
     \it image algebra \rm).
     
     If the image is color, the red, green, and blue components can have
     independent equations.

\bf Spray only once \rm

    If this box is checked, math spray will only modify each pixel once. 
    This is useful in preventing overlap of the sprayed region by successive
    passes with the mouse.
    
\bf Spray factor \rm

    Determines the size of the area to be affected.



\bigskip\hrule\bigskip
\bba { 8.5.13  Add border  }
\bigskip
\hrule\bigskip
\rm
 Puts a border around the current image. The border 
       color is selectable.





\vfill\eject
\bigskip\hrule\bigskip
\bbc { 8.6.0   About menu   }
\bigskip
\hrule\bigskip
\rm



\bigskip\hrule\bigskip
\bba { 8.6.1   About the program  }
\bigskip
\hrule\bigskip
\rm
     Displays the version number, operating system, amount of free memory, 
     the number of images currently loaded, the number of images that
     have been backed up, and the x and y starting position of the current 
     (top) image. You can also use this option to switch to a different
     image, by selecting the desired image from the list with the arrow 
     keys or mouse, and pressing \it Enter \rm or clicking on \it OK \rm.



\bigskip\hrule\bigskip
\bba { 8.6.2   About the file   }
\bigskip
\hrule\bigskip
\rm

                            Displays a variety of technical information
                            about your image file. This is useful in
                            diagnosing problems with reading a possibly
                            corrupted file or in getting parameters from
                            an unknown file format such as that produced by
                            certain specialized frame grabbers. 


\bigskip\hrule\bigskip
\bba { 8.6.3   About the image   }
\bigskip
\hrule\bigskip
\rm

                            Displays a variety of information about the
                            currently-selected image, including whether
                            it is backed up, has an FFT, its original 
                            filename and image depth, etc.
                            

\bigskip\hrule\bigskip
\bba { 8.6.4   How to register  }
\bigskip
\hrule\bigskip
\rm
                            Displays vital information concerning how to
                            register your copy of TN-Image and obtain a
                            more powerful version along with technical 
                            support.  \it (DOS version only) \rm
                            


\vfill\eject
\bigskip\hrule\bigskip
\bbc { 8.7.0   Configure menu  }
\bigskip
\hrule\bigskip
\rm



\bigskip\hrule\bigskip
\bba { 8.7.1   Show menu bar (DOS)  }
\bigskip
\hrule\bigskip
\rm

    If checked, the menu bar at the top will be continuously visible.
    Sometimes it is  convenient to make it invisible, as when
    photographing the screen.  Even when invisible, clicking on the
    appropriate region will still activate the menu  (\it DOS version only \rm).


\bigskip\hrule\bigskip
\bba { 8.7.2   Show menu bar 2  }
\bigskip
\hrule\bigskip
\rm
 Displays additional information. Toggles
    the second menu bar on/off (\it DOS version only \rm).


\bigskip\hrule\bigskip
\bba { 8.7.5   Redraw colormap   }
\bigskip
\hrule\bigskip
\rm

   Click the left mouse button to indicate where the new colormap strip
    should go. The colormap strip is redrawn in a
    window of its own, separate from the images.  The colormap can be used 
    to select the foreground and background colors (by clicking the left 
    or right mouse buttons, respectively, on the desired color). 


\bigskip\hrule\bigskip
\bba { 8.7.6   Show O.D. table  }
\bigskip
\hrule\bigskip
\rm

    Draws a graph showing the correspondence between pixel values (0
    to 255) and optical  density,  as  calculated  by  the  scanner.
    Typically,  only  TIF  files  from  scanners  have an O.D. table
    (referred to in TIF files as a `gray  response  curve'.  If  the
    image  does  not provide one, TN-Image will create a linear O.D.
    table. (\bf Note: \rm most Macintosh TIF files do not have O.D. tables.)
        
    The O.D. table is only  meaningful  in  monochrome/indexed-color
    modes  (8  bits/pixel).  It is also known as a ``gamma correction
    table''.  Each image can have a separate O.D. table. 

    Changing this O.D. table is possible but not recommended.
  

\bigskip\hrule\bigskip
\bba { 8.7.7   Pixel interact mode   }
\bigskip
\hrule\bigskip
\rm

    Selects how 2 pixels interact with each other when  you  copy  and
    paste parts of an image, read an image from disk, or add graphical
    elements.
                            
\it    Overwrite  \rm - Default mode. The new pixel erases the old pixel. This
    is by far the fastest mode. 

\it    Maximum \rm  - The larger of the 2 values is used.

\it    Minimum \rm  - The smaller of the 2 values is used.

\it    Add    \rm   - The 2 values are added (up to the maximum value).

\it    Subtract \rm - The new value is subtracted from the old value (with a 
                minimum result of 0).

\it    XOR    \rm   - The 2 values are XOR'd with each other.

\it    Average \rm  - The 2 values are averaged.

\it    Superimpose \rm - The new pixel replaces the old pixel unless the new pixel's
                value is 0, in which case the old pixel is unaffected (allows
                superimposing images with parts ``masked out'').
                      
\bigskip   
\proclaim    Example 1. Finding subtle differences between two images (also creates a
               silhouette effect).

\item{1.}  Load an image into TN-Image.
\item{2.}  Select ``Pixel interaction mode...Subtract''.
\item{3.}  Select ``Load image'' and change ``x position'' and ``y position'' to 2.
\item{4.}  Click on ``OK''.
\item{5.} You now have a subtracted image. (It may be necessary to make it 
         lighter or increase its contrast.)
                                     
\bigskip   
\proclaim     Example 2. Creating contour maps of an image.

\item{1.} Load an image into TN-Image.
\item{2.} Select ``Pixel interaction mode...XOR''.
\item{1.} Select `copy', and click-and-drag to select a portion of the image.
\item{1.} Release the mouse button.
\item{1.} Move the mouse to a location 1 pixel to the right and 1 pixel 
         below the original position and click the mouse button to put 
         the copy in place.
\item{1.} You now have a crude contour plot of your image. The gradient 
         sensitivity of the contour plot can be decreased by using an 
         offset of 2 or more pixels in step (5). You can also ``threshold'' 
         the plot by subtracting a value (``make darker'') and then adding 
         it back(``make lighter'').
              
\bigskip   
\proclaim 
    Example 3. Reducing chunkiness in image.

\item{1.} Read an image into TN-Image.
\item{1.} Select ``Pixel interaction mode...Average''.
\item{1.} Select ``Load image'' and change ``x position'' and ``y position'' to 2.
\item{1.} Click on ``OK''.
\item{1.} You now have an image that is smoother without becoming blurred.
                                 
\bigskip
    Don't forget to change ``Pixel interact mode'' back to ``Overwrite'' 
    afterwards.
                            
\bf    NOTE: \rm Don't forget that, when loading an image, unless the
    interact mode is ``overwrite'', the image will interact not only
    with other images but also with the background in areas where no
    image is present. Thus it may be helpful to set the background
    color to black first, to avoid unexpected results.
 
\vfill\eject
\bigskip\hrule\bigskip
\bbb { 8.7.8  Configure...  }
\bigskip
\hrule\bigskip
\rm
    Configures the following options:


\bigskip\hrule\bigskip
\bba { 8.7.8.1   Automatic undo  }
\bigskip
\hrule\bigskip
\rm

                            If checked, automatically creates an
                            ``undo buffer'' when a new image is read.
                            This can also be done manually, by
                            selecting ``Process...Backup image''.
                            If you make a mistake when filtering or
                            adding text to the image, you can
                            restore the most recent backup from the
                            undo buffer by selecting ``Process...Restore''. 


\bigskip\hrule\bigskip
\bba { 8.7.8.2  Spray factor   }
\bigskip
\hrule\bigskip
\rm
     Controls the area affected by ``fine spray'', ``math spray'' , 
     and ``diffuse spray'' (in ``Draw...Spray''  menu).



\bigskip\hrule\bigskip
\bba { 8.7.8.3  Cursor movement rate  }
\bigskip
\hrule\bigskip
\rm
                            Controls (a) distance moved by the mouse
                            cursor when the arrow keys are pressed,
                            and (b) the distance which an image moves
                            when you click one of the 4 arrows at
                            the top of the screen.    


\bigskip\hrule\bigskip
\bba { 8.7.8.4  Color settings   }
\bigskip
\hrule\bigskip
\rm
                            Changes the default parameters used by TN-Image
                            when converting images.
\medskip
\it         Color reduction method \rm - used when converting a color image to
                            indexed-color (8 bit/pixel) modes.
                            
\medskip
\it           Quantization  \rm - (Default) Calculates the optimal set of 256
                            colors to match the image as closely as 
                            possible.
                            
\medskip
\it           Fit current colormap   \rm              
                          - Calculates the closest match to the currently-
                            selected colormap. This method can give a 
                            smoother result than quantization or it can give 
                            garbage, depending on how closely the colors in 
                            the colormap match the image.  
                            
                            If there are several images that need to be
                            converted to the same colormap, the best procedure
                            is to convert the first one using quantization
                            then convert the rest by fitting to the current
                            colormap.
                            
                            This method is used automatically for 3D images.
                            


\bigskip\hrule\bigskip
\bba { 8.7.8.5  Significant digits  }
\bigskip
\hrule\bigskip
\rm
    Changes the number of significant digits to display when using a 
    floating-point number.

\bigskip\hrule\bigskip
\bba { 8.7.8.6  Crawl delay   }
\bigskip
\hrule\bigskip
\rm
   Selects the speed of the ``crawling'' of the box that indicates the selected 
   area. A value of 4000 disables crawling. A lower value causes faster crawling, 
   but too low a value will cause flicker on some displays, and slows down the
   mouse cursor on slower machines.


\vskip 1 in
\bigskip\hrule\bigskip
\bba { 8.7.8.7 Crawl density  }
\bigskip
\hrule\bigskip
\rm

    Selects the number of dots in the ``crawling box'' that indicates the selected 
    area. A smaller value makes the box easier to see, but slows down the mouse 
    cursor on slower machines.



\bigskip\hrule\bigskip
\bba { 8.7.8.8 Active color planes  }
\bigskip
\hrule\bigskip
\rm
    Selects which colors (red, green, or blue) are capable of being modified. 
    For example, if ``red'' and ``green'' are un-checked, smoothing the image
    would only smooth the blue component, while the red and green components 
    were unaffected.  Using this method to sharpen one color, while leaving
    the other colors unaffected, or warping a single color, can create an 
    unusual artistic effect.
                                                     
    This feature only works for color images greater than 8 bytes/pixel. 
    To use color planes on an 8 bit/pixel image, select ``Color...Change color
    depth'' and convert the image to 24 bits/pixel.

\bigskip\hrule\bigskip
\bbc { 8.8.0  Help  menu }
\bigskip
\hrule\bigskip
\rm
  
    Displays the Help screen. Context-sensitive help is also available
    for several topics by clicking on the ``Help'' button.
 

\vfill\eject
\bigskip\hrule\bigskip
\bbc { 8.9.0  Miscellaneous features }
\bigskip
\hrule\bigskip
\rm


\bigskip\hrule\bigskip
\bbc { 8.9.1 Frame rate test }
\bigskip
\hrule\bigskip
\rm

\bf      Alt-T   \rm -   Test video 
                   Tests the maximum frame rate of your video system. 
      
      Here are some typical frame rates (fps) in DOS on a 80486 33MHz PC
      with ISA:

% make columns with 2 inches on left then spacing the width of 3 'm's.

\medskip      
\settabs \+  & \hskip 2 in mmm & mmm & mmm & mmm & mmm & mmm & mmm & mmm & mmm & mmm\cr
\+  \hskip 1 in                           &     &       &      &  Screen mode                      \cr
\+   \hskip 2 in &  Video card      &mode  &100    &101   &103   &105   &107   &111   &112   &115  \cr
\+   \hskip 2 in &                  &xres  &640    &640   &800   &1024  &1280  &640   &640   &800  \cr
\+   \hskip 2 in &                  &yres  &400    &480   &600   &768   &1024  &480   &480   &600  \cr
\+   \hskip 2 in &                  &bpp   &  8    & 8    & 8    & 8    & 8    &16    &32    &32   \cr
\+   \hskip 2 in &  --------------------- & -----&  ----- & ----- & ----- & ----- & ----- & ----- & ----- & ----- \cr      

\settabs \+  & \hskip 2 in mmmmmm & mmm & mmm & mmm & mmm & mmm & mmm & mmm &\cr
\+   \hskip 2 in &   \#9GXE64-2MB VRAM S3  &  -- &  7.69 & 4.54 & 4.34 & 3.33 & 2.63 & 2.50 & 1.00 \cr
\+   \hskip 2 in &   ATI Expression Mach64 \hskip 2 in & 12.5&  9.09 & 5.26 & 5.55 & 1.27 & 2.63 & 1.59 & 0.89 \cr
\+   \hskip 2 in &  Kelvin 64 (Cirrus) 2MB& 16.7& 12.50 & 8.33 & 5.00 & 3.33 & 3.22 & 1.89 & 2.00 \cr
\+   \hskip 2 in &  Tseng ET4000 8-bit*   &  4.3&  3.57 & 2.22 & 1.61 &  --  &  --  &  --  &  --  \cr
\+   \hskip 2 in &  Trident 8900 1MB      & 10.0&  8.33 & 4.34 &  --  &  --  &  --  &  --  &  --  \cr
\+   \hskip 2 in &  Realtek 1MB RTG3106   &  8.3&  6.66 & 4.00 & 2.85 &  --  &  --  &  --  &  --  \cr

\rm\medskip      
      * = Card in bad shape
      -- = Unable to set mode             
\medskip
      Speed is not the most important parameter, however. On a high-quality
      monitor, cheaper cards may appear fuzzy or jittery or have weird-
      looking fonts. PCI bus video cards are in general about 5-10 times
      faster. Frame rates will be much lower in Unix X11 versions
      and Windows versions of the program (if one becomes available).


\bigskip\hrule\bigskip
\bbc { 8.9.2 Emergency image repair }
\bigskip
\hrule\bigskip
\rm

\bf      Alt-R  \rm -  Rebuild screen display
                 If for some reason the display is incorrect, Alt-R will 
                 cause it to be rebuilt. 

\bigskip\hrule\bigskip
\bbc { 8.9.3 Erase image }
\bigskip
\hrule\bigskip
\rm

\bf      Alt-E  \rm -  Erase image
                 Erases the currently-selected image (after asking you).
                 Useful if memory somehow gets filled with images and there
                 is insufficient memory to open a window. This can sometimes 
                 happen in a Windows DOS box but should not happen in DOS or
                 Unix.


\bigskip\hrule\bigskip
\bbc { 8.9.4 Sketch mode }
\bigskip
\hrule\bigskip
\rm
                 
                 
\bf     F2   \rm   -  Toggles Sketch mode on/off












    
\vfill\eject
\bigskip\hrule\bigskip
\bbc { 9.0.0  Windows and OS/2 compatibility }
\bigskip
\hrule\bigskip
\rm
 
      It is recommended to use the included PIF file (TNIMAGE.PIF) when
      running TN-Image under Windows. 
      
      The suggested procedure is:
\item{1.}   Copy and unzip TN-Image in the desired location, e.g., 
                  C:$\backslash$ TNIMAGE.
\item{2.} In Windows, Select ``File...New program item''
\item{3.} Set ``Description'' to ``TN-Image''.
\item{4.} Set ``Command line'' to C:$\backslash$ TNIMAGE$\backslash$ TNIMAGE.PIF 
\item{5.} Set ``Working directory'' to C:$\backslash$ TNIMAGE
\item{6.} Set ``Shortcut Key'' to ``none''
\item{7.} Leave ``Run minimized'' unchecked.
\item{8.} Select ''Change icon'' and enter ``C:$\backslash$ 
            TNIMAGE$\backslash$ TNIMAGE.ICO''
\item{9.} Click on ``OK''.
\medskip

\bf   Virtual Memory

\rm  Because Windows takes over virtual memory, running TN-Image  
      under Windows will affect virtual memory usage. Before starting
      TN-Image, make sure the amount of Virtual Memory selected in the
      Windows Control Panel is greater than the amount of RAM in your
      computer. Also, check to make sure there are several MB of free
      disk space and that all other applications and windows are closed. 
      Failure to do this can result in frequent ``Out of memory'' 
      errors. Windows' virtual memory is much slower than the VM built 
      into TN-Image. Hence, there is no particular advantage to running 
      TN-Image under Windows. Also, as with all applications, speed 
      under Windows will be markedly slower than in DOS.
        
      A peculiarity of Windows is that if you have the wrong mouse
      driver installed in Windows, you can lose control of the mouse when
      you run a mouse-based DOS program such as TN-Image. If this
      happens, run the ``setup'' program in Windows to ensure  that
      Windows is set up to use the mouse driver that is appropriate for
      your mouse. For example, if you have a Logitech mouse, using the
      Microsoft mouse driver may cause the mouse to become immobilized
      when you return from TN-Image.  Because Windows uses a different 
      mouse driver from DOS, the mouse  may work under Windows but not 
      in a DOS box. If the mouse doesn't work right when running under 
      Windows, you almost certainly need a new (or different) mouse driver. 
      An alternative approach which sometimes works for some reason is to 
      change Windows from its default VGA screen mode to a 256 color mode. 
      Many of these problems have been fixed in Windows 95.
       
      Windows 3.1 also has an ``unexpected feature'' of sometimes not 
      redrawing its own screen when returning from DOS graphics programs 
      such as TN-Image. One solution is to ``minimize'' the Windows screen 
      after returning from TN-Image and then immediately ``Restore'' it. This 
      forces Windows to redraw its screen.

      Computers with ATI Mach 32 cards have problems running TN-Image 
      in true-color mode from within a DOS box. In this case, the only 
      solution is to run TN-Image from DOS, or use TN-Image in an 8 bit/pixel 
      mode (e.g., mode 103). (See ``Command-line options'' above). Mach 64
      cards are a little better (they can handle 16 bit/pixel modes, but
      still can't handle 24 bit modes in a DOS box). Most other cards have 
      no problems.

      For both OS/2 and Windows, TN-Image must be run in ``full screen'' mode.
      For OS/2, it may be necessary to change the DOS box parameters to
      get TN-Image to run properly.  TN-Image may not run on all
      OS/2 configurations, because it needs to access the hardware.

\bf  Note: \it No technical support is available for TN-Image 
     running under OS/2.
      
\bf   NOTE:
\rm   In a Windows DOS box, the virtual memory manager in TN-Image 
      sometimes gets confused if Windows is set up for a small amount 
      of virtual memory.  This causes the ``Free Memory'' display to be 
      incorrect, and more importantly, allows you to completely fill up 
      memory with images, making it impossible to use the menus. If this
      happens, you can still erase an image by clicking on the image you
      want to erase and pressing Alt-E.  We are trying to find a better
      solution for this problem. In the meantime, it is recommended that
      Window's virtual memory be set to a size greater than the amount
      of RAM in your computer.
      
      

\vfill\eject
\bigskip\hrule\bigskip
\bbc { 10.0.0  Changing Computers  }
\bigskip
\hrule\bigskip
\rm
     If you experience problems after moving TN-Image to a different 
     computer, or after changing video cards, erase the file TNIMAGE.INI. 
     This file contains TN-Image's video mode selection, and may inhibit 
     automatic detection of the video chip in your new computer. TN-Image 
     will revise the file automatically if it detects an incompatibility.


\bigskip\hrule\bigskip
\bbc { 11.0.0  Problems }
\bigskip
\hrule\bigskip
\rm


\medskip\it     Problem: \rm Strange colors on screen or TN-Image only using top 1/12 
     or 1/7 of the screen.
     
\medskip\it     Solution: \rm Some other Super VGA programs and communication programs
     (such as some versions of Carbon Copy) contain an ``unexpected
     feature'' that results in the computer being left in a state that
     prevents proper functioning of TN-Image with certain video cards.
     The DOS shell program 1Dirplus and one HPLC data-acquisition
     program also have a similar feature which can interfere with the
     colormap registers. If TN-Image suddenly begins to run incorrectly
     after running one of these programs, reboot your computer and
     start TN-Image again. This can also occur when running TN-Image 
     as a DOS box in OS/2. Change the DOS box parameters to correct 
     the problem.
     
\medskip\it     Problem:  \rm Entire screen compressed into upper 1/7 of the screen.
     
\medskip\it    Solution: \rm (1) Try starting TN-Image with the command line: 

\tt          TNIMAGE -OLDVESA

\rm     (2) If that doesn't work, you probably are using an outdated VESA
     VBE TSR (Terminate-and-stay-resident program). Obtain a new version 
     from the video card manufacturer. Note that most new video cards 
     already have VESA BIOS built in, and don't need a TSR. Try running 
     TN-Image without it. If nothing works, contact the author for 
     assistance.
     

     
\medskip\it     Problem: \rm Lower part of screen flickering (upper 2/3 of screen is
     okay, lower 1/3 is ``snow'' or ``static''.

\medskip\it     Solution: \rm This occurs when the video card reports to TN-Image that 
     it is OK to set the specified high-resolution screen mode, but in 
     fact the card has insufficient video RAM to handle it. This will
     occur on certain Cirrus-based cards. To solve the problem, it is
     necessary to install additional memory in your video card. Using
     TN-Image when this problem occurs could result in a system crash.

     
\medskip\it     Problem:  \rm Screen is completely white.
     
\medskip\it     Solution:  \rm This occurs when using one of the ``experimental'' Tseng
     modes, if the video card is unable to handle the specified screen
     mode. Press Alt-X two or three times to return to DOS, then use
     the ``mode'' command line option to run TN-Image in a different 
     resolution.


\medskip\it     Problem: \rm  Multiple copies of Menu Bar.
     
     Solution: \rm  This is usually caused by an old video card with VESA 
     1.0 BIOS. Start TN-Image again using the command line:

\tt                         TNIMAGE -OLDVESA

\rm     This can also happen if the \tt UNIVBE \rm TSR is present.
     \tt UNIVBE \rm must be removed in this case.
     
     
\medskip\it     Problem: \rm  Printer prints part of image, then gives an 
     error message
     or goes into a ``form feeding frenzy''.
     
\medskip\it       Solution: \rm   This can occur on laser printers 
     if your printer has 
     insufficient internal memory to handle the image. You will have 
     to install additional printer memory, print a smaller image or
     print at a lower resolution or dither size. Generally, �4 MB is 
     required to print a 8x10 inch page in black-and-white at 600 dpi. 
     Color printing requires 3 or 4 times as much. Unfortunately, there 
     is no way for TN-Image to test how much memory the printer has. For 
     some reason, printer manufacturers have also made it impossible 
     to print an image in small segments. This problem does not occur 
     on inkjet printers.

         This will also occur if printing is attempted on a dot-matrix
     printer.


\medskip\it      Problem: \rm Mouse gets ``lost'' when running TN-Image 
     from a Windows DOS box.
 
\it     Solution:  \rm This occurs with some Microsoft and possibly other 
     mouse drivers. Exit Windows, and replace your mouse driver with a newer 
     version or with a Logitech mouse driver. Then use Windows' Setup 
     program to change to the new mouse. Alternatively, use Windows' 
     Setup program to change Windows' screen display to 256 colors
     (It's not known why this helps). These problems have not been observed
     in Windows 95.


\medskip\it     Problem: \rm Screen is not restored correctly after running TN-Image 
     from a Windows DOS box.
     
\medskip\it     Solution:  \rm Install a different video driver in Windows using 
     Windows' Setup utility. 
     

\medskip\it     Problem: \rm Mouse jumps around on the screen, or exhibits jerky
     movement as if trapped in a grid. 
     
\medskip\it     Solution:  \rm Obtain a new mouse driver. This can usually be obtained
     from a bulletin board or ftp site operated by the mouse manufacturer.
     Alternatively, Logitech mouse drivers can work on many mice. Older
     mouse drivers often have trouble in SVGA modes. Microsoft mouse
     drivers are particularly prone to these sorts of troubles. Some 
     old SVGA cards, such as Realtek video cards, create difficulties
     with the mouse, making it possible to reach only x and y coordinates
     that are divisible by 4. In this case, the video card must be 
     replaced.
     



\medskip\it     Problem: \rm Screen is garbage when running TN-Image from a Windows
     DOS box, even though there is lot of video RAM.
  
\medskip\it     Solution: \rm This is a problem in computers with ATI video cards in
     Windows for Work Groups for some screen resolution modes.
     Run TN-Image at a lower color depth by changing the ``Command Line'' 
     entry in Windows' ``Properties'' menu to:

\tt                  C:$\backslash$TNIMAGE$\backslash$TNIMAGE.PIF -mode 103  

\rm     Alternatively, run TN-Image from DOS.



\medskip\it     Problem: \rm Unusual behavior or display colors immediately after 
     upgrading from a previous version of TN-Image.
     
\medskip\it     Solution: \rm Delete the configuration file ``tnimage.ini''.



\medskip\it     Problem:  \rm Colors appear posterized.
     
\medskip\it     Solution:  \rm This will happen on 8-bit displays if other 
     applications (such as Web browsers or certain window managers) allocate a 
     lot of colors, This can also happen after using certain other image
     viewing programs, particularly if they crash and fail to release their
     allocated colors. If closing other applications or restarting the X server
     doesn't help, try starting the X server in 16- or 24-bit mode. If this is
     not possible, it may be necessary to switch to a different window manager.


\medskip\it     Problem: \rm Operations such as inverting colors, etc. on the main
     window give a solid color instead of the expected inverted text.
     
\medskip\it     Solution: \rm This occurs when foreground and background colors
     are adjacent numerically (e.g., 40 and 41) but their actual colors (determined
     by the colormap) are different. Inverting the colors makes the color values 
     215 and 214, which map to similar colors. Change the foreground or 
     background color to something else.



\medskip\it     Problem: \rm Message ``Invalid image file'' appears after transferring
     an image file from a Unix or mainframe system.

\medskip\it     Solution:  \rm The most common cause of this problem is the failure to
     use ``binary'' mode when sending the image file over the network.
     If you are using Kermit, give the command
 
\tt                    set file type binary

\rm     before getting the image. If you are using ftp, give the command

\tt                     binary

\rm     before getting the image. It is very difficult to fix an image file 
     that has been corrupted by sending it in text mode.



\medskip\it     Problem: \rm Loading or processing of images is slow.
     
\medskip\it     Solutions:  \rm  (1) Speed can be greatly increased by starting TN-Image in 
     a screen mode that has the same color depth as the images. Analyzing
     24-bit color images in 8-bit mode, for example, will be slow because
     the entire image projected to the screen has to be re-palettized every 
     time any operation changes one or more pixels.

         (2). If your hard disk light goes on during an image processing
     operation, this means TN-Image is paging out to disk. This can be 
     reduced by installing more memory in your computer.

         (3). Speed can be approximately doubled by running TN-Image
     from DOS instead of in Windows, or by removing any expanded memory 
     managers such as 386 Max or (especially) EMM386, which slows down math
     operations by over 50\%. 


\medskip\it     Problem: \rm Colormap rotation in startup screen is slow or jerky.
     
\medskip\it     Solution: \rm If you are running the Unix version, this can happen if
     another copy of tnimage is running, or if the mouse is moved
     suddenly during startup. In the DOS version, this is usually 
     caused by a slow video card.
     

     
\medskip\it     Problem: \rm  ``Insufficient memory'' message occurs even though 
   ``About the program...'' indicates there should be enough memory.

\medskip\it     Solution: \rm Turn ``Automatic undo'' option off. This will cut the storage
     requirements in half. Also, a certain amount of memory is also 
     reserved by TN-Image for dialog boxes, etc. and is unavailable.
     If this happens in Windows, you must increase the ``Virtual Memory''
     setting in Windows (``Control panel..386 Enhanced..Virtual memory.)''.


\medskip\it     Problem: \rm Video card won't go into desired screen mode, even though 
     video card manual states that mode is supported.
          
\medskip\it     Solution: \rm (1) If ATI card: Run ATI's ``Install'' program again to verify
     the specified video mode is activated. (2) Run TN-Image's diagnostics
     by typing:   tnimage -diag  to determine the problem, which is usually
     caused by insufficient RAM or a monitor limitation.
     (3) Another possibility is that the computer was turned on before
     turning on the power to the monitor. Some video cards only examine
     the monitor type at power-up, will become confused if the monitor
     is off during a cold boot-up, and refuse to set high-resolution modes. 
     


\medskip\it     Problem:  \rm Monitor makes a buzzing sound and fails to sync on startup
     (causing jagged diagonal lines on the screen).
     
\medskip\it     Solution: \rm Turn the monitor off immediately and press Alt-X several 
     times to stop the program. Restart TN-Image using a lower screen mode.
     This problem could occur if your video card reports that it is safe to 
     set a given screen mode when in fact it is not safe. Only one card has 
     been found so far that does this, when setting a 1280x1024 resolution
     mode.  Prolonged operation in this condition could harm your monitor.
     

    
\medskip\it     Problem: \rm A grayscale image appears completely black or white.
     
\medskip\it     Solution: \rm This is usually caused by the automatic grayscale mapping
     feature misinterpreting the upper and lower gray levels of your image.
     If the image is being read as ``raw bytes'', make sure you have selected 
     the correct number of bits/pixel, x size and y size. If the y size
     you entered is too large, TN-Image may read beyond the end of the 
     image and incorrectly estimate the maximum and minimum levels.
     To correct this, select ``Color...Set colormap...Grayscale mapping''
     and change the maximum and minimum values to correspond to those in
     the image. (For example, if the image is known to be 12 bits deep,
     the maximum should be approximately ${2^{12}}$ or 4096.)


     

\medskip\it     Problem: \rm ``Mouse required'' message occurs when starting TN-Image, 
     even though Windows runs OK with the mouse. 
     
\medskip\it     Solution: \rm Windows has its own separate mouse driver. It is still 
     necessary to load a mouse driver for DOS applications. Run the 
     program ``mouse.com'' that came with your mouse.
     


\medskip\it     Problem: \rm When typing text on the screen, it comes out in the wrong
     color. 
     
\medskip\it     Solution:  \rm The available colors are determined by the color depth,
     the gray scale mapping parameters and colormap (if present) of the 
     image you are typing on. For example, if an 8-bit image with a
     particular colormap is loaded, you can only add colors that exist
     in that colormap, even if TN-Image is in a 24-bit color mode. This
     prevents you from accidentally adding a color which is impossible
     to save with the image. If all else fails, press Alt-R to rebuild
     the screen display.


    
\medskip\it     Problem:  \rm The message ``Converting from 24 to 8 bits/pixel'' stays on
     the screen for a long time.
     
\medskip\it     Solution: \rm  Select ``Color...Color settings'' and make sure ``Color reduction
     method'' is set to ``Quantization'' and not ``Fit current colormap'' which
     can be slow.
    

\medskip\it     Problem:  \rm When reading color images, the colors are wrong, or it takes
     a long time.

\medskip\it     Solution: \rm  Select ``Color...Color settings'' and make sure ``Color reduction
     method'' is set to ``Quantization'' and not ``Fit current colormap'' which
     may give incorrect colors.

    
\medskip\it     Problem:  \rm After reading a GIF file or a color image, subsequent images
     in other formats appear to be ``garbage''.
     
\medskip\it     Solution: \rm  This only occurs in 8-bit/pixel screen modes. When an image 
     that does not have its own colormap is loaded, the colormap is not
     automatically changed. If the current colormap is discontinuous, the 
     new image may appear to contain garbage (of course, it is not really 
     garbage). Simply click anywhere on the background, or use the ``Change 
     colormap'' menu option to change to a continuous colormap.
    
    
\medskip\it     Problem: \rm   Medical grayscale images appear grainy or posterized; or 
     appear as strange shades of blue instead of gray.
     
\medskip\it     Solution: \rm The wrong target platform may have been selected. Select
     ``File...Create custom format'' and change the ``Target platform'' and/or
     ``Bytes to skip'' for the specified format until a smooth image is 
     obtained. 

       If you are using the Shareware version, you will need to read the
     image as a ``raw'' file and tweak the image parameters manually.
    

\medskip\it     Problem: \rm  Deconvolution result is completely black, completely white,
     or garbage. 
     
\medskip\it     Solution: \rm  This can be caused by (a) using an inappropriate point 
     spread function, (b) using a point spread function that has zero or
     near-zero intensities at one or more frequencies, or (c) wrap-around
     effects. Sometimes, adding noise to the point spread function will
     increase the intensity at the missing frequencies and solve the problem.
     Alternatively, try a less ambitious point spread function. Try dumping
     the FFT data to disk and reading it with a text editor. If the numbers
     are all ``-nan'' 's, this is a sign that the intensities were too low
     and a different psf must be used. Some images simply don't work well
     with deconvolution.
    

\medskip\it     Problem:  \rm Spots floating across screen, or jagged flickering lines.
     
\medskip\it     Solution: \rm  You are working too hard, go lie down.
     

    
\medskip\it     Problem: \rm  ``Fill Region'' was selected, but nothing happened when mouse
     was clicked on the region to fill.
     
\medskip\it     Solution: \rm  Make sure the area being filled is darker (lower intensity
     value) than \it both \rm the Max. Border Color and the Min. Border Color.
     Filling will stop whenever any color between these two values is
     encountered.


     
\medskip\it     Problem: \rm  Mouse cursor moving by itself.
     
\medskip\it     Solution: \rm  Make sure mouse is on a level surface.



\medskip\it     Problem:  \rm ``out-of-memory'' problems running TN-Image in a Windows DOS box.
     
\medskip\it     Solution: \rm   This is usually caused by an incorrect setting in
     your virtual memory. Try the following procedure to fix it:
\item{1.}  Click on Windows Control Panel
\item{2.} Click on ``386 Enhanced''
\item{3.} Click on ``Virtual Memory''
\item{4.} If the size of the Virtual memory is less than the amount of
            RAM in your computer, problems may occur. Change the amount of
            Virtual Memory to the maximum recommended by Windows; or exit
            Windows and run TN-Image from DOS.
    
    
     

\medskip\it     Problem:  \rm M-x psychiatrist doesn't work.
     
\medskip\it     Solution: \rm  You must be thinking of some other program.


\vfill\eject
\bigskip\hrule\bigskip
\bbc { 12.0.0  Limitations and known bugs }
\bigskip
\hrule\bigskip
\rm

     In the Unix version, the width or height of the viewable area cannot 
     be made larger than the width or height of the screen. Color sharing with
     other applications could also be friendlier in the Unix version. 

\vskip 0.1 in   
     When an FFT is present, it is impossible to flip the image.

\vskip 0.1 in
     When selecting a line or an area (e.g. for copying), the drag box cannot 
     leave the image in which it was started. To include parts of two images 
     or an image and background, it is necessary to start in the main 
     (background) window.

\vskip 0.1 in
     Chinese, Japanese, Arabic, and Hebrew fonts are still not handled correctly
     in Linux.

\vskip 0.1 in
     In mwm (Motif Window Manager), the arrow keys do not move the image the
     correct distance for independent windows.

\vskip 0.1 in
     It is necessary to quit and restart the program to get the menu bar to 
     wrap around onto multiple lines when the main window is made smaller than 
     the menu bar width in fvwm and olwm.

\vskip 0.1 in
     In fvwm, if an image in a separate window has scrollbars, the ``copy'' and
     ``move'' functions don't work on the main window.

\vskip 0.1 in
     Focus does not return to the previous window after the program exits.
     This appears to be the case for most Motif applications.

\vskip 0.1 in
     Densitometry does not work correctly on a Fourier-transformed image.

\vskip 0.1 in
     Gradient fills need to be easier with true-color images.

\vskip 0.1 in
     Plugins do not work in Solaris or ConvexOS. Feedback on this problem 
     from Solaris programmers will be appreciated.

\vskip 0.1 in
     It is impossible to select an area while a 3D image is being played
     as a ``movie''.

\vfill\eject
\bigskip\hrule\bigskip
\bbc { 13.0.0  Error messages  }
\bigskip
\hrule\bigskip
\rm


     All versions

     ------------

\medskip\bf
     Insufficient conventional memory to run program

     Insufficient extended memory to run program
              
\rm              These errors usually mean an extended memory manager is
              required but not present. The simplest solution is to find
              the file HIMEM.SYS (which comes with DOS) and install it
              in your CONFIG.SYS file, e.g., add the line
                      
\tt                          C:$\backslash$DOS$\backslash$HIMEM.SYS

\rm              to CONFIG.SYS (make sure HIMEM.SYS is in the DOS 
              directory before doing this).   

              Also, check to see if you have an expanded memory
              manager installed. These programs sometimes block access
              to portions of video memory or high memory.        

\medskip\bf
     Not enough memory
     
\rm              Insufficient memory to perform the requested action (see
             ``Operating under low-memory conditions'' above). This message 
             should not occur in the Registered version of TN-Image, 
             unless there is insufficient disk space.      

\medskip\bf         
     Insufficient memory to convert to 8 bits/pixel             
     
\rm              A color map table could not be generated for the image. When
             this happens, the image cannot be converted to the screen 
             resolution, leaving ``garbage'' on the screen.  Try changing 
             `color reduction method' to ``fit current colormap''. This 
             method uses less memory. Alternatively, start TN-Image in a
             color mode and try again. This message should not occur in
             the Registered version of TN-Image, unless there is insufficient
             disk space.

\medskip\bf     Internal error [...]
     
\rm              Contact author for assistance, specifying the exact message
             and the circumstances under which it occurred.
     
\medskip\bf     Can't compact free space

\rm              This can occur when you try to unload an extremely large image.
             The only consequence is that the maximum amount of free
             memory could not be recovered. Usually, erasing the image
             again will free up the space.


\medskip\bf     Too many images
     
\rm              The limit of 512 images (or 2 images for the Shareware version)
             was exceeded while attempting to read an image from disk 
             or create a new image. Don't forget that a new image is also
             created when you try to rotate or resize an image or carry out
             an FFT.
             
\medskip\bf     Image was not backed up
     
\rm              This only occurs when you select ``Restore'' when
             the ``Auto undo buffer'' option was un-checked, so that new
             images were not automatically backed up. Although un-checking
             `auto undo buffer' creates more free memory, it means that it
             will be impossible to undo any changes by selecting ``restore''.

\medskip\bf    Function not available in shareware version
      
\rm              The function is only available in the Registered version of
             the program. 

\medskip\bf     Function not available
     
\rm              The function has not yet been implemented. Contact the author
             for availability dates.

\medskip\bf     Error - mixed expand and shrink operations
       
\rm              You cannot shrink an image in one dimension and enlarge it
             in another simultaneously, it must be done in two passes.

\medskip\bf     Error: Bad OD table, Turn pixel compensation off
     
\rm              Densitometry could not be performed because part or all of 
             the selected region was on an image whose O.D. table mapped
             two or more pixel intensity values to the same O.D. You must
             either repair the OD table, or select ``No pixel compensation''.

\medskip\bf    Bad scan parameters

\rm              This occurs if the starting and ending points of your
             densitometry scan are the same, or if the region could 
             not be scanned for some reason. Select the region again. 

             
\medskip\bf     Can't create file!
      
\rm              An invalid file name was specified, or the filename was the
             same as some existing file that DOS has marked as ``read-only'',
             or a ``directory''.

\medskip\bf     Can't find file!
     
\rm              The specified filename does not exist, or is marked by
             the operating system as ``hidden''. Use a utility such as
             NSHELL to un-hide the file.
             
\medskip\bf     Only the 1st image in your file will be displayed
      
\rm              Your TIFF file contains more than one image. 
             
\medskip\bf     Sorry, can't read xxx compressed TIF images

\rm              TIF files are sometimes compressed using a weird form of
              compression not supported by TN-Image.
              
\medskip\bf  Not a valid TIF file
       
\rm              The TIFF file is corrupted and unreadable, or is an unusual
             non-standard TIF format.

\medskip\bf     Warning: File transfer aborted
       
\rm              You aborted the operation of saving the image to a file by
             pressing \it ESC \rm or clicking on ``Cancel''; or, saving of the
             file was aborted by the program for some reason.
     
\medskip\bf     An error occurred
      
\rm              A ``Critical error'' occurred in connection with a file transfer.
             This normally leads to the message ``Abort, Retry, Ignore?''.
             This occurs if you try to save a file to a floppy drive that
             does not exist, does not have a disk in it, has an open
             door, etc. It can also happen if a problem is found with your
             disk. 
      
\medskip\bf     No images to save

\rm              You selected ''Save image'', but no images were currently loaded.
             
\medskip\bf    Printer not responding!

     Printer I/O error!

     Printer out of paper!

     lp0 on fire \rm (Unix only)    
        
\rm              The printer is off-line, powered off, on fire, or something.


\medskip\it     Problem:  \rm When printing a grayscale image in PostScript mode,
            changes in the contrast, brightness, or colormap are not reflected in 
            the printout.
     
\medskip\it    Solution: \rm Set ``Color type'' to RGB/indexed color instead of
            BW/grayscale.
             

\medskip\bf     Unable to read disk
      
\rm              The specified drive letter referred to a non-existent
             disk; or there was a disk drive failure. Occasionally,
             CD ROM drives will spuriously give this error.
             

\medskip\bf     Invalid GIF file
    
        Error decoding GIF file

        Unable to read GIF file
      
\rm              The GIF file is corrupted and unreadable. The most common
             reason for this is that, when you downloaded the file, you
             forgot to set the communications package to ``binary'' mode.
             For example, in ftp, before getting the file, type:
             
\tt                                  binary
                                  
\rm            In Kermit, before telling the remote Kermit to send the 
             file, type: 

\tt                                  set file type binary 
                                  
\rm             You may also need to make sure your local computer is set
             to ``binary'' mode. The command for this differs for each 
             communications package.
             

\medskip\bf     Number of colors doesn't add up

     Change the bits/pixel on a color
     or number of primary colors
                  
\rm              You have selected an incompatible combination of options.
             The number of primary colors must correspond to the number
             of colors which have non-zero bits/pixel. For example, if
             you select ``1'' as the number of primary colors, only one
             of the 4 entries (red, green, blue, or black) can have a
             non-zero number of bits. The rest must be 0.
             
\medskip\bf     RGB bits/pixel don't add up to total

     Change total bits/pixel or number of colors
     
\rm              You have selected an incompatible combination of options.
             The sum of the red, green, blue, and black bits to be used
             to save an image must be equal to the total bits/pixel
             selected. For example, if you select to save the image as
             17 bits/pixel, the red + blue + green + black bits must
             also total up to 17. 
             If you are reading a raw 8-bit monochrome image, the ``color
             type'' must be set to ``Gray Scale/Indexed''.
             

\medskip\bf     You must have only 1 primary color
     to save data as grayscale

\rm             You have selected an incompatible combination of options.
             If you want to save the image as ``Gray scale'' image data,
             you must also change the ``no. of primary colors'' to 1.

\medskip\bf     Non-standard image format - is this ok?
     
\rm              This means the file format selected is not standard, and
             some other programs may have difficulty reading the file
             that is created.
             

\medskip\bf     Not enough bits for CMYK
     
\rm              You must either select 32 bits/pixel mode, or ``other bpp''
             mode, in order to create a CMYK file. If you select ``other
             bpp'', you need to specify the number of bits to use for
             black as well as red, green, and blue.
             
\medskip\bf     You must select CMYK to use black bits

\rm              Setting a non-zero value for ``black bits/pixel'' is only
             allowed if you have also selected ``CMYK''.

\medskip\bf     Must have 4 colors for CMYK

\rm              If you selected ``other bpp'', you need to also select ``4''
             as the number of primary colors in order to create a CMYK file.
             
\medskip\bf     PCX files must be 8 bits/pixel

\rm              TN-Image can only create 8 bit/pixel PCX files. You must 
             convert your image to 8 bits/pixel before saving it as a 
             PCX file.

             
\medskip\bf     IMG files must be 1 or 8 bits/pixel
             
\rm              TN-Image can only create 1 or 8 bit/pixel IMG files. You must 
             convert your image to 8 bits/pixel before saving it as an
             IMG file, or select ``monochrome''.
             
             
\medskip\bf     File is an unsupported type of PCX file.
       
\rm              The PCX file had too many bit planes, or was not 1 or 8 
             bits/pixel.

  
\medskip\bf     No header file specified
     
\rm              This only occurs when ``Create custom file'' is selected.
             If you specify a non-zero number of header bytes to copy
             from a file, you must also specify a file name.
             
\medskip\bf     Specified header bytes exceeds length
     of header file
     
\rm             This only occurs when ``Create custom file'' is selected.
              You selected a number of bytes to copy into the header of
             a custom file format which exceeded the file size of the
             specified file.
             
             
\medskip\bf     Bad gradient parameters
     
\rm              One or more of the coordinates specified for a gradient fill,
             or one of the boundary colors, was bad. Reselect another 
             similar area and try again.

\medskip\bf     Invalid parameters,
     Setting kernel multiplier to 1
     
\rm              For some types of filtering, the kernel multiplier must be
             set to 1. TN-Image has done this automatically.
             

\medskip\bf     Kernel size is larger than selected area
     
\rm              The size of the kernel to be used for for filtering, multiplied
             by the kernel multiplier, is larger than the image. This
             would result in no filtering, so the filtering was stopped.
             You may have accidentally click-and-dragged a 1x1 area.
             Try re-selecting the area to filter again.
             
\medskip\bf     Bad scan parameters
     
\rm              A trapezoidal region selected for scanning happened to have
             an illegal combination of values. Select a slightly different
             region and try again.
             
\medskip\bf     Error converting image
      
\rm              Contact the author for assistance.
             
\medskip\bf     Too many peaks
     
\rm              The number of peaks exceeded the size of the list TN-Image
             allocated for them.  Contact the author to obtain an
             upgrade which can handle more peaks.
             
\medskip\bf     Can't find help file
     
\rm              The help file, TNIMAGE.HLP, was not in the starting directory.
                      
             
\medskip\bf     Bad regression order
      
\rm              This is usually caused by trying to draw a curve or calibrate
             an image using only one calibration or control point. At least
             3 control points must be selected.
             
\medskip\bf    No unique solution

              Division by zero
     
 \rm             These messages indicate that it was impossible to calibrate the
             image using the existing calibration points.  Calibrate the
             image again using slightly different control points.
             
     
\medskip\bf     Error: negative value in logarithm
     
\rm              When calibrating an image in logarithm mode, all calibration
             values must be positive.
                     
             
 \medskip\bf    You must select ``Other'' or ``Custom'' 
     to save an image with non-standard parameters
     
\rm              TN-Image detected a non-standard value entered for bits/pixel
             or number of colors. To protect against accidentally creating
             non-standard files, you must specifically check the ``Custom'' 
             file format or the ``Other'' bits/pixel selection.
             
\medskip\bf     Error: need two images to convolute

\rm              Convolution or deconvolution of images was selected, but 
             less than 2 images were present. 
                                  
                                 
\medskip\bf    nn Divisions by zero detected
     
\rm              During deconvolution of two images, if the frequency of the
             2nd image is zero at any point, division by zero occurs.
             If there are a large number of these, it usually means the 
             2nd image is not entirely appropriate to use for deconvolution.
             
\medskip\bf     Can't open list file
     
\rm              A file containing a list of images was expected, because of 
             the ``-FILES'' option, but either no file list name was given
             or it was an invalid file name.

\medskip\bf     Extension must be TGA for Targa format
      
\rm              Since there is no foolproof way to determine whether a file 
             is really in TGA format, TN-Image will classify any file with
             a TGA extension as a Targa file.  If you specified some other
             extension, the file would be unreadable. Thus, TN-Image does
             not allow you to save the file with any extension other than
             ``TGA''.

\medskip\bf     Unknown error - nothing was saved!
     
\rm              This message should not occur in normal use. Contact the 
             author for assistance.
             

\medskip\bf     Selected bit/pixel values will be ignored
     
\rm              Images are automatically converted to 24 bits/pixel before
             saving in JPEG format. Other values are illegal and are ignored.
             
     
\medskip\bf    Color information will be lost!

     You should convert image to 8 bits/pixel first
     
\rm              You are about to save a color image in a file format that does 
             not have color information. When loaded back, the new image 
             might not have the same colors as the original. Select ``Change 
             image depth'' and quantize the image first by converting it to
             1 byte per pixel.
    
    
\medskip\bf     Error: overlapping offsets
      
\rm              While creating a custom image format, you cannot set two or 
             more file offsets to overlap the same byte position. Each 
             offset occupies 2 bytes.            
             
\medskip\bf     Error: offset exceeds 1024
     
\rm              While creating a custom image format, you cannot set a file 
             offset to a number greater than 1024.

\medskip\bf     Macro terminated at line xxx
     
 \rm             A fatal error occurred while executing a macro. The macro 
             was terminated at the specified line. Commands following the
             offending line were not executed. A fatal error can include
             the following:

                  Out of memory

                  File not found

                  No images available for the operation

                  Can't create file

                  Critical error  (e.g., disk drive door open)

                  File was zero length (after creating an image file, the
                    resulting file was checked and found to be empty). 


\medskip\bf     DOS/Windows-specific error messages

     ------------------------------------
       
     Fatal error, DPMI host does not support 32 bit applications

     Fatal error, 80386 processor is required

     Fatal error Previously installed software is neither VCPI nor DPMI 
          compatible

     Fatal error allocating DOS memory

     16 bit code and data are too large

     Fatal error, insufficient conventional memory

     Cannot enable the A20 line, XMS memory manager required

     FATAL error, XMS memory corrupted

     16 bit code is too large

     DPMI failed to enter protected mode

     DPMI operating system error
      
\rm              One or more of these messages will occur if you do not have
              an 80386 or higher processor, or if some other program is
              providing DPMI services in a way that is incompatible with
              TN-Image.  This might occur if you are running some unusual
              type of memory manager or have an incompatible type of CPU
              chip. Certain hardware problems can also cause these 
              messages. Try booting from a floppy or removing memory
              managers from AUTOEXEC.BAT.
              
     
\medskip\bf     Fatal error reading disk

     FATAL error during virtual memory disk IO

\rm               These messages mean that something bad happened to your disk
              or to the swap file used for virtual memory. Try to free
              up more disk space and try again. This can also happen if
              you run TN-Image Registered version from a floppy, and
              then remove the floppy.

     
\medskip\bf     Mouse required  
     
\rm              No mouse driver was found.  Run the file ``MOUSE.COM''
             or ``MOUSE.EXE'' (a file that came with your mouse) and try 
             again.


\medskip\bf     VESA not present         

     VESA BIOS not found
            
 \rm             These messages mean that no VESA driver was found. This
             driver is a file that should come with your super VGA card,
             with a name like ``VESA.COM''. Install the VESA driver and try 
             again. This message will also occur if you do not have a super 
             VGA card.
      
 \medskip\bf    Can't set VESA mode

    Unsupported VESA mode
          
 \rm             These messages mean that even if you have a VESA-compatible
             card, it cannot handle the selected screen mode. See under
             ``Command line options'' above for instructions on setting other
             screen modes.

\medskip\bf    Unsafe/unable to set VESA mode     
    
\rm              Your monitor reported that it is unable to handle the 
             scan rate for the specified resolution, or the video card
             refused to set the video mode for some other reason.

\medskip\bf    Trident card not found
     
\rm              This only occurs if you specified ``Trident'' on the command
             line and no Trident card was present.
     
\medskip\bf     Unsafe to test for Tseng chip
     
\rm              This occurs if you specified ``Tseng'' and no Tseng Labs chip
             was found. Certain non-Tseng chips cause a system lock-up if
             you try to check for a Tseng mode, thus the program did not
             try to set the Tseng mode.
     
      
\medskip\bf     VGA mode set OK - Unrecognized SVGA chip
     
\rm              TN-Image found that you have a VGA card, but it is not
             VESA-compatible and not a Tseng or Trident card. Probably
            it is not capable of super VGA modes.
             
\medskip\bf     Can't open graphics device
     
\rm              No grapics card was found.
             
\medskip\bf     Unable to set video mode
     
\rm              You specified a video mode on the command line that is not
             supported. See ``Supported video modes'' above.
             
\medskip\bf     You either have insufficient video memory or an ET3000 chip

    You need 1MB of RAM and an ET4000 chip
    
\rm             A Tseng Labs card was detected, but it is either too old
             (ET3000 chips are not supported) or does not have enough
             video RAM. On most cards, it is a simple matter to
             purchase and install an additional video RAM chip.

\medskip\bf    Error: Monochrome chip
     
\rm              A monochrome Tseng Labs chip was found on your video card.

             You need to upgrade to a newer card.

\medskip\bf     Error: ET3000 chip
     
\rm              An ET3000 Tseng Labs chip was found on your video card.
             You need to upgrade to a newer card.
     
\medskip\bf    Error: S3 not currently supported, use VESA

     Error: ATI chip not supported, use VESA
    
\rm              The ``-S3'' and ``-ATI'' options for directly programming 
             these chips are not available yet.

\medskip\bf     **Warning: unusual value**
     
\rm              An unexpected value was obtained from the VESA BIOS in your
             video card. TN-Image may not function correctly.

\medskip\bf    Unsupported Tseng mode
     
\rm              A Tseng mode was specified which could not be set by your
             video card or is not supported by TN-Image.
             
\medskip\bf    Unsupported Trident mode
     
\rm              A Trident mode was specified which could not be set by your
             video card or is not supported by TN-Image.

\medskip\bf    Wrong switch setting on Trident video card

               Check your manual to ensure your card is configured correctly
     
\rm              A Trident card was detected, but was configured incorrectly.
             Please consult your video card manual or computer dealer.
             
\medskip\bf    Insufficient video memory in Trident card

              1MB video ram required
         
\rm              A Trident card was detected, but was found to have less 
             than 1 MB of video RAM. Take the card to your dealer to
             have additional RAM installed.
     
\medskip\bf   Unable to set video mode on Trident card

    (Error code=\%x)
     
\rm              A Trident card was detected, but the video mode could not
             be set for an unknown reason. Consult the author or your
             computer dealer.
             
\medskip\bf    Sorry, your type of SVGA card is not supported
     
\rm              TN-Image does not support your type of SVGA card; or, you
             did not load your VESA BIOS before running TN-Image. This
             is a file that should come with your super VGA card,
             with a name like ``VESA.COM''. Run this program and try again.
             This message may also occur if you do not have a super VGA 
             card.    
             
\medskip\bf    DPMI host can't lock error handling code!

\rm              The DOS protected mode interface supplier (i.e., Windows,
             386\^{}Max, etc) made an error.            
             The simplest solution is to find the file HIMEM.SYS 
             (which comes with DOS) and install it in your CONFIG.SYS
             file, e.g., add the line

\tt                          C:$\backslash$DOS$\backslash$HIMEM.SYS   .

\rm          Then, run the program from the DOS command line instead
             of within Windows.              
 

\medskip\bf
     UNIX-specific error messages
 
    ----------------------------

\rm     There are a huge number of these. Below are the most common.

\medskip\bf     Can't open display
             
\rm              X11 must be running. If running tnimage remotely, xdm must be
             running on the host machine. It is also necessary to have the 
             remote computer's name in your xhosts by typing the following
             local command:
             
             \tt xhost + \it Remote-system-name \rm
                           
\medskip\bf    
            fcolor 0 is already used by another application\par
            fcolor is now set to 39\par\par

            bcolor 35 is already used by another application\par
            bcolor is now set to 40
  
\medskip\rm The foreground and background drawing colors have been taken by 
           some other program and can't be used. They have been automatically
           remapped.



\medskip\bf     No visuals found

     No appropriate visual

\rm              X11 is running in an unsupported screen mode.
     

\medskip\bf    Error allocating size hints

     Error allocating class hint

     Error creating XTextProperty

     Error allocating Window manager hints

     XCreateImage failed

     error in dialogbox

     Segmentation fault

     Bus Error
     
     BadWindow

\rm  Please send a complete bug report to the author if any of these messages
     occur.     
     
\medskip\bf    Can't allocate colors

\rm  Another application may be using all the available colors; or another copy
     of xtnimage may be running. Try closing some applications.

\medskip\bf    virtual memory exceeded in new()

\rm The image appeared to be a valid image file but was actually junk and
    sent impossible coordinates to \tt tnimage\rm, causing it to crash.
    Please send me a copy of the offending image file so future versions can
    check for it.
    

\vfill\eject
\bigskip\hrule\bigskip
\bbb { 14.0.0  Trademark disclaimers and acknowledgements}
\bigskip
\hrule\bigskip
\rm


    Graphics Interchange format and GIF (SM) are service marks of 
    Compuserve Incorporated.             
    
    The JPEG reading/writing routines in this program utilize the work of 
    the Independent JPEG Group, which includes Tom Lane, Philip Gladstone, 
    Luis Ortiz, Jim Boucher, Lee Crocker, Julian Minguillon, George Phillips, 
    Davide Rossi, Ge' Weijers, and others.
    
    Windows and UNIX are trademarks of Microsoft Corporation and X/Open 
    Company, respectively.

    TIFF reading/writing routines are based on information provided 
    in the document ``TIFF Revision 6.0 Final Q June 3, 1992'' from Aldus 
    Corporation.    
    
    PostScript is a trademark of Adobe Systems, Inc.
    The PostScript writing routine is based on information provided in the
    document ``PostScript Language Reference Manual, 2nd Edition''
    from Adobe Systems Inc.
       
    Targa and Windows BMP reading/writing routines were adapted from the
    public domain work of James D. Murray, Anaheim, CA, USA.
    
    Thanks to Joe Huffman of FlashTek, Inc. for valuable advice in executing 
    real-mode calls in the x32VM Dos Extender used in the MS-DOS version of 
    this program. 
    
    Thanks to Dr. C. Segebade of the Bundesanstalt f\"ur Materialforschung und
    -pr\"ufing, Berlin, Germany for numerous criticisms and suggestions for new 
    features.
    
    The scanner interface was based on general information from the Linux 
    SCSI Programming HOWTO written by Heiko Eissfeldt heiko@colossus.escape.de 
    v1.4, 14 June 1995, and on information generously provided by Hewlett-Packard 
    Corp.  

    The GIF reading/writing routines are loosely based on 'savegif.c' by Roger T. 
    Stevens (12-31-91).

    This software was developed as an independent, unfunded project using
    privately-owned equipment, and has no association with the National 
    Institutes of Health (NIH) or the  National Institute of Neurological 
    Disorders and Stroke.
    
  

\vfill\eject
\bigskip\hrule\bigskip
\bbc { 15.0.0 Index }
\bigskip
\hrule\bigskip
\rm


\halign { \hskip .2 in # \hfil & \hskip 2 in  #  \hfil\hfill \cr
\bf Subject           &   Section  \cr
 --------             &  --------- \cr
\rm                   &            \cr
2D Fourier Transform  &   8.3.11   \cr
3D Images             &   8.1.1.5  \cr
3D Image controls     &   8.3.13   \cr
                      &            \cr

about menu            &   8.6.0    \cr
about the file        &   8.6.2    \cr
about the image       &   8.6.3    \cr
about the program     &   8.6.1    \cr
acknowledgements      &   14.0.0   \cr
acquire               &   8.1.15   \cr
Adaptec               &   8.1.15   \cr
angle                 &   8.3.3.2  \cr
area measurements     &   8.3.5.1  \cr
area selection        &   6.3.0    \cr
arrow                 &   8.5.7    \cr
ATI                   &   7.2.0    \cr
attributes, image     &   8.2.12   \cr
automatic undo        &   8.7.8.1  \cr
                      &            \cr
B-spline curve        &   8.5.8.2  \cr
back up               &   8.2.10   \cr
background            &   7.4.0    \cr
background flatten    &   8.3.1.4  \cr
background subtract   &   8.3.1.3  \cr
background, erase     &   8.2.3    \cr
baseline              &   8.3.7    \cr
basic operation       &   7.4.0    \cr
Bezier curve          &   8.5.8.1  \cr
bits/pixel            &   6.1.0    \cr
bits/pixel            &   8.1.2    \cr
black and white printing & 8.1.3.1 \cr
BMP image files       &   6.1.0    \cr
border                &   8.5.13   \cr
box                   &   8.5.6    \cr
brightness            &   8.4.2    \cr
brightness            &   8.4.2.1  \cr
brightness            &   8.4.2.2  \cr
bug reports           &   3.2.0    \cr
bugs                  &   12.0.0   \cr
                      &            \cr
calibration           &   8.3.4    \cr
capture               &   8.3.7    \cr
change size           &   8.2.6    \cr
changing computers    &   10.0.0   \cr
changing title        &   8.1.4    \cr
Chinese               &   7.1.2    \cr
Chinese               &   8.1.1    \cr
circle                &   8.5.5    \cr
CMY, printing         &   8.1.3.2  \cr
CMYK                  &   8.1.1    \cr
CMYK                  &   8.1.2    \cr
CMYK, printing        &   8.1.3.2  \cr
color adjustment      &   8.4.2    \cr
color, command line   &   7.1.1    \cr
color depth           &   8.4.7    \cr
color menu            &   8.4.0    \cr
color printing        &   8.1.3.2  \cr
color reduction       &   8.4.7    \cr
color reduction       &   8.7.8.4  \cr
color settings        &   8.7.8.4  \cr
color, setting        &   8.5.1    \cr
color to gray scale   &   8.4.8    \cr
colormap, see colormap &            \cr
colors, inverting     &   8.4.6    \cr
colors, remapping     &   8.4.5    \cr
command line options  &   7.1.0    \cr
command line options,Unix & 7.1.1  \cr
commonly asked questions  & 7.6.0  \cr
composite image       &   8.4.13   \cr
Compuserve            &   0.0.0    \cr
Compuserve            &   14.0.0   \cr
configure menu        &   8.7.0    \cr
confocal microscope   &  8.1.1.5 \cr
contents              &   1.1.0    \cr
contrast              &   8.4.3    \cr
contrast              &   8.4.3.1  \cr
contrast              &   8.4.3.2  \cr
converting color to gray scale   &   8.4.8    \cr
converting gray scale to color   &   8.4.9 \cr
convolution           &   8.3.11.1 \cr
copy                  &   8.2.5    \cr
copying chroma-keyed regions  &  8.2.4.1 \cr
crawl delay           &   8.7.8.6  \cr
crawl density         &   8.7.8.7  \cr
creating file format  &   8.1.8    \cr
creating image        &   8.1.6    \cr
crop                  &   8.2.2    \cr
CT images             &   8.1.1.1  \cr
cursor movement rate  &   8.7.8.3  \cr
curve                 &   8.5.8    \cr
curve                 &   8.5.8.1  \cr
curve                 &   8.5.8.2  \cr
custom format files   &   8.1.8    \cr
                      &            \cr
de-trending           &   8.3.1.4  \cr
DECONVO2.TIF          &   6.4.0    \cr
DECONVOL.TIF          &   6.4.0    \cr
deconvolution         &   8.3.11.2 \cr
deleting region       &   8.2.1 \cr
DENSITO2.TIF          &   6.4.0 \cr
DENSITOM.PCX          &   6.4.0 \cr
densitometry          &   8.3.5 \cr
densitometry          &   8.3.6 \cr
depletion             &   8.1.3.2 \cr
}
\vfill\eject
\halign { \hskip .2 in # \hfil & \hskip 2 in  #  \hfil\hfill \cr

depth                 &   8.4.7 \cr
Diamond               &   7.1.0 \cr
diffuse spray         &   8.5.12.2 \cr
diffuse spray factor  &   8.7.8.2 \cr
digital filtering     &   8.3.11.3 \cr
direction             &   8.5.7 \cr
disclaimers           &   14.0.0 \cr
disclaimers           &   3.0.0 \cr
display, command line &   7.1.1 \cr
display, problems with &  11.0.0 \cr
distance               &  8.3.3.1 \cr
dither, printing      &   8.1.3.1 \cr
DOS Command           &   8.1.12 \cr
draw menu             &   8.5.0 \cr
                      &      \cr
e-mail address        &   0.0.0  \cr 
edge detection        &   8.3.1.8 \cr
edge enhancement      &   8.3.1.6 \cr
edge enhancement      &   8.3.1.7 \cr
editing text files    &   7.8.0 \cr
equations             &   8.3.10 \cr
erase background      &   8.2.3 \cr
erasing image         &   8.1.11 \cr
error messages        &   13.0.0 \cr
                      &      \cr
features              &   8.9.0 \cr
FFT                   &   8.3.11 \cr
FFT, erasing          &   8.1.10 \cr
FFT, loading          &   8.1.14 \cr
FFT, saving           &   8.1.9 \cr
file format, creating &   8.1.8 \cr
file menu             &   8.1.0 \cr
file types            &   6.1.0 \cr
fill region           &   8.5.10 \cr
filter                &   8.3.1   \cr
filtering color images &  8.3.1.10 \cr
fine spray            &   8.5.12.1 \cr
fixed-width rectangle &   8.5.8.7 \cr
flip horizontally     &   8.2.8 \cr
flip vertically       &   8.2.9 \cr
ftp sites             &   0.0.0 \cr
ftp sites             &   6.1.0 \cr
frame rate test       &   8.9.1 \cr
frame rates           &   8.9.0 \cr
                      &      \cr
gamma correction      &   8.7.6 \cr
garbage collection    &   13.0.0 \cr
Gem Img files         &   6.1.0 \cr
geometry              &   7.1.1 \cr
GIF                   &   6.1.0 \cr
GIF                   &   8.3.1.0 \cr
GIF                   &   7.6.0 \cr
GIF files, problems with &  11.0.0 \cr
gradient fill         &   8.5.10.1 \cr
gray balance, printer &   8.1.3.2 \cr
gray scale            &   8.4.8 \cr
gray scale            &   8.4.9 \cr
}
\vfill\eject
\halign { \hskip .2 in # \hfil & \hskip 2 in  #  \hfil\hfill \cr

gray scale to color   &   8.4.9 \cr
grayscale             &   8.4.4.2 \cr
                      &      \cr
help menu             &   8.8.0 \cr
high pass filter      &   8.3.1.1 \cr
HIMEM.SYS             &   13.0.0 \cr
histogram             &   8.4.10 \cr
how to register       &   8.6.4 \cr

H/P                   &   8.1.15 \cr
Hubble                &   8.3.11.2 \cr
                      &       \cr
Ima files             &   6.1.0 \cr
image math            &   8.3.10 \cr
image math, example   &   8.3.12.2 \cr
image menu            &   8.2.0 \cr
image properties      &  8.2.12 \cr
imaginary             &   8.3.11 \cr
Imaging Systems files &   8.1.1.2 \cr
IMDS                  &   8.1.8 \cr
Img files             &   6.1.0 \cr
Independent JPEG Group &  14.0.0 \cr
index                 &   15.0.0 \cr
intensity             &   8.4.2 \cr
intensity mapping     &   8.4.4.2 \cr
interact              &   8.7.7 \cr
interpolate           &   8.1.3.1 \cr
introduction          &   1.0.0 \cr
invert colors         &   8.4.6 \cr
invert colormap       &   8.4.4.6 \cr
                      &       \cr
JFIF                  &   6.1.0 \cr
JPEG                  &   3.1.0 \cr
JPEG                  &   8.1.2 \cr
JPEG image files      &   6.1.0 \cr
                      &      \cr
kernel multiply factor &  8.3.1.9 \cr
                       &      \cr

labels                &   8.5.1 \cr
Laplace edge enhancement &  8.3.1.6 \cr
least-squares         &   8.5.8.3 \cr
license               &   3.0.0 \cr
lighter, printing     &   8.1.3.1 \cr
limitations           &   12.0.0 \cr
line                  &   8.5.4 \cr
line, least squares   &   8.5.8.3 \cr
linear calibration    &   8.3.4 \cr
load image            &   8.1.1 \cr
logarithmic calibration &  8.3.4 \cr
low pass               &  8.3.1.2 \cr
low-memory conditions  &  7.5.0 \cr
Lumisys                &  8.1.8 \cr
                       &      \cr
Macintosh , images from &  8.1.1.3 \cr
macro command summary   & 8.3.12.1 \cr
macro programming guide & 8.3.12.2 \cr
macros                  & 8.3.12 \cr
MAKEDEV               &  8.1.15 \cr
mapping, intensity    &   8.4.4.2 \cr
}
\vfill\eject
\halign { \hskip .2 in # \hfil & \hskip 2 in  #  \hfil\hfill \cr

math, image           &   8.3.10 \cr
math spray            &   8.5.12.3 \cr
mathematical          &   8.3.10 \cr
measure               &   8.3.3  \cr
media type            &   8.1.3.2 \cr
median filter         &   8.3.1.5 \cr
menu bar              &   8.7.1 \cr
menu bar              &   8.7.2 \cr
menu bar              &   8.7.4 \cr
menu bars             &   6.3.0 \cr
menu bars             &   6.3.1 \cr
menu options          &   8.0.0 \cr
menu, invisible after loading image & 11.0.0  \cr
miscellaneous features &  8.9.0 \cr
mode                   &  7.1.0 \cr
mouse                  &  5.0.0 \cr
mouse, jumpy           &  7.2.0 \cr
mouse, problems with   &  11.0.0 \cr
move                   &  8.2.4 \cr
movies                 &  8.2.14 \cr
moving image           &  6.3.0 \cr
MVS                    &  8.1.8 \cr
                       &       \cr
NMR images             &  8.1.1.1 \cr
noise reduction filter &  8.3.1.5 \cr
Nyquist                &  8.3.11 \cr
                       &      \cr
O.D. table             &  8.7.6 \cr
operation              &  7.0.0 \cr
ordering               &  0.0.0 \cr
OS/2                   &  9.0.0 \cr
overview               &  6.0.0 \cr
                       &     \cr
paint region           &  8.5.11 \cr
colormap               &  8.7.3 \cr
colormap                &  8.7.5 \cr
colormap bar            &  8.4.2.1 \cr
colormap bar            &  8.4.3.1 \cr
colormap, creating      &  8.4.4.5 \cr
colormap, fitting       &  8.1.0 \cr
colormap, fitting       &  8.7.8.4 \cr
colormap, inverting     &  8.4.4.6 \cr
colormap, options       &  8.4.4 \cr
colormap, reading       &  8.4.4.3 \cr
colormap, restore       &  8.4.4.8 \cr
colormap, rotating      &  8.4.4.7 \cr
colormap, saving        &  8.4.4.4 \cr
colormap, selecting     &  8.4.4.1 \cr
colormap, sorting       &  8.4.4.9 \cr
paper type             &  8.1.3.2 \cr
paste                  &  8.2.5 \cr
PCL                    &  5.0.0 \cr
PCL                    &  8.1.3 \cr
PET scan               &  8.1.1.5 \cr
peak areas             &  8.3.8 \cr
pixel compensation     &  8.3.5 \cr
pixel compensation     &  8.3.6 \cr
pixel intensities      &  6.2.0 \cr
}
\vfill\eject
\halign { \hskip .2 in # \hfil & \hskip 2 in  #  \hfil\hfill \cr

pixel interact mode    &  8.7.7 \cr
pixel operations       &  8.3.10 \cr
pixel value, changing  &  8.4.2.2 \cr
pixel value, changing  &  8.4.11 \cr
planes, color          &  8.7.8.8 \cr
plot                   &  8.3.7 \cr
plotting data          &  8.3.7 \cr
plugins                &  8.1.16  \cr
point spread function  &  8.3.11.2 \cr
polygon                &  8.5.8.4 \cr
polynomial  calibration &  8.3.4 \cr
Postscript             &  5.0.0 \cr
Postscript             &  8.1.3.1 \cr
power spectrum         &  8.3.11 \cr
printer                &  5.0.0 \cr
printer, problems with &  11.0.0 \cr
printing images        &  8.1.3 \cr
printing in Unix       &  8.1.3.4 \cr
printing in Windows    &  8.1.3.5 \cr
print quality          &  8.1.3.1 \cr
problems               &  11.0.0 \cr
properties, image      &  8.2.12 \cr
process menu           &  8.3.0  \cr
                       &     \cr
quantization           &  8.1.1 \cr
quantization           &  8.7.8.4 \cr
questions, common      &  7.6.0 \cr
quit                   &  8.1.13 \cr
                       &     \cr
raw ASCII images       &  8.1.1.4 \cr
raw bytes              &  8.1.1 \cr
raw bytes              &  8.1.1.1 \cr
real                   &  8.3.11 \cr
Realtek                &  7.2.0 \cr
reconstruction         &  8.3.11.2 \cr
rectangle              &  8.5.8.7 \cr
redraw menu bar        &  8.7.4 \cr
redraw colormap         &  8.7.5 \cr
register               &  8.6.4 \cr
registered             &  3.1.0 \cr
registered versions    &  3.1.0 \cr
registered, features   &  3.1.0 \cr
registration           &  3.0.0 \cr
remap colors           &  8.4.5 \cr
resizing image         &  8.1.6 \cr
resolution, printing   &  8.1.3.1 \cr
restore                &  8.2.11 \cr
restore colormap        &  8.4.4.8 \cr
RGB                    &  8.1.1 \cr
RGB                    &  8.1.2 \cr
RGB, printing          &  8.1.3.2 \cr
rotate colormap         &  8.4.4.7 \cr
rotating image         &  8.2.7 \cr
                       &     \cr
S3                     &  7.1.0 \cr
saving images          &  8.1.2 \cr
saving scan data       &  8.1.6 \cr
scan                   &  8.3.9 \cr
scanner                &  8.1.15 \cr
}
\vfill\eject
\halign { \hskip .2 in # \hfil & \hskip 2 in  #  \hfil\hfill \cr

screen modes supported &  7.3.0 \cr
SCSI                   &  8.1.15 \cr
select box             &  8.7.8.6 \cr
selecting region       &  7.4.0 \cr 
selecting region       &  8.1.1 \cr
separate colors        &  8.4.12 \cr
set color              &  8.5.1 \cr
settings, color        &  8.7.8.4 \cr
shareware              &  3.0.0 \cr
shareware version      &  3.1.0  \cr
shareware version, limitations &  3.1.0 \cr
show menu bar          &  8.7.1 \cr
show menu bar 2        &  8.7.2 \cr
show colormap           &  8.7.3 \cr
significant digits     &  8.7.8.5 \cr
site license           &  3.0.0 \cr
size, change           &  8.2.6 \cr
sketch                 &  8.5.9 \cr
sliding scale          &  8.4.4.2 \cr
snap trapezoid         &  8.5.8.6 \cr
Sobel edge enhancement &  8.3.1.7 \cr
sort colormap          &  8.4.4.9 \cr
spline                 &  8.5.8.2 \cr
spot densitometry      &  8.3.5 \cr
spots/ jagged lines    &  11.0.0 \cr
spray                  &  8.5.12 \cr
spray factor           &  8.7.8.2 \cr
spray factor           &  8.5.12.3 \cr
strip densitometry     &  8.3.6 \cr
summary                &  2.0.0 \cr
super VGA              &  5.0.0 \cr
superposing images     &  8.7.7 \cr
switch to...           &  8.1.7 \cr
system requirements    &  5.0.0 \cr
                       &        \cr
Targa                  &  6.1.0 \cr
test                   &  8.9.1 \cr
text direction         &  8.5.7 \cr
text files             &  7.8.0 \cr
TIFF                   &  6.1.0 \cr
TIFF parameters, extra &  8.1.2 \cr
trace curve            &  8.3.9 \cr
trademarks             &  14.0.0 \cr
transparency           &  8.2.12.1 \cr
transparency, copying  &  8.2.4 \cr
trapezoid              &  8.5.8.5 \cr
Trident                &  7.1.0 \cr
Trident                &  7.2.0 \cr
Trident                &  7.3.0 \cr
Tseng                  &  7.1.0 \cr
Tseng                  &  7.2.0 \cr
Tseng                  &  7.3.0 \cr
tutorial files         &  6.4.0 \cr
                       &        \cr
undo                   &  8.2.11 \cr
undo, automatic        &  8.7.8.1 \cr
Univbe                 &  11.0.0 \cr
}
\vfill\eject
\halign { \hskip .2 in # \hfil & \hskip 2 in  #  \hfil\hfill \cr

Univbe, problems with  &  11.0.0 \cr
Unix                   &  7.6.0 \cr
Unix                   &  7.1.1 \cr
Unix, printing         &  8.1.3.3 \cr
unknown image files    &  6.1.0 \cr
unloading image        &  8.1.11 \cr
upgrade policy         &  4.0.0 \cr
usage license          &  3.0.0 \cr
user-defined buttons   &  7.1.4 \cr
                       &        \cr
VESA                   &  7.0.0 \cr
VESA                   &  7.3.0 \cr
video cards supported  &  7.2.0 \cr
video cards, frame rates & 8.9.0 \cr
video RAM requirements &  5.0.0 \cr
video, problems with   &  11.0.0 \cr
virtual memory         &  3.1.0 \cr
                       &      \cr
warp                   &  8.3.2 \cr
warranty               &  3.0.0 \cr
Windows                &  5.0.0 \cr
Windows                &  9.0.0 \cr
Windows 9x             &  7.6.0 \cr
windows, image         &  7.4.3 \cr
                       &        \cr
X-ray images           &  8.1.1.1 \cr
XGA                    &  7.1.0 \cr
}

\bye














