-------------------------------------------------------------------------------- PART I -- TIPS FOR DIFFERENT OPERATING SYSTEMS -------------------------------------------------------------------------------- (1). WINDOWS (from Oliver Weyand) Start Display under WINDOWS through a PIF file. Give display all memory you have (parameters -1 for ems and/or xms in pif-editor), because you will have no swap-space in a windows-shell (that's ok, because windows will manage the virtual memory). Make sure NOT to use a graphic driver in protected mode (windows will show you one of this boring error messages), so don't add the 'driver ::p' statement to your go32 environment. With DISPLAY 1.82 or latter, you are not forced to use VESA driver. (2). OS/2 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de) Load a vesa-driver in your autoexec.bat (under OS/2 this file is only executed when you open a DOS shell). Don't use 'driver ::p'. Give it enough memory: the standard 4MB dpmi-memory are not enough. Open the menu for the DOS shell and edit the entries for memory (EMS,XMS,DPMI). Also edit the entries for graphic capabilities. If you won't use the autoexec.bat file for display's DOS session, enter the name of the used batch file. If you don't understand this things refer to your OS/2 manual. For further hints how to setting up DOS shells under OS/2 refer to the hints that can be found on many ftp servers (if you are an OS/2 user you will know them, i.e. hobbes). It was reported to me, that display won't run under OS/2 at all. Sorry guys, can't help you. I just tell you what has worked for me with version 2.1 on my 486/33. BTW, if you search a good viewer-converter for OS/2 give Joe-View a chance (joevw128 or higher, shareware). (3). Novell DOS 7 (from Oliver Weyand, chbrin3@nyx.uni-konstanz.de) When running display under NWDOS 7 there is only one thing that is different from MSDOS: the multitasking environment. You have to make sure, that display can't use dpmi. So you can either type 'dpmi off' at the NWDOS prompt or add the nodpmi statement to the go32 variable (set go32=nodpmi ...) in the runme.bat. Because the NWDOS multitasker supports only standart VGA mode you should use display not in graphics- text mode (if you do display will switch to plain text after an error message). Further the only available graphics mode is 320x200-8bit. You can convert files or generate movies in the backround, while you play a your favourite game (beware, that you need at least a 486 with at least 8-16MB RAM). Because I use NWDOS on a stand-alone machine I can't say anything about using display with Netware-Lite. (4). LINUX If someone knows anything about the dos-shell of linux please fill in here. Because there are other good graphic programs running under X11 I'm not sure if there is need to run display under linux. But anyway, if someone has done it please write, post, e-mail. -------------------------------------------------------------------------------- PART II -- OTHER FAQS -------------------------------------------------------------------------------- Q1: How can I convert group of 24-bit images to 8-bit images with the same palette table ? A: Use the following steps: 1. Find a palette table: Tag the images you want. Select 'accumulation quantization' to produce a palette table. - or - press F5, then 'load a palette table'. 2. press F4, then change 'number of colors option' to 'no effect'. 3. press F5, then select 'push palette table'. 4. Tag the image you want. Select 'batch conversion' with two special effects: (1) 'pop palette table' (2) 'color quantization' with 'current palette' option. Q2: How can I view the original palette table of an image ? A: press F4, then change 'number of colors option' to 'no effect'. Q3: How can I resize image using percentage ? A: Just add '%' to end of number, like '120%'. Q4: Why does this program show the message, 'CPU must be in real mode' ? A: It is likely that you have 'device=emm386.exe noems' in config.sys. Remove 'noems'. Q5: What is 'response file' ? A: Response file is used to overcome the 128-byte limit in command line length. You can put anything in response file just as in command line. For example, you can put the following lines in IMAGE.LST : aaa.gif bbb.jpg ccc.bmp then use 'DISPLAY --slide @IMAGE.LST' to do slide show. Q6: What is 'description file' ? A: Desciprtion file is a file containing the description for each image in current directory. It can help you remember what is in each image. You can change the file name to whatever you want (Please read the TEXT section in config.dis). The standard file name for 4DOS (another command processor for MS-DOS which can replace COMMAND.COM) is descript.ion. If you want to manipulate description file yourself, I suggest that you get 4UTILS??.ZIP from simtel20 mirror sites. Please see PART III for the format. The format used in 4DOS is more complicated than that listed here. Q7: What files are needed for minimal usage ? A: The minimal set of needed files is : GO32.EXE, DISPLAY.EXE, RUNME.BAT, one Video Driver, CONFIG.DIS, EMU387(if you don't have x87), Fonts(if you want contact sheet). Any thing else can be deleted. Q8: Why don't movie and mouse work in Windows or OS/2 environment ? A: Because of the timer problem, movies are not supported in these environments. Mouse in these environments is not stable yet, so I disable it in the official release. Q9: What is 'processing target' ? A: DISPLAY can store both 8-bit and 24-bit images in memory. You must select one from the two. If 'img8' is highlighted, all operations are performed upon 8-bit image. Otherwise 24-bit image is used. Q10: What is 'linking' ? A: For people who have 8-bit(256 colors) video card only, there is no possibility to view true-color image. Because 24-bit image is quantized to 8-bit before viewing. Can I crop true-color image manually in graphic mode ? Yes, by setting resource 'auto_link_24_to_8' when you crop 8-bit image, 24-bit image is cropped, too. 'linking' works for cropping only. Q11: How can I make a new video driver ? A: Look at the DRVSRC directory. Find a source file that is close to your video card. Use text editor to edit the source file. Follow the commands in makefile to make a new video driver. All video drivers are borrowed from DJGPP and GRX. You can get the whole DJGPP and GRX package from : omnigate.clarkson.edu: /pub/msdos/djgpp or simtel20 mirros sites. You must understand assembly language. I suggest that you use et4000.asm as a template. Q12: How can I increase the JPEG decompression speed ? A: set jpeg_fast_decode to 1. If you have only 8-bit(256 colors) display card, you should tune two additional parameters: jpeg_quantization & jpeg_color_dither. For the fastest speed, set jpeg_quantization to 'Grey256' or '1 Pass' and jpeg_color_dither to 'Ordered'. Please read the PROCESS_CONTROL section in config.dis. Q13: What do the JPEG-related parameters mean ? A: For the Decompression parameters, please read the PROCESS_CONTROL section in config.dis. For Compression parameters : (Borrowed from IJG document) Quality : The quality switch lets you trade off compressed file size against quality of the reconstructed image: the higher the quality setting, the larger the JPEG file, and the closer the output image will be to the original input. Normally you want to use the lowest quality setting (smallest file) that decompresses into something visually indistinguishable from the original image. For this purpose the quality setting should be between 50 and 95; the default of 75 is often about right. If you see defects at -quality 75, then go up 5 or 10 counts at a time until you are happy with the output image. (The optimal setting will vary from one image to another.) quality 100 will generate a quantization table of all 1's, eliminating loss in the quantization step (but there is still information loss in subsampling, as well as roundoff error). This setting is mainly of interest for experimental purposes. Quality values above about 95 are not recommended for normal use; the compressed file size goes up dramatically for hardly any gain in output image quality. Optimize: Perform optimization of entropy encoding parameters. Without this, default encoding parameters are used. optimize usually makes the JPEG file a little smaller, but DISPLAY runs somewhat slower and needs much more memory. Image quality and speed of decompression are unaffected by optimize. Smooth N: Smooth the input image to eliminate dithering noise. N ranging from 1 to 100, indicates the strength of smoothing. 0 (the default) means no smoothing. The smooth option filters the input to eliminate fine-scale noise. This is often useful when converting GIF files to JPEG: a moderate smoothing factor of 10 to 50 gets rid of dithering patterns in the input file, resulting in a smaller JPEG file and a better-looking image. Too large a smoothing factor will visibly blur the image, however. Restart marker N: Emit a JPEG restart marker every N MCU rows, restart 0 (the default) means no restart markers. The restart option inserts extra markers that allow a JPEG decoder to resynchronize after a transmission error. Without restart markers, any damage to a compressed file will usually ruin the image from the point of the error to the end of the image; with restart markers, the damage is usually confined to the portion of the image up to the next restart marker. Of course, the restart markers occupy extra space. We recommend restart 1 for images that will be transmitted across unreliable networks such as Usenet. Sample HxV: Set JPEG sampling factors. If you specify fewer H/V pairs than there are components, the remaining components are set to 1x1 sampling. The default setting is equivalent to sample 2x2. This "wizard" switch is intended for experimentation with JPEG. If you don't know what you are doing, don't use them. Fast JPEG encode: Use fast integer DCT (less accurate). Q14: Can I play movie under Windows or OS/2 ? A: Yes. But the timing is not very accurate. If you use third-party products, playing movie may not work. Q15: Should I enable 'skip B frame' in MPEG ? A: If you want to increase frame rate, enable this option. It increases the playing speed, but you will see the discontinuity in playing. Don't enable this option when saving each frame. Q16: What is the difference between CURRENT and DEFAULT description file ? A: DEFAULT is the filename specified in config.dis (in TEXT section). You can change it within DISPLAY. (function key F4) CURRENT is the filename you select by using function key 'g' or 'G'. When you change to a new directory, description file is reset to the DEFAULT. At this time, CURRENT is the same as DEFAULT. You can use 'g' or 'G' to change CURRENT to any file you want, and DISPLAY uses this file as description file until you change to another directory. You can also change CURRENT back to DEFAULT by function key 'ALT_F'. Q17: Why does DISPLAY not load description or image dimension from description file ? A: You must turn on the 'description' and/or 'dimension' options in resource 'extra_text_option' and turn on resource 'read_desc_dim'. Note: If the image file size in description file is different from the file size DOS reports, dimension is not read. (date and time are not used). Q18: Why does DISLAY not write image dimension to description file ? A: You must set the resource 'write_desc_dim' to 1 to enable this. Note: DISPLAY doesn't automatically write description and/or image dimension to description file. You must do this manually (key ALT_W). Q19: What is the difference between normal mouse and mouse ball ? A: As far as I know, the difference is that mouse ball doesn't have buttons. In mouse ball mode, if you move mouse, image will scroll. No button is needed. You can use 'mouse_ball_factor' to change the corresponding image scrolling rate. Q20: What is INDEX ? A: INDEX is a .idx file which contains the corresponding contact sheet name and the image position within contact sheet. When you select INDEX file, DISPLAY loads the corresponding contact sheet and allows you to select which image you want to view within this contact sheet. INDEX file is very flexible. You can change the image name and path, so that you can view image in other directory or even movie files. Note: For those who don't have Hi/True Color card, I suggest that you save the contact sheet as 8-bit image. Q21: What is Thumbnail ? A: Thumbnail is a small image DISPLAY generates that can help to speed up preview. The advantage is no delay for preview. The disadvantage is that you need additional disk space for thumbnail. For the format of thumbnail file, please read Part III of the file. If you want to know how thumbnail works in preview, read 'Preview' section in DISPLAY.DOC. Q22: what is Association ? A: Assocition is a link between file and program. Though DISPLAY can read many file formats, it can't read ALL. You can use association to tell DISPLAY what to do with the specified files. You can also use association to override the internal behavior in DISPLAY. For example, if you don't like the GL player in DISPLAY, you can use the following association to view GL with grasprt: association=.gl,grasprt Actually you can specify any association you want. Full path and command- line switch are allowed. Q23: How can I use Sound Blaster in my computer ? A: You must set the environment variable BLASTER. Please consult your Sound Blaster manual. Q24: Why does my computer crash when I start DISPLAY if my Sound Blaster emulator is loaded ? A: By default, DISPLAY will check if Sound Blaster exits in your computer. If your Sound Blaster emulator doesn't in protected mode, you can disable this checking by setting 'check_sb' (in config.dis) to 0. In this way, DISPLAY assumes there is no Sound Blaster in your system. -------------------------------------------------------------------------------- PART III -- SOME FILE FORMATS -------------------------------------------------------------------------------- Palette File Format ------------------- offset length content 0 8 "DISPpal0" 8 4 number of colors(Intel byte order). 12 4 R,G,B,A for each color. ... ... ...... YUV Format (from Berkeley MPEG ENCODER package) ---------- The U and V components are subsampled 4:1. To give you an idea of what format the YUV file must be in, the following code will read in a YUV file: unsigned char **y_data, **cr_data, **cb_data; void ReadYUV(char *fileName, int width, int height) { FILE *fpointer; register int y; /* should allocate memory for y_data, cr_data, cb_data here */ fpointer = fopen(fileName, "r"); for (y = 0; y < height; y++) /* Y */ fread(y_data[y], 1, width, fpointer); for (y = 0; y < height / 2; y++) /* U */ fread(cb_data[y], 1, width / 2, fpointer); for (y = 0; y < height / 2; y++) /* V */ fread(cr_data[y], 1, width / 2, fpointer); fclose(fpointer); } Raw RGB Format -------------- for (y = 0; y < height; ++y) for (x = 0; x < width; ++x) { read RED; /* 1 byte */ read GREEN; /* 1 byte */ read BLUE; /* 1 byte */ } Raw GREY Format --------------- for (y = 0; y < height; ++y) for (x = 0; x < width; ++x) read GREY; /* 1 byte */ Contact Sheet Script File Format -------------------------------- 1. Lines start with # are comment lines. 2. You must add this string to start of the file : "contact_sheet". This string is an ID of script file. 3. You can write up to 2 strings for each image file in script file. Each string can be up to 49 characters. Strings are separated with the character '|'. For example : I am 1| You are 2 4. If possible DISPLAY writes the two strings in the same line. For example: I am 1 You are 2 ^ Strings are separated with one SPACE character. If the total length of two strings is too long, DISPLAY writes the two strings in two lines. For example: I am 1 You are 2 5. If image file name contains path(e.g. c:/qqq/n.gif or ../n.gif), it is used as is. Otherwise(no path) current directory is assumed. 6. The following is a sample script file: --------Start-------- # This is a sample file contact_sheet ../KIKI-TON.GIF Kiki's| gif file c:N.GIF Nausicaa| gif file NAUSICAA.GIF Another Nausicaa PORCO.GIF Porco Rosso d:/tmp/image/TOTOROS.GIF Totoros| gif WOTW1.GIF |line 2 only --------Stop-------- Description File Format ----------------------- Format: For example: aaa.gif this is aaa.gif bbb.jpg I am bbb :-) cat.bmp Oh! There is a cat in this image. Batch Contact Sheet Script File Format -------------------------------------- 1. Lines start with # are comment lines. 2. You must add this string to start of the file : "batch_contact_sheet". This string is an ID of script file. 3. This file is for command-line use only. 4. The format of user input string is in 'Contact Sheet Script File Format'. 5. SHEET.TPL is a documentation file. Read it. Image Dimension Format in Description File ------------------------------------------ @Size,Date,Time,Width,Height,Pixel Where: @ : a numerical number 4 (i.e. CTRL_D in ASCII) : a number(byte, 8 bits) assigned by 4DOS. DISPLAY uses 'H'. Size : File size in Hex format. Date : File date in Hex format. Time : File time in Hex format. Width : Image width in Dec format. 0 for non-image file. Height : Image height in Dec format. 0 for non-image file. Pixel : Pixel size in Dec format. Must be 0, 1, 3, 11 or 13. 11 and 13 mean that this file is movie. INDEX File Format ----------------- conatc_sheet number image1 x1 y1 width1 height1 image2 x2 y2 width2 height2 : : Where : The first line must be the string "DISPLAY_INDEX_FILE". conatc_sheet : The corresponding conatc sheet file of this index. You can include path in the filename. If path is not found, DISPLAY loads contact sheet from current path. number : Number of images in this contact sheet. image1 : filename of image1 in contact sheet. Path is allowed. image loading is the same as contact sheet. x1 y1 : The position of image1 in contact sheet. width1 height1 : The bounding box of image1. Note: You can modify the contact sheet name and image name. Please don't modify image position and bounding box. For example: DISPLAY_INDEX_FILE c:\pic\example\conact.jpg 3 aaa.gif 0 0 100 100 bbb.bmp 0 100 100 100 c:\pic\good\ccc.jpg 100 0 100 50 Thumbnail File Format --------------------- offset length content 0 8 "DISPTNL0" 8 4 thumbnail width 12 4 thumbnail height 16 4 original image width 20 4 original image height 24 16 original image name, padded with 0. 40 128 reserved 168 14400 thumbnail image, padded with 0. Greyscale, 256 levels.