Beruflich Dokumente
Kultur Dokumente
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)
!!! 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.
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.
All Read/Write formats support full color(8 bits), grey scale, b/w dither,
and 24 bits image, if allowed for that format.
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.
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.
-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.
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.
+ 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.
(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.
(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)
In some text regions the mouse cursor will change. Press the LEFT button
to accomplish that.
(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.
(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.
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).
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
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
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.
-----------------------------------------------------------------------------
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 !!
(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)-(05) Crop image only (any position) cuts off parts of the image
you can specify the position
and the offset
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.
Foreword:
three numbers separated by a '/' are RGB values:
i.g. 30/60/0 are Red=30, Green=60 and Blue=0
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.
# 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.
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:
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 ...
. #
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.
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):
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.
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 :
My room (above address) will change after September 1995. If you want to
mail me without knowing my new address, you can mail to:
(14) Final
==========
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