Sie sind auf Seite 1von 23

DDDD III SSSS PPPP LL AAAA YY YY

DDDDD III SSSSSS PPPPPP LL AAAAAAAA YY YY


DD DD III SSS PP PP LL AA AA YY YY
DD DD III SSSSS PPPPPP LL AA AA YYYY
DD DD III SSSSS PPPP LL AAAAAAAA YY
DD DD III SSS PP LL AA AA YY
DDDDD III SSSSSS PP LL AA AA YY
DDDD III SSSS PP LLLLLLLL AA AA YY

Program written by
Jih-Shin Ho (u7711501@bicmos.ee.nctu.edu.tw)

Document written by
Jih-Shin Ho (u7711501@bicmos.ee.nctu.edu.tw)
Oliver Weyand (chbrin3@nyx.uni-konstanz.de)
Bernhard Maerz (F58394@rio.ngate.uni-regensburg.de)

Document modified by
Ben Jos Walbeehm (abruzzis@cas.usf.edu)

Copyright (C) 1993-1996 by Jih-Shin Ho. All rights reserved.

!!! Permission to use and distribute DISPLAY(Executable format) !!!


!!! for any purpose and without fee is hereby granted, provied !!!
!!! that you don't make profit from DISPLAY directly. That is, you !!!
!!! can use DISPLAY to create things you like and sell them, but !!!
!!! !!!
!!! you CAN'T sell DISPLAY. !!!
!!! !!!
!!! For BBS and software distribution sites, some handling charge !!!
!!! is allowed. !!!

!!! This software is provided "as is" without express or implied !!!
!!! warranty. The author is not responsible for any damage caused by !!!
!!! this program. !!!

Table of Contents:
------------------
(1) Introduction
(2) General Notes
(3) Supported Formats
(4) Command Line Switches
(5) Function Keys
(6) Mouse Buttons
(7) Screen saver
(8) Preview
(9) Initialization steps
(10) Menu
(11) Special Effects
(12) Tech. information
(13) About the author
(14) Final

(1) Introduction
================
This program lets you READ, WRITE and DISPLAY images/movies with different
formats. It lets you do some special effects (rotation, dithering, ...)
on images as well.
Features:
Includes simple file management system.
Supports 'slide show', 'batch conversion', 'contact sheet making',
'image preview'.
There is NO LIMIT on image size.
This program supports 8, 15, 16, 24 bits display.
+ Supports movie files (DL, FLI/FLC, RAW, MPEG, AVI, GL, IFF/ANIM, QT).
Supports FLC making.
Tiny screen saver.
CD player (including Volume control for Sound Blaster).
+ Supports sound for AVI, QT; MPEG, FLI/FLC, DL, RAW with WAV file.
+ Simple WAV, AU player.
Supports mouse.

This Program is MEMORY-GREEDY. If you do not have enough memory, its


performance is poor.

The official site is NCTUCCCA.edu.tw:/PC/graphics/disp.


The IP address is 140.111.1.10 or 192.83.166.10
The beta test version of next release is in the beta directory.
I often upload DISPLAY to SimTel. So if NCTUCCCA is too slow, you can try:
oak.oakland.edu:/SimTel/msdos/graphics.
Filenames are : disp???a.zip, disp???b.zip. ??? is version number.

(2) General Notes


=================

Line begins with '+' is newly added/modified after last version.


Resources/parameters are in config file, config.dis. This file is read when
DISPLAY starts up.
You can use text editor to edit config.dis.
If you encounter something unknown, please read display.faq and config.dis.

(3) Supported Formats


=====================

Read: GIF(.gif)*, Japan MAG(.mag), Japan PIC(.jpc), Sun Raster(.ras),


