Newsgroups: comp.graphics
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!newsserver.jvnc.net!news.edu.tw!news!ccnews.nctu.edu.tw!u7711501
From: u7711501@bicmos.ee.nctu.edu.tw (jih-shin ho)
Subject: disp140 [0/7]
Message-ID: <1993May17.032938.10169@ccnews.nctu.edu.tw>
Sender: usenet@ccnews.nctu.edu.tw
Organization: National Chiao Tung University
X-Newsreader: TIN [version 1.1 PL8]
Date: Mon, 17 May 1993 03:29:38 GMT
Lines: 299


I have posted DISP140.ZIP to alt.binaries.pictures.utilities.
I will upload this package to SIMTEL20 later.

******   You may distribute this program freely for non-commercial use
         if no fee is gained.
******   There is no warranty. The author is not responsible for any
         damage caused by this program.

Important changes since Version 1.35:
  Added support for IRIS.
  Support Mix/Concat. two images.
  Added support for 'batch conversion'.
  Added support for 'load/save palette table'.
  Added support for 'edge enhance'.
  Added support for 'crop one line'.
  Added support for 'negate image'.
  New color quantization option.
  Fix some minor bugs.

(1) Introduction:
  This program can let you READ, WRITE and DISPLAY images with different
  formats. It also let you do some special effects(ROTATION, DITHERING ....)
  on image. Its main purpose is to let you convert image among different
  formts.
  Include simple file management system.
  Support 'slide show'.
+ Support 'batch conversion'.
  There is NO LIMIT on image size.
  Currently this program supports 8, 15, 16, 24 bits display.
  If you want to use HiColor or TrueColor, you must have VESA driver.
  If you want to modify video driver, please read section (8).


(2) Hardware Requirement:
  PC 386 or better. MSDOS 3.3 or higher.
  min amount of ram is 4M bytes(Maybe less memory will also work).
  (I recommend min 8M bytes for better performance).
  Hard disk for swapping(virtual memory).

  The following description is borrowed from DJGPP.

  Supported Wares:

  * Up to 128M of extended memory (expanded under VCPI)
  * Up to 128M of disk space used for swapping
  * SuperVGA 256-color mode up to 1024x768
  * 80387
  * XMS & VDISK memory allocation strategies
  * VCPI programs, such as QEMM, DESQview, and 386MAX

  Unsupported:

  * DPMI
  * Microsoft Windows

  Features: 80387 emulator, 32-bit unix-ish environment, flat memory
  model, SVGA graphics.


(3) Installation:
  Video drivers, emu387 and go32.exe are borrowed from DJGPP.
  (If you use Western Digital VGA chips, read readme.wd)
  (This GO32.EXE is a modified version for vesa and is COMPLETELY compatible
   with original version)
  *** But some people report that this go32.exe is not compatible with
      other DJGPP programs in their system. If you encounter this problem,
      DON'T put go32.exe within search path.

  *** Please read runme.bat for how to run this program.

  If you choose xxxxx.grn as video driver, add 'nc 256' to environment
    GO32.

  For example, go32=driver x:/xxxxx/xxxxx.grn nc 256

  If you don't have 80x87, add 'emu x:/xxxxx/emu387' to environment GO32.

  For example, go32=driver x:/xxxxx/xxxxx.grd emu x:/xxxxx/emu387

  **** Notes: 1. I only test tr8900.grn, et4000.grn and vesa.grn.
                 Other drivers are not tested.
              2. I have modified et4000.grn to support 8, 15, 16, 24 bits
                 display. You don't need to use vesa driver.
                 If et4000.grn doesn't work, please try vesa.grn.
              3. For those who want to use HiColor or TrueColor display,
                 please use vesa.grn(except et4000 users).
                 You can find vesa BIOS driver from :
                   wuarchive.wustl.edu: /mirrors/msdos/graphics
                   godzilla.cgl.rmit.oz.au: /kjb/MGL


(4) Command Line Switch:

    Usage : display [-d|--display initial_display_type]
                    [-s|--sort sort_method]
                    [-h|-?]

    Display type: 8(SVGA,default), 15, 16(HiColor), 24(TrueColor)
    Sort method: 'name', 'ext'


(5) Function Key:

    F2 : Change disk drive.

    CTRL-A -- CTRL-Z : change disk drive.

    F3 : Change filename mask. (See match.doc)

    F4 : Change parameters.

    F5 : Some effects on picture, eg. flip, rotate ....

    F7 : Make Directory.

    t : Tag file.

    + : Tag group files. (See match.doc)

    T : Tag all files.

    u : Untag file.

    - : Untag group files. (See match.doc)

    U : Untag all files.

    Ins : Change display type (8,15,16,24) in 'read' & 'screen' menu.

    F6,m,M : Move file(s).

+   ALT-M : Move single file(ignore tag).

    F8,d,D : Delete file(s).

+   ALT-D : Delete single file(ignore tag).

    r,R : Rename file.

    c,C : Copy File(s).

+   ALT-C : Copy single file(ignore tag).

    z,Z : Display first 10 bytes in Ascii, Hex and Dec modes.

    f,F : Display disk free space.

    Page Up/Down : Move one page.

    TAB : Change processing target.

    Arrow keys, Home, End, Page Up, Page Down: Scroll image.
      Home: Left Most.
      End: Right Most.
      Page Up: Top Most.
      Page Down: Bottom Most.
      in 'screen' & 'effect' menu :
        Left,Right arrow: Change display type(8, 15, 16, 24 bits).

+   CTRL-Arrow keys : Crop image by one line(in graphics mode).

    s,S : Slide Show(show tagged files). ESCAPE to terminate.