Jpeg in Jfif(.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/PBM(.iff,.lbm), Windows BMP(.bmp), QRT ray tracing(.qrt),
Mac PICT(.pct), VIS(.vis), PDS(.pds), VIKING(.vik), VICAR(.vic),
FITS(.fit), Usenix FACE(.fac), IRIS/SGI(.sgi), YUV(.yuv), RAW RGB(.rgb),
PCPAINT/Pictor(.pic,.clp), RAW GREY(.gry), Photo-CD(.pcd),
VORT output(.pix), WordPerfect Graphics(.wpg), Windows ICON(.ico),
ANSI screen file(.ans), Image INDEX(.idx), VIVID output(.img,.viv),
Thumbnail(.tnl), Dr. Halo(.cut), Japan PI(.pi), PNG(.png)*.

DL(.dl), FLI(.fli), FLC(.flc), RAW(.raw, produced by DMPEG),


+ MPEG(.mpg), AVI(.avi), GL(.gl), IFF/ANIM(.anm), QuickTime (.mov).

+ RIFF/WAVE(.wav), Sun au(.au).


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, Windows BMP,
Mac PICT, VIS, FITS, FACE, PCX, GEM/IMG, IRIS/SGI, YUV, RAW RGB,
Postscript, RAW GREY, Wordperfect Graphics, Windows ICON,
Image INDEX(.idx), ANSI screen file, Thumbnail, Dr. Halo, PNG*.

Preview: GIF, Jpeg, Windows BMP, PBM, PGM, PPM, Targa, PCX, Mac Paint,
Photo-CD, PNG, XBM, Sun Raster, Thumbnail, GEM/IMG, Windows ICON,
WPG, FACE, IFF/ILBM, XPM, IRIS/SGI.

'*' means 'support image comment'.

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

(4) Command Line Switches


=========================

DISPLAY understands several command-line parameters. Some of them are


useful for setting up your preferred configuration or overwriting
config.dis options. Others are for command-line processing.

Symbol :
aaa | bbb : You can use aaa or bbb. They are equivalent.
[ aaa ] : aaa is optional.
< aaa > : Use other value or string to replace aaa.

(a) For normal use :


display [-d|--display <initial_display_type>] [-s|--sort <sort_method>]
[-f <config_file>] [-c <config_file] [-a] [-n l|g] [--help|-?]
[--target|-t <working_directory>] [--mask|-m 'filename_mask']
[--report|-r <report_file>]

initial_display_type: 8 (SVGA, default), 15, 16 (HiColor), 24 (TrueColor)


sort_method: 'name', 'ext'.
-f: Read user specified config file only.
-c: Read Local, Global and user specified config file.
-a: Always set to highest display type
-n: Do not read Local or Global config file.
Global: where DISPLAY.EXE resides. Local: where you start DISPLAY.
-t: change to the specified directory when DISPLAY starts up.
filename_mask: separated by ';'. quotation marks are needed before and after
+ filename_mask. Mask length should be less than 128.
report_file: Contains useful information generated by DISPLAY.
Please don't use relative path(e.g.: ../qqq/report).

(b) For command-line single image/movie viewing :


display [--width|-w <image_width>] [--height|-h <image_height>]
+ [--noask|-k] [--stay] [--type <standard extension>]
image/movie_file

-w & -h: For image format without information header(YUV,RGB,GREY).


-k: Don't ask any question, start movie playing immediately.
+ --stay: Don't exit DISPLAY after viewing.
+ --type: Specify the input image type.
(c) For command-line batch conversion :
display --batch | -b <output_format> [--bw|--grey|--color|--true|--same]
[--stay] [--dialog | -g] [--report|-r <report_file>] [--effect]
[--width|-w <image_width>] [--height|-h <image_height>]
[--skip <bytes>] [-i]
input_file | input_file output_directory | input_file output_file |
input_files output_directory

output_format: Standard extensions. Like gif, bmp ... (see section (6))
bw,grey,color,true: B/W dither, Grey scale, 8bit full color, 24bit
true color.
same: The same color format as input image. If input is 24-bit image,
output is saved as true color image (if possible). Otherwise output
is saved as 8bit full color image.
The default color type for batch conversion is 8bit full color.
-g: DISPLAY will let you change the setting of output_format if there
is any.
+ --stay: Don't exit DISPLAY after viewing.
+ --effect: Perform default special effects (in config.dis) on images.
+ --skip: Number of bytes to skip before reading .GRY and .RGB images.
+ -w & -h: For images format without information header(YUV,RGB,GREY).
+ -i : Don't initialize screen.

(d) For command-line slide show :


display [--slide|-l] [--noask|-k] [--report|-r <report_file>]
[--stay] image_files | @response_file

-l: Tell DISPLAY you want slide show (even for single file).
-k: Don't ask any question, start slide show immediately.
response_file: please refer to display.faq.
+ --stay: Don't exit DISPLAY after viewing.

(e) For command-line contact sheet generation :


display --sheet|-e <batch_contact_sheet_script> [--report|-r <report_file>]

for the batch_contact_sheet_script format, read display.faq.

(f) For command-line movies (more than 1) playing :


display --movie|-v [--noask|-k] [--preload|-p 0|1]
[--report|-r <report_file>] movie_files

-k: Don't ask any question, start movie playing immediately.


-p: Preload or not.

+ (g) For command-line UU/MIME Decode :


+ display --uud|--mmd files

Wild-card filenames are sorted by name in ascend order.


Notes: Files are written to current directory.

+ (h) For command-line UU/MIME Encode :


+ display --uue|--mme [--line <line_number>] files

--line: Number of lines to be written to one file. Default is 950.


0 means 'don't split file'.
Notes: Files are written to current directory.

Please read display.faq for the information not mentioned here.


(5) Function Keys
=================

Escape : Abort function and return.


RETURN : Select.
ALT-X : Quit program anywhere without prompting.

(a) In menu selection :


ESCAPE,F10 : Quit program (prompted).
F1 : Show DISPLAY.DOC.
CTRL-F1 : Show user-defined help file. (read config.dis)
F4 : Change parameters.
+ If already in parameter-changing screen, pop up sub-menu.
ALT-Z : Shell to DOS.
F9 : For those who cannot remember all commands in DISPLAY.

t,T : Tag file. (Untag tagged files)


+ : Tag a group of files. (See match.doc)
ALT-T : Tag all files.
u,U : Untag file.
- : Untag a group of files. (See match.doc)
ALT-U : Untag all files.
* : Reverse tag.
. : Tag all files after (and under) select bar.
, : Tag all files before (and under) select bar.
> : Untag all files after (and under) select bar.
< : Untag all files before (and under) select bar.

CTRL-A -- CTRL-Z : Change disk drive directly.


F2 : Change disk drive.
CTRL-F2: Go to user-specified disk and directory.
F3 : Change filename masks. (Separated by ';') (See match.doc)
CTRL-F3: Change exclude masks. Don't show files which match these masks.
F7 : Make Directory.
F6,m,M : Move file(s).
ALT-M : Move single(current) file (ignore tags).
F8,d,D : Delete file(s).
ALT-D : Delete single(current) file (ignore tags).
r,R : Rename file.
c,C : Copy File(s).
ALT-C : Copy single(current) file (ignore tags).
ALT-A : Re-read directory. Keep current description entries.
ALT-B : Re-read directory. Discard current desciption entries.
ALT-S : Save config file.
BACKSPACE : Go up one level in the directory tree.

F5 :
Some effects on pictures, e.g. flip, rotate ...
z,Z :
Display first 10 bytes of file in Ascii, Hex and Dec modes.
f,F :
Display disk/memory free space.
s,S :
Slide Show (shows tagged files). ESCAPE to terminate.
b,B :
Batch conversion (converts tagged files to a single format).
You can perform up to 8 special operations.
Each is independent of the others.
e,E : Contact sheet making.
q,Q : Accumulation color quantization.
Finds the best palette set for a group of files.
Very useful for producing animation pictures. (read display.faq)
l,L :
List available graphic/text modes.
o,O :
Display font.
v,V :
View text file.
x,X :
View binary file.
a,A :
View ANSI screen file(s).
If you view tagged files, use F10 to interrupt.
n,N : Show image comment.
ALT-N : Write image comment to file.
+ ALT-P : Print image file.

ALT-E : Edit description entry. (see display.faq)


ALT-W : Write description and/or image dimension to description file.
(see display.faq) Note: You must set resource 'wrtie_desc_dim'
to 1 to enable the dimension writing.
ALT-F : Load description and/or image dimension from DEFAULT description
file. (see display.faq) Note: If 'use_perm_desc' is active, load
desc. and/or dim. from permanent desc. file.
ALT-G : Load description and/or image dimension from CURRENT description
file. (see display.faq) Note: The same note as above.
g,G : Set CURRENT description file to the file under select bar and
load it. If 'use_perm_desc' is active, change perm_description_file
to this file.

Ins : Change display type (8, 15, 16, 24 bits).


Del : Change display resolution.
+ TAB : In mode selection screen : Change process target. (read display.faq)
+ In file selection screen : Change view window (for double view).
+ i,I : Show previously loaded image.
w,W : Write previously loaded image.
p,P : Toggle preview.
+ = : Toggle double view.
+ / : Toggle HiColor preview.
ALT_H : Toggle between 'graphic text' and 'normal text' modes.
Page Up/Down : Move one page.
Left/Right arrow : Change display type In 'screen' & 'effects' menu.
0..9 :
SHIFT-A .. Z : Jump to first file whose name starts with this character.
ALT-F5 .. ALT-F8 : User commands.
+ ALT-R : Execute user-input command.
+ ALT-U : Push current image to stack (last position). Works in mode
+ selection and effect selection menus only.
+ ALT-O : Pop image from stack (last position). Works in mode selection
+ and effect selection menus only.

+ CTRL-ALT-Q: Record keyboard (only) events. (up to 40) (works for menu
+ selection only)
+ CTRL-ALT-W: Stop recording events.
+ CTRL-ALT-P: Re-play recorded events.

(b) In graphics mode :


RETURN : return to text mode. If 'return_to_next' is true and current
image is still image, show next still image.
In this mode, movies and other non-still images are ignored.
BACKSPACE : If 'return_to_next' is true and current image is still
image, show previous still image.
SPACE,ESCAPE : return to the text mode.
+ : Go to next resolution.
- : Go to previous resolution.
Arrow keys, Home, End, Page Up, Page Down : Scroll image.
Home: Left-most.
End: Right-most.
Page Up: Top of image.
Page Down: Bottom of image.
CTRL-Arrow keys: Crop image by one line.
CTRL-SHIFT-Arrow keys: Big Crop (Controlled by resource 'big_crop_step').
F1 .. F8 : Gamma correction.
F1,F3,F5,F7: decrease Red,Green,Blue,All.
F2,F4,F6,F8: increase Red,Green,Blue,All.
F9,F10 : Zoom Out/In.
ALT-Z : Pop out graphic menu. SPACE to close.
ALT-E : Edit description entry.
ALT-B : Toggle between normal mouse mode and mouse ball mode.
(see display.faq)
+ ALT-T : Tag current image file. Useful if 'return_to_next' is 1.
+ ALT-U : Untag current image file. Useful if 'return_to_next' is 1.
+ CTRL-F11 : Show mouse coordinates.
+ Arrow_keys : move cursor 1 pixel.
+ CTRL-Arrow_keys : move cursor 10 pixel.
+ SPACE,RETURN : Done.
+ ESCAPE : Abort.
+ ALT-F11 : Define cropping rectangle.
+ ALT-F11 : Crop image.
+ ESCAPE : Abort.
+ n, N : Show image comment.
+ ALT-D : Delete this image file.

(c) In text viewer :


F2 : Search string (case-sensitive).
F3 : Search string (case-insensitive).
F6 : Search again.
CTRL-LEFT : Scroll right 10 chars.
CTRL-RIGHT : Scroll left 10 chars.
CTRL-PGUP : Goto top of file.
CTRL-PGDN : Foto bottom of file.
+ HOME : Goto column 1.
+
+ To search string in HEX mode, use "..." or '...'. The default input for
+ search in HEX mode is hex number.

(d) In contact sheet preview & Postscript preview :


'+' : Increase scaling factor.
'-' : Decrease scaling factor.
Ins,Del : Fine tune(Inc/Dec) scaling factor.

(e) In slide show :


If the delay time is 0, DISPLAY waits until you hit any key.
(except ESCAPE).
'w' or 'W' : pause, any key to continue.
Up-Arrow : Go back one image.
BACKSPACE : Go back one image. Works for scroll & non-scroll mode.
ALT-D : Mark current image as deletable. '-D-' is displayed at the
top-left screen corner.
ALT-C : Mark current image as copiable. '-C-' is displayed.
ALT-M : Mark current image as movable. '-M-' is displayed.
ALT-T : Mark image as tagged, that is, tag image after slide show.
'-T-' is displayed. You must set 'keep tag after slide show'
to 0, first.
ALT-N : Mark image as untagged, that is, untag image after slide
show. '-N-' is displayed. You must set 'keep tag after
slide show' to 1, first.
ALT-U : Unmark current image.
Note:
Reverse slide show is slower.
You must set 'delay time = 0' and 'not scroll' to use Up-Arrow and
ALT-D/ALT-C/ALT-M/ALT-U/ALT-T/ALT-N.
Before leaving slide show, if there are marked images, DISPLAY will
show you another menu for the delete/copy/move operations.

(f) In movie:
SPACE : pause playing. If you press 'w' or 'W' at this time, DISPLAY
writes current frame to file. After writing, playback pauses at next
frame.
ESCAPE : Terminate playing.
'+' : Increase sound volume.
'-' : Decrease sound volume.
Ins : Increase master volume.
Del : Decrease master volume.
+ F10 : (For movie slide show) Terminate current movie. Play next movie.

(g) In ANSI viewer:


ALT_B : Toggle between normal mouse mode and mouse ball mode.
(see display.faq)

(h) In image INDEX viewer:


TAB : Change focus to next image.
+ SHIFT-TAB, BACKSPACE : Change focus to previous image.
SPACE, RETURN : View this image.
ESCAPE : Terminate.
+ ALT-D : Delete this image file.

(i) In CD player:
1 .. 9 : Select track directly.
+ : Increase CD volume. (Sound Blaster)
- : Decrease CD volume. (Sound Blaster)
Ins : Increase master volume. (Sound Blaster)
Del : Decrease master volume. (Sound Blaster)

(j) In sound player:


SPACE : Pause/continue.
+ : Increase Wave volume.
- : Decrease Wave volume.
Ins : Increase master volume.
Del : Decrease master volume.
ESCAPE : Stop.

+ (k) User input:


+ To input hex number, use 'x????'.

+ (l) Get color in graphic mode:


+ Please refer to (b) and use CTRL-F11 to get color.
(6) Mouse Buttons
=================

MIDDLE button and CTRL-RIGHT button always mean ESCAPE.

(a) in read/write menu:


single-click LEFT or RIGHT button = 'move select bar'.
double-click LEFT button = RETURN.
double-click RIGHT button = SPACE.
CTRL-LEFT button = Tag.

(b) in other text menus:


RIGHT button means SPACE.
single-click LEFT button = 'move select bar'.
double-click LEFT button = RETURN.

(c) in contact sheet preview:


RIGHT = show/hide mouse cursor.
LEFT = move an image piece if the mouse cursor is shown,
else leave graphics mode.
CTRL-LEFT = move contact sheet.

(d) in image display screen:


RIGHT = show/hide mouse cursor.
LEFT = move the image around the screen if the mouse cursor is shown,
else leave graphics mode.
CTRL-LEFT = move one page.
SHIFT-LEFT = Pop out graphic menu.
You can move this box around screen by click and drag.
ALT-LEFT = define rectangle for cropping.
Releasing left button will crop image if ALT key is still pressed,
else do nothing.
CTRL-ALT-LEFT = toggle showing image coordinates.
+ LEFT : Done.
While showing image coordinates, press ALT-LEFT to define cropping
rectangle.

(e) in mode selection screen:


Click LEFT button at:
'Imag8' or 'Imag24' : change processing target.
'000 x 000 x 000' or '000 x 000' : change display type.
'<--' or '|||' : change linking status. (controlled by resource
'auto_link_24_to_8').

(f) in text/ansi-screen viewer:


RIGHT button : Same as SPACE.
Click LEFT button at:
Top of screen : Scroll down one page.
Bottom of screen : Scroll up one page.
Left end of screen : Scroll right.
right end of screen : Scroll left.
Upper half of screen: Scroll down.
Lower half of screen: Scroll up.

(g) in image INDEX viewer:


LEFT button : Same as (d)
RIGHT button : View this image.

+ (h) in slide show:


+ Works only in non-scroll mode.
+ LEFT button : equivalent to RETURN.
+ RIGHT button : equivalent to BACKSPACE.

+ (i) Get color in graphic mode:


+ Please refer to (d) and use CTRL-ALT-LEFT to get color.

In some text regions the mouse cursor will change. Press the LEFT button
to accomplish that.

(7) Screen saver


================
Use resource 'screen_save_time' in config.dis to control the idle time
to active screen saver. You can also move mouse cursor to the following
places to control screen saver:

Upper-Left corner : Never sleep.


Low-Right corner : Sleep now.

(8) Preview
===========
Preview lets you see the small image of this picture before loading it.
You can use key 'p' to turn on/off preview (DISPLAY will switch to
graphic text mode if necessary). Currently DISPLAY support 2 strategies
for preview, i.e. loading preview from .TNL file and original image.
The first method is faster, but you need to make .TNL file first. You can
also use PKZIP or ZIP to archive .TNL images together to reduce the disk
space occupation. This .ZIP file is called 'packfile'.
The procedures of loading preview are described below:
(use_tnl_preview, global_tnl_path, global_tnl_packfile & local_tnl_packfile
are resources in config.dis)

1.
If 'use_tnl_preview' is false(i.e. 0), goto step 3.
Load preview from .TNL file within current directory. Filename is the
same as current image filename, except that extension is changed to .TNL.

If success, return.
If 'local_tnl_packfile' is specified, try to load the corresponding .TNL
image from this file within current directory.
If success, return.
2.
If 'global_tnl_path' is not specified, goto step 3.
Load preview from .TNL file within 'global_tnl_path'. Filename is the
same as current image filename, except that extension is changed to .TNL.
If success, return.
If 'global_tnl_packfile' is specified, try to load the corresponding .TNL
image from this file within 'global_tnl_path'.
If success, return.
3.
Don't use .TNL file. Load preview from current image.
Return.

(9) Initialization steps


========================
The followings are what happen when you start DISPLAY. There's nothing
you have to do, but it helps to avoid errors. The important thing is,
that a command-line option overrides the configuration file option.

1. Find allowed screen resolutions (for .grn video drivers only).


2. Read the configuration files (Global first, then Local).
Global: where DISPLAY.EXE resides. Local: where you start DISPLAY.
If you use '-f' command-line option, Global and Local config files
are ignored. The specified file is used.
3. Process the command-line options (if any). So command-line options
override the configuration file.
4. Now, RUN.

(10) Menu
=========

GENERAL RULES

This section will describe the menus and options you can choose from. You can
read through it or just start the program and play around. When you have
a problem you can come back and read the section you need.

Most things are self-explanatory. Look for the comments behind a possible
command. Also keep an eye at the first and last row of the screen: DISPLAY
will tell you in most cases what is going on.

There are several fields with a special meaning (i.e. [ Auto Read ]). You
can activate them by moving the cursor inside the marks and then click the
left mouse button.

In any MENU you can call a pull-down-menu by pressing the F9 key or moving
the cursor to the top-line and click a button.

The different functions can also be selected by using a hot-key.

Sometimes DISPLAY will ask you questions. You can answer them with a mouse
click or by pressing the first (capital) letter of the answers
(i.e. Y or y for yes).

Allowed operations are shown in white the others in grey (if you use the
default colors).

-----------------------------------------------------------------------------
THE READ-MENU
-----------------------------------------------------------------------------

After starting DISPLAY, you will find yourself in the read-menu. You will see
a file list of the directory you started DISPLAY from (or the directory you
have specified with the -t command line option). Which file information you
see, depends on your selection in the config.dis file. You can choose from
different informations (including 4DOS description files).
There are some marked fields you can use with the mouse. In the pull down
menu-bar you will find 8 headers with a different number of options. Because
most operations are accessible with short-cuts, that's the easiest way to call
them. For some operations (i.e. slide show) you have to tag at least one file.
For Reading a file (image, movie) simply select one and press RETURN or double
click with the left mouse button. Display will autodetect the correct format
by itself. If you have problems try using the SPACE bar or double click with
the right mouse button for selecting a format manually.

When image dimension is shown, '*' means that this image is 24-bit. percentage
means the compression ratio (file size/image size). Where image size is
image_width * image_height * pixel_size(1 or 3).

There is a status line at the bottom of screen. 'gamma' means gamma


correction is used. 'desc' means file descriptions are changed. 'Hi' means
using HiColor mode for preview.

1. HELP

Here you find some informations about display and it author. You can choose
the complete help (this file) and a short overview of key assignments.
Calling help will load the DISPLAY.DOC file. It contains help about possible
actions and a list of all short-cuts. There is also a description of the
meaning of the mouse buttons (be sure to check them out, because they
change, depending on the menu you use).
The second file is user defined, so you can write whatever you want. The
actual file brief.doc is just an example.

2. FILE

You have several options to manipulate files. You can delete, move, copy,
rename and view files. The options for shelling to DOS and quiting the
program are also located under this header. You can perform the actions on
a single file, a group of files (that is, tagged files), or the file
currently under the marker.

3. DIR

From inside DISPLAY you can make directories. Another point is rereading
the current directory, for updating changes you have written to disk.

4. OPERATION

That's the menu with the real highlights of DISPLAY. Here you can choose
from the options: slide show, batch conversion, contact sheet, accumulate
quantization, and the special effects. Further you can display the fonts
comming with DISPLAY, show and write a already loaded image, and unpack
gl-files. You can also create a .flc movie. For some operations, you must
tag files first.

5. CHANGE

Under this header you will find options to select the image type and
graphic resolution (for a list of possible modes for your graphic card
take a look at the status menu or type L). Other options are for changing
the working-drive and for editing the file mask (see match.doc).

6. TAG

Believe it or not this one is for tag and untag files (single, group, all).
I think that's all you must know.
7. OPTION

This menu point is for changing the defaults. Open the submenu and you
will see a number of fields, where you can change most parameters that
DISPLAY uses. You can activate them just for one run or make them the
default by saving a new config.dis. You can work with different configur
-ations, when you use different local config.dis files (i.e. make
directories for the users of your system, if there is more then one).
If you don't understand the meanings of parameters, please read config.dis.

8. STATUS

Here you can get informations about your graphic card, RAM, disk space,
and the formats of your image files.

-----------------------------------------------------------------------------
THE WRITE-MENU
-----------------------------------------------------------------------------

When you choose an option that will write changes to your disk, you will
sometimes enter the write-menu (i.e. moving files). In the write menu you
will find other marked fields for use with mouse. Although you will see the
same headers in the pop-up-menu, most of the options are disabled. Also the
most short-cuts won't help you. I think you will use this menu without
problems, because it is very self-explanatory.

-----------------------------------------------------------------------------
THE SCREEN-MENU
-----------------------------------------------------------------------------

Once you have loaded a picture, you will see the screen-menu (if you don't
set the 'auto_display_image' to 1). It has a different look and pop-up-menu
structure. If the loaded file is a movie, you will find yourself in another
menu, which is optimized for the additional needed options you need to
display movies.

The marked fields in the screen-menu are for viewing an image in the selected
resolution or writing it to file. Further you can go back to the read-menu or
exit the program. On the left you see three bigger fields. They are for those
of you, who are using a mouse and don't want to use the keyboard for pressing
the return, space, or esc keys.

The graphic modes you can choose from (to show the image) are in white, the
others are grey.

Pressing F9 again will bring up the headers of the pop-up-menu. These have
changed a little, compared to the read/write menu

1. HELP

Same as in read/write menu.


2. FILE

Only the exit option is still there, for the other things you have to go
back to the read/write menu.

3. OPERATION

Three options are now in the submenu. You can choose between special
effects, display fonts, and change processing target. The last option
means to change between palette images (most 8-bit images are of that
type) and RGB-pictures (truecolor, highcolor).

4. OPTION

Same as in read/write menu except for the preview option.

5. STATUS

The possible graphic and text mode are shown here (depends on your
hardware and the driver you use).

6. UTIL

What you find in this submenu are some often used operations from the
special effects menu (look there for a description of the comands).
Another way to manipulate your image is the pop-up menu in graphics
mode. There you can perform some effects without leaving the picture.

(11) Special Effects


====================

-----------------------------------------------------------------------------
SPECIAL-EFFECTS-MENU
-----------------------------------------------------------------------------

When you start manipulating your pictures you will at some point look in the
special-effects-menu. The different effects are sorted in 6 groups. As
mentioned above you can rotate, flip, resize, mix, and convert images.
Most often other programs offer only some of the operations DISPLAY is able
to perform. Some other effects DISPLAY performs are otherwise found in
professional and expensive graphic packages only!

In this chapter you will find the complete list of possible effects with some
short comments. The numbers are the same as in DISPLAY. If you want to make
some of these effects the defaults for batch conversion please find the
[Batch_Convert] section in config.dis and read the comment.

At the end of this section are some more detailed explanations of selected
special effects (marked with an '*'), don't miss them !!

Number Operation Comment (if necessary)

(01)-(01) Flip Horizontal -

(01)-(02) Flip Vertical -


(01)-(03) Rotate Clockwise (90) -

(01)-(04) Rotate Counter-clockwise (90) -

(01)-(05) * Rotate/Shear image(any angle) lets you rotate the image any
(->24) angle you want. If you don't
know what shearing means just
do it. It's easier to look
than to explain.

(02)-(01) * Resize image ( ->24 ) the resizing operation will


promote the image to 24-bit
if you smooth it. In the
upcoming screen are some more
options: You can change the
size by pixel, by %, or
resize different images to
the same size (batch conver-
sion)

(02)-(02) Auto Crop cuts off "unused" pixel. Better


use the online crobbing in
graphic mode (Crtl-cursor).
Useful for batch conversion

(02)-(03) * Mix/Concat two images(->24) overlay or put together two


images with different options

(02)-(04) * New Dimension Adjust the image dimension.


Adding background or cropping
if necessary.

(02)-(05) Crop image only (any position) cuts off parts of the image
you can specify the position
and the offset

(02)-(06) * Make image translation (->24) Described later.

(03)-(01) Convert to Grayscale -

(03)-(02) Do B/W Dither try FS (Floyd-Steinberg) first

(03)-(03) Pseudo Color do you like strange effects ?


Convert grey scale image to
color.

(03)-(04) * Color Quantization(24->8) statistical should be first


choice. It's good and fast.

(03)-(05) Promote to 24-bits(8->24) Will be done if needed, so you


need this not often

(03)-(06) Flatten grey image Let the pixel value be equal


to the brightness (grey value).
(04)-(01) Histogram Equalization enhance the contrast.

(04)-(02) Smooth/Enhance Images(->24) -

(04)-(03) Edge Enhancement(->24) find the image 'edge'.

(04)-(04) Negate Image -

(04)-(05) Oil paint(->24) ever wanted to be a painter ?

(04)-(06) Gamma Correction better use F1-F8 in graphic


mode. Useful for batch convert

(04)-(07) Cheesy Embossing(->24) convert color to height-field

(04)-(08) * Remove unused colors(8) -

(04)-(09) Swap R/G/B make some funny images !


interesting for pseudo-colored
images.

(04)-(10) * General convolution Do 3x3 matrix multiplication


Try to understand the given
expression (it's simpler than
it looks).

(05)-(01) Discard 24-bit image(24) -

(05)-(02) Discard 8-bit image(24) -

(05)-(03) Push image into stack -

(05)-(04) Pop image from stack -

(05)-(05) Clear stack -

(06)-(01) Load Palette Table -

(06)-(02) Save Palette Table -

(06)-(03) Display Palette Table -

(06)-(04) Push Palette Table -

(06)-(05) Pop Palette Table -

Detail Explanations of Special Effects


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

DISPLAY can store both 8-bit and 24-bit images in memory. If 8-bit image
presents, 'Imag8' is shown in the screen mode/resolution selection scren.
Otherwise 'NULL8' is shown. For 24-bit image, 'Imag24' or 'NULL24' is shown.
If 'Imag8' or 'NULL8' is highlighted, all special effects are performed on
8-bit image, which is called processing target. Of course, error message is
shown, if there is no 8-bit image ('NULL8' is shown). In general DISPLAY can
make the best decision for you. You can also use TAB key to change the
processing target. The general rule is:
The processing target is always the newly saved image.

If possible, DISPLAY keeps the target type. That is, after processing 8-bit
image is still 8-bit. If it is not allowed, type tranformation occurs. For
exmaple, 'Flip image' keeps the target type, while 'Quantization' converts
24-bit image to 8-bit image. The follow is the used symbols:
-> 24 : Result is always 24-bit image(with some exceptions).
-> 8 : Result is always 8-bit image.
8 -> 24 : This effect works on 8-bit image only and produces 24-bit image.
8 : This effect works on 8-bit image only. Image type is preserved.

Some effects(or called operations) are easy to understand. Just do it and


see the result. Some are difficult to understand. Here I make the detail
explanations of some effects.

(01)-(05) Rotate/Shear image (any angle)(->24)


Antialias : The result looks more smooth.
Background R,G,B : Used to fill the unused area in the result.

(02)-(01) Resize image (->24)


Image width, Image height : You can use '%' to specify the percentage
relative to the original image dimension.
Preserve aspect ratio : DISPLAY keeps the original width v.s. length
ratio in the result.
Smoothing : The result looks more smooth. If this
opation is off, image type is preserved.
Otherwise 24-bit image is produced.
Resize method (for batch) : This option works for batch conversion only.
Absolute : Image is resized to the specified size.
Relative : Image is resized to the specified percentage
relative to the original image.
Bounded box : Image is resized to the specified bound box
size. The result is always smaller than or
equal to the bound box. Use 'Preserve aspect
ratio' to control the aspect ratio.
Fix width : If 'preserve aspect ratio', use the specified
image width and adjust image height so that
the new aspect ratio is the same as original,
otherwise same as 'Absolute'.
Fix height : Same as above but applied to height.

(02)-(03) Mix/Concat two images (->24)


This is the one of thw two effects that
works on two images.
Fore over Background(no w.) : Very simple. If the pixel in forground image
is BLACK(that is, pixel value is 0), it is
replaced by the corresponding pixel in
background image.
Background R,G,B : Used to fill the unused area in the result.

(02)-(04) New Dimension


This effect doesn't resize image, just change
the image size. If the new size is smaller
than original size, cropping is performed.
Otherwise, unused area is filled with Back-
ground R,G,B.
For 24-bit image, the result is always 24-bit.
For 8-bit image, if number of colors is greater
than 256, the result is converted to 24-bit.

(03)-(04) Color Quantization (24->8)


This is the most complicated
operation in DISPLAY.
I recommend the 'Statistical' and
'Variance Based' methods.
Fixed 256 : Worse quality, fast, always 256 colors.
Median Cut : quality better than 'Fixed 256', slightly slow.
Median Cut(Better) : The best quality of all, need LARGE memory,
slowest. I don't recommend you the method.
Grey 256 : Convert to grey, always 256 colors, fastest.
Variance Based : Good quality, accetable time and memory
comsumption.
Statistical : Actually, I can hardly tell the difference
between this method and 'Variance Based'.
Current Palette : Useful if you want to produce images that use
the same palette. Use 'display palette table'
to show current palette.
Ordered(fast) : The fastest method for color quantization.
Need no additional memory.
Neural Net(256) : Always 256 colors. The quality is controlled by
'neuquant_sample_factor' resource.

(04)-(08) Remove unused colors (8)


This effect trys to remove unused and
duplicated colors from 8-bit image.
It can decrease the number of colors.

(04)-(10) General convolution (-> 24)


I think that mathematical expression is
more clear:
_ _ _ _
| (x-1,y-1) (x ,y-1) (x+1,y-1) | | K0 K1 K2 |
A = | (x-1,y ) (x ,y ) (x+1,y ) | , B = | K3 K4 K5 |
| (x-1,y+1) (x ,y+1) (x+1,y+1) | | K6 K7 K8 |
- - - -
new pixel at (x,y) = (sum all A(i,j) * B(i,j)) / overall_divider

For those without matrix knowledge:


Think of A as a picture.
1 1 1 The B matrix are the 9 values you can fill
1 1 1 in the Kernel fields. The multiplication of
1 1 1 two matrices (which must have the correct
row and column size) results in a single value.
R R R Now imagine that 'picture' A (3x3 pixel)
G G G 3xR+3xG+3xB consists of colored lines (i.e. Red Green Blue)
B B B and all K-values in B equals '1'.
You'll get a new center pixel, which is bright
3 red + 3 green + 3 blue white. If you set the overall divider to 50
the resulting pixel will be grey (dark white).
So as a result you will mix-up the colors of
your picture. The divider sets the brightness.

(02)-(06) Make image translation (->24) (documented by Bernhard Maerz)


----------------------------------------
This is a very powerfull tool to make nice effects by changing of the
brightness. There are much different ways possible to change the brightness
and secondary there could be used a maskfile to use different methods on
different parts of the picture.

Foreword:
three numbers separated by a '/' are RGB values:
i.g. 30/60/0 are Red=30, Green=60 and Blue=0

First, there should be explained how the brightness would be changed.


For this thing, there exist a 256x256 image (called TABLE), which tells how
to do it. You can select Your own table or You can use one of the tables
directly implemented in DISPLAY (read display.faq for the formulas) :
- User defined table (from stack)
- Brightness adjust
- Contrast adjust

Before You read the following, You could take a small look on one of the
implemented tables with the option (in the mask image translation menu):
Display mask table in graphic mode

You will see a 256x256 image. Each defined method of changing the brightness
needs ONE HORIZONTAL LINE. Because there are 256 lines, there are 256 WAYS
of changing the brightness.

Let us look at an example to explain how it work: the implemented brightness


table. The upper and the left numbers are only for help and are not saved in
the tablefile. The numbers in the table are set by colors:
(The value along Y axis is taken from mask, while the value along X axis
taken from original image)

black for 0 - white for 255

# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#########################################################################
0 # 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
. #
64 # 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8
. #
128 # 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
. #
192 # 128 128 129 129 130 130 131 131 132 132 133 133 134 134 135 135 136
. #
255 # 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255

This table contains 256 ways of changing the brightness. Let us look at
one of them. For example, take a look at line 64. This line contains
256 numer of values.
For EACH OLD BRIGHTNESS VALUE are standing the NEW VALUE OF BRIGHTNESS.

When the brightness is changed, this will be done separately with


Red, Green and Blue.

The line 64 'says' the following:


For EACH Red, Green, Blue value it will be changed
from 0 to 0
from 1 to 0
from 2 to 1
from 3 to 1
from 4 to 2
ans so on.

So here are a few examples:


The color 6/0/1 will be changed to 3/0/0
the color 6/9/0 will be changed to 3/4/0
the color 4/7/5 will be changed to 2/3/2

For each pixel, You can specify 3 different mask values for R, G, and B,
respective. For example, you can use masks 0, 128, and 255. Therefore
red component is changed to 0, green component is not changed, and blue
component is changed to 255.

If You have carefully lookd at the table, You would have remarked that the
line 128 doesn't change anything. And if You have take a better look, You
would know what the 256 methods would be done:

Brightness adjust table


Methode
0 Darken the image to fully black
... Darken the image
128 Doesn't change the image
... Lighten the image
256 Lighten the image to fully white

And this is the first easy way to use this option. You can simple select
the option
'Where to get Mask User input'
and then You can say with
'Mask value (user input)'
which of the 256 methods should be used. You can specify three different
mask values for R, G, and B, respective. Then the whole picture would be
changed with these methods specified by the three masks.

If You select the Brightness adjust table and the mask value of 100, the
image would be a bit darken. Have You selected 70 instead, the picture would
be a bit more darken.

Maybe You ask, You could have done that allready with DISPLAY (but not with
different strengthness). But with this table You are much more flexible.
So You could make a table which will lighten only the dark parts of the
picture. Such a table could look like the following:

0 ... 30 ... 60 ... 90 ... 120 ... 150 ... 180 ... 210 ... 240 ...
#########################################################################
. #
128 # 0 ... 30 ... 60 ... 90 ... 120 ... 150 ... 180 ... 210 ... 240 ...
. #
160 # 0 ... 70 ... 95 ...120 ... 145 ... 170 ... 195 ... 220 ... 245 ...
. #
192 # 0 ...110 ...130 ...150 ... 170 ... 190 ... 210 ... 230 ... 250 ...
. #

The method in line 192 says the following:


30/0/0 will be lighten by +80 to 110/0/0
60/0/0 will be lighten by +70 to 110/0/0
90/0/0 will be lighten by +60 to 150/0/0
...

But furthermore, the option 'Mask image translation' could be made even
more.

It's not only possible to say what method should be used by the option
user input, it's possible to use different methods in one process by
defining a mask file.

This mask file should have the same size as the image to process, but
there is no need to make this manually, because DISPLAY resizes it
automatically. But if the size of the mask file is very small (relatively
to the picture), the size should be increased a bit manually (with smooth),
because DISPLAY resizes it directly while processing the 'mask image
translation' and can't so use any smoothing.

Then DISPLAY takes each pixel from the original picture (which should be
changed) and takes the pixel from the mask picture from the same position
(tells the methode) and makes the changes like defined.

For this I will make a small example which uses again the brightness adjust
table.

The mask file could look like the following.

0 10 30 10 0
10 40 60 40 10
30 60 128 60 30
10 40 60 40 10
0 10 30 10 0

With such a mask file (and brightness adjust table) the orignal picture
will be stay in the center, but it will be become more darker to the edge.

In the text above, I have allways written ONE number in the table and mask
file. This means all changes done for Red, Green and Blue are the same. But
You can use RGB images as masks, too, and then the changes are different.

You can use RGB or 8-bit image as table (palette is discarded). Finally,
the mathematical equation is given below (for 24bit mask and table):

new_pixel[x,y].r = table[ old_pixel[x,y].r , mask[x,y].r ].r


new_pixel[x,y].g = table[ old_pixel[x,y].g , mask[x,y].g ].g
new_pixel[x,y].b = table[ old_pixel[x,y].b , mask[x,y].b ].b

(12) Tech. information


======================

Program (user interface and some codecs) written by Jih-Shin Ho.


Some codecs are borrowed from XV (2.21) and PBMPLUS (Dec. 1991).
JPEG is based on the JPEG library(5b) by the Independent JPEG Group.
Tiff is based on the Tiff library(3.2) from ftp.sgi.com.
DL is based on xdl.c & Xanim269.
FLI/FLC is based on the article in DDJ (Mar. 1993).
MPEG is based on Berkeley mpeg_play 2.0.
AVI(CRAM,CVID,ULTI) is based on Xanim269 by Mark Podlipec.
MPEG split is based on mpgsplit by Stefan Eckart.
Inflate code, written by Mark Adler, is borrowed from Info-ZIP's UNZIP 5.12.
Deflate code, written by ,is borrowed from Info-ZIP's ZIP 2.01.
Compiled with DJGPP.
All video drivers are borrowed from DJGPP and GRX, or from users.
You can get the whole DJGPP and GRX package from :
omnigate.clarkson.edu: /pub/msdos/djgpp
or Simtel mirror sites. For example:
oak.oakland.edu: /SimTel/vendors/djgpp.

(13) About the author


=====================

I am a student in National Chiao-Tung University, Taiwan, R.O.C.. Why do I


write DISPLAY ? Because I can't find any viewer in DOS world which can fulfill
my needs. I want to have a viewer for my personal use, so that I can do any
experiment I want to do. It is obvious that the easiest and best way is to
write a viewer by myself.

The first thing I think of is which compiler I should use. Turbo-C ? No, I
don't want to bother with segment and offset any more. Watcom-C ? No, I don't
have money to buy it. DJGPP ? YES, it is a 32-bit C compiler with good
reliability becuase the engine is GNU C compiler. The most important reason is
that it is FREE.

I develop DISPLAY on 486DX-33 with 16MB ram, So memory is not a problem. I


decide to write program in UNIX style, because DJGPP emulates the UNIX
environment. Thanks to the virtual memory function in DJGPP, I don't need to
worry about the memory allocation. In the initial stage, I just write DISPLAY
for my persion use. Finally, I want to hear others' opinions, so I release it
to the Net. Many people give me suggesitons, encouragement and bug reports.
They all help to keep DISPLAY growing. The role of DISPLAY also changes from
plain viewer to multi-purpose viewer. Now DISPLAY is not just my program
because it includes many ideas from the users.

DISPLAY source code size : 156 files, 77927 lines, 2560246 bytes.
Including : ZIP code.
Not including : MPEG player, JPEG and TIFF library.

Finally, if you think that DISPLAY is good enough and would like to write a
postcard to me, my physical address is :

Room 1410, Graduate Student Dorm., National Chiao-Tung University,


Hsin-Chu 300, Taiwan, R.O.C.

My room (above address) will change after September 1995. If you want to
mail me without knowing my new address, you can mail to:

Institute of Electronics, Engineering Building 4, National Chiao-Tung


University, Hsin-Chu 300, Taiwan, R.O.C.

(14) Final
==========

This document is not well-written. If you have any PROBLEMS, SUGGESTIONS,


COMMENTS on this program, please send a mail to
u7711501@bicmos.ee.nctu.edu.tw (140.113.11.13).
(There is NO anonymous ftp on this site.)

I need your suggestions to improve this program.

Acknowledgments:
I should like to thank the authors of XV and PBMPLUS for their permission
to let me use their subroutines.
Also, I thank the authors of the TIFF and JPEG libraries.
Thank you DJ. Without DJGPP I can't do anything on a PC.
The author would like to thank Olivier Dumas, Oliver Weyand, Ben Jos Walbeehm,
Bryan Woodworth and other users for their advices and suggestions.
Thanks Bernhard Maerz, Paul Melman for giving me suggestiions continuously.
The author would like to thank NCTUCCCA for offering a place for DISPLAY.

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

Das könnte Ihnen auch gefallen