+   b,B : Batch conversion(convert tagged files to single format).

+   w,W : Wait/Pause in slide show.

    ALT-X : Quit program without prompting.

    ALT-A : Reread directory.

    Escape : Abort function and return.


(6) Support Format:

  Read: GIF(.gif), Japan MAG(.mag), Japan PIC(.pic), Sun Raster(.ras),
        Jpeg(.jpg), XBM(.xbm), Utah RLE(.rle), PBM(.pbm), PGM(.pgm),
        PPM(.ppm), PM(.pm), PCX(.pcx), Japan MKI(.mki), Tiff(.tif),
        Targa(.tga), XPM(.xpm), Mac Paint(.mac), GEM/IMG(.img),
        IFF/ILBM(.lbm), Window BMP(.bmp), QRT ray tracing(.qrt),
        Mac PICT(.pct), VIS(.vis), PDS(.pds), VIKING(.vik), VICAR(.vic),
+       FITS(.fit), Usenix FACE(.fac), IRIS(.sgi).

        the extensions in () are standard extensions.

  Write: GIF, Sun Raster, Jpeg, XBM, PBM, PGM, PPM, PM, Tiff, Targa,
         XPM, Mac Paint, Ascii, Laser Jet, IFF/ILBM, Window BMP,
+        Mac PICT, VIS, FITS, FACE, PCX, GEM/IMG, IRIS.

  All Read/Write support full color(8 bits), grey scale, b/w dither,
      and 24 bits image, if allowed for that format.


(7) Detail:

   Initialization:
      Set default display type to highest display type.
      Find allowable screen resolution(for .grn video driver only).

   1. When you run this program, you will enter 'read' menu. Whthin this
      menu you can press any function key. If you move or copy
      files, you will enter 'write' menu. the 'write' menu is much like
      'read' menu, but only allow you to change directory.
      The header line in 'read' menu includes "(d:xx,f:xx,t:xx)".
        d : display type. f: number of files. t: number of tagged files.
      pressing SPACE in 'read' menu will let you select which format to use
        for reading current file.
      pressing RETURN in 'read' menu will let you reading current file. This
        program will automatically determine which format this file is.
        The procedure is: First, check magic number. If fail, check
        standard extension. Still fail, report error.
      pressing s or S in 'read' menu will do 'Slide Show'.
        If delay time is 0, program will wait until you hit a key
          (except ESCAPE).
        If any error occurs, program will make a beep.
+       'w' or 'W' to pause, any key to continue.
        ESCAPE to terminate.
      pressing Ins in 'read' menu will change display type.
      pressing ALT-X in 'read' menu will quit program without prompting.
+     pressing F5 will turn on 'effect' menu.

   2. Once image file is successfully read, you will enter 'screen' menu.
      You can do special effect on image.
      pressing RETURN: show image.
        in graphic mode, press RETURN, SPACE or ESCAPE to return to text
        mode.
      pressing TAB: change processing target. This program allows you to do
        special effects on 8-bit or 24-bit image.
      pressing Left,Right arrow: change display type. 8, 15, 16, 24 bits.
      pressing SPACE: save current image to file.
        B/W Dither: save as black/white image(1 bit).
        Grey Scale: save as grey image(8 bits).
        Full Color: save as color image(8 bits).
        True Color: save as 24-bit image.

        This program will ask you some questions if you want to write image
        to file. Some questions are format-dependent. Finally This program
        will prompt you a filename. If you want to save file under another
        directory other than current directory, please press SPACE. after
        pressing SPACE, you will enter 'write2' menu. You can change
        directory to what you want. Then,

        pressing SPACE: this program will prompt you 'original' filename.
        pressing RETURN: this program will prompt you 'selected' filename
                      (filename under bar).


  3. This program supports 8, 15, 16, 24 bits display.

  4. This Program is MEMORY GREEDY. If you don't have enough memory,
     the performance is poor.

  5. If you want to save 8 bits image :
       try GIF then TIFF(LZW) then TARGA then Sun Raster then BMP then ...

     If you want to save 24 bits image (lossless):
       try TIFF(LZW) or TARGA or ILBM or Sun Raster
       (No one is better for true 24bits image)

  6. I recommend Jpeg for storing 24 bits images, even 8 bits images.

  7. Not all subroutines are fully tested

  8. This document is not well written. If you have any PROBLEM, SUGGESTION,
     COMMENT about this program,
     Please send to u7711501@bicmos.ee.nctu.edu.tw (140.113.11.13).
     I need your suggestion to improve this program.
     (There is NO anonymous ftp on this site)


(8) Tech. information:
  Program (user interface and some subroutines) written by Jih-Shin Ho.
  Some subroutines are borrowed from XV(2.21) and PBMPLUS(dec 91).
  Tiff(V3.2) and Jpeg(V4) reading/writing are through public domain
    libraries.
  Compiled with DJGPP.
  You can get whole DJGPP package from SIMTEL20 or mirror sites.
    For example, wuarchive.wustl.edu: /mirrors/msdos/djgpp


(9) For Thoese who want to modify video driver:
   1. get GRX source code from SIMTEL20 or mirror sites.
   2. For HiColor and TrueColor:
        15 bits : # of colors is set to 32768.
        16 bits : # of colors is set to 0xc010.
        24 bits : # of colors is set to 0xc018.


Acknowledgment:
  I would like to thank the authors of XV and PBMPLUS for their permission
    to let me use their subroutines.
  Also I will thank the authors who write Tiff and Jpeg libraries.
  Thank DJ. Without DJGPP I can't do any thing on PC.


                                            Jih-Shin Ho
                                   u7711501@bicmos.ee.nctu.edu.tw
