ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LxPic V6.0 (c)1997 Stefan Peichl, Heidelberg, Germany http://home.t-online.de/home/stefan.peichl eMail: stefan.peichl@metronet.de ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LxPic is a very fast, powerful and small DOS picture viewer. It has just 15KB code and runs in 64KB memory on any 8086 compatible computer to decode and view pictures of any size. This makes LxPic ideal for use on the HP Palmtop, for which it was originally designed. On Windows systems, LxPic runs perfectly in a DOS box. LxPic processes BMP, PCX, JPG and GIF files of any kind. BMP and PCX files may have 2, 4, 256 or True Colors (16 Mio). JPG files may have 256 gray scales or True Colors. GIF files may have Version 87a or 89a (including multi images) with up to 256 colors. LxPic has a low, medium and high {JKL} resolution list mode, to preview more than one picture as thumbnails on one screen. Dependent on your selected display mode, up to 132 thumbnails are displayed on one screen. See LIST MODE section for further information about this feature. LxPic recognizes your display adapter and sets the display to the best of the following modes, dependent on your hardware. Use {F2} to cycle through these modes. {Shift F2} cycles back- wards. - VGA : 640 x 480 x 16 colors (Bios 12h) 9/16/36 thumbn. - VGA : 320 x 200 x 256 colors (Bios 13h) 4/ 9/12 thumbn. - EGA : 640 x 350 x 16 colors (Bios 10h) 9/16/36 thumbn. - CGA : 640 x 200 x 2 colors (Bios 06h) 6/15/24 thumbn. HP Palmtop only (see also PALMTOP ADVICE section of this doc): - CGA : 640 x 200 x 4 colors (Bios 06h) 6/15/24 thumbn. - HP95: 240 x 128 x 2 colors (Bios 20h) 2/ 4/ 6 thumbn. If your computer is equipped with a VESA bios which supports direct hardware access, LxPic starts in the 640x480x256 VGA mode. Use {F3} to cycle through the higher resolution Super VGA modes. {Shift F3} cycles backwards. - VGA : 640 x 480 x 256 colors (VESA 101h) 9/16/36 thumbn. - SVGA: 800 x 600 x 256 colors (VESA 103h) 9/16/36 thumbn. - XGA : 1024 x 768 x 256 colors (VESA 105h) 9/36/81 thumbn. - SXGA: 1280 x 1024 x 256 colors (VESA 107h) 16/64/132 thumbn. NOTE: Not every VESA bios supports graphics text output. Switch with {F2} to the standard VGA modes, to see the help window {F1} and file info box {F} of LxPic. If your screen remains blank after startup or displays unexpected results, press {F2} to access the standard VGA modes or try {Alt F3} to use the slow SVGA bios pixel output, if supported by your VESA bios. See TECHNICAL for further information about VESA. If a picture has more colors than the actual screen mode allows, the colors are reduced and dithered. If you don't want to see colors, you may always switch colors off with the {C}olor toggle key. If you don't want to see grayscales, you may always enable B&W display using the {W} toggle key. LxPic does not support printing, but you may use the DOS Print Screen function to copy the actual screen to a printer if you have the DOS graphics driver GRAPHICS.COM installed. The special HP Palmtop resize command {H} corrects the dispro- portion of the Palmtops pixel ratio and of the colorful VGA 320x200x256 mode. LxPic has an interface to use it as a 'subroutine' in other programs. See PROGRAMMERS INTERFACE section of this document- ation for further information. *The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ REVISION HISTORY ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Version 6.0 -Low, medium, high resolution list modes {J,K,L} (06-DEC-97) -640x200x4 grayscale CGA mode (Palmtop only) -Grayscale/B&W toggle key {W} added on the Palmtop -Save CGA thumbnail screen as B&W PCX file {F5} -Gamma correction added {6,9} -Better text color selection -Low resolution VESA start up mode Version 5.1 -Multi image (animated) GIF support (06-OCT-97) -Space bar acts as 'single step' in animated GIFs -File name toggle key {X} added -Pixel aspect ratio now from 0.5 - 1.4 (useful for converted CAM files) -Zoom factors 16 and 32 added -Compression and Frame entry in file info box -Correct display of SONY JPEG files -F4 (Save as B&W PCX) dither bug fixed Version 5.0 -Color reduction and color dither (14-SEP-97) -JPEG 'extended sequential DCT' support (SOF1) -JPEG 'progressive DCT' support (SOF2) (only DC coefficients are displayed) -JPEG application segment processing toggle {F10} -Start up with best possible resolution Version 4.2 -Programmers interface adaptations for LxMap (17-JUN-97) -Minor improvements Version 4.1 -Improved VESA support (direct hardware access) (22-MAY-97) -{Alt F3} toggles SVGA hardware/VESA pixel output -{U}pside down command added -No more 'zoom in' restrictions concerning width -Zoom now keeps track of the image center -Programmers Interface adjustments -CAM2JPG now also supports CASIO QV-100 CAM format -Intel MMX support Version 4.0 -VGA, EGA Color/Greyscale display added {F2} (24-APR-97) -VESA SVGA 256 color mode pixel output added {F3} -Mouse support (see COMMAND section of this DOC) -{C}olor display on/off toggle key added -B&{W} display on/off toggle key added -{E}rase screen toggle key replaces old {C} key -{F7} convert B&W to Grey replaces old {F3} key -Show color palette key {F8} added Version 3.5 -Interlaced GIF support (13-MAR-97) -Cursor keys now move 1/2 screens -Page keys now always move 8 pixel rows/columns -Space{BAR} interrupts output -{Q}uit command added -Palmtop {Menu} key added to work like Help {F1} -Commands from within the Help window are now immediately executed -More logical pixel aspect ratio selection -Stepwidth for contrast etc. reduced from 8 to 4 Version 3.4 -Rename/Move command {N} added (26-JAN-97) -Select pixel aspect ratio command {F6} added Version 3.3 -Correct display of Fujifilm DS-7 JPEG files (07-JAN-97) Version 3.2 -Version 3.1 bug fixed (07-DEC-96) Version 3.1 -More speed: Output interrupted at any command (03-DEC-96) Version 3.0 -JPEG 'baseline sequential DCT' support (SOF0) (29-NOV-96) -/S switch to scan drives or subdirectorys Version 2.3 -Zoom out 1:8 and zoom in 8:1 added (01-NOV-96) -Programmers Interface improvements Version 2.2 -Intrasegment call added to Programmers Interface (22-OCT-96) Version 2.1 -Programmers Interface added (22-SEP-96) Version 2.0 -BMP,GIF,PCX,ICN of any size and dimension (31-AUG-96) -VGA,EGA,CGA,HP95 support -Dither for color pictures -Scrolling -Zoom In/Out -Edit functions -HP resize mode -B&W PCX conversion Version 1.0 -Only B&W BMP and PCX files (24-APR-96) New versions of LxPic will be available on the Internet under: http://home.t-online.de/home/stefan.peichl/lxpic.zip ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ MINIMUM SYSTEM REQUIREMENTS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ - Processor: 8088 - DOS : 2.11 - Adapter : CGA - Memory : 64 KB - Storage : 15 KB ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ WHAT'S IN YOUR LXPIC.ZIP FILE ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LXPIC.COM The picture viewer LXPIC.DOC This file GAMMA.GIF Gamma correction GIF file CAM2JPG.COM Converts CASIO QV-10A CAM to greyscale JPEG and CASIO QV-100 CAM to True Color JPEG FILE_ID.DIZ LxPic summary HP Palmtop only: LXPIC.ICN Icon for use with HP Palmtop system manager DSPEED.COM Double speed clock driver to prevent 4 grayscale flicker on some speed upgraded HP Palmtops. See also PALMTOP ADVICE section of this doc. In order to run LxPic, you only need the file LXPIC.COM. All other files are informational or for special purposes and may be kept somewhere else. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ HOW TO USE LXPIC ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LxPic needs no installation. If called without parameters, LxPic searches the current directory for all files with the extension BMP,GIF,JPG,PCX or ICN and displays them in the order found in the directory. If no files are found, LxPix exits and displays the help screen. LxPic has no file select feature, but it behaves like the DIR command of DOS and accepts the /S command line parameter to scan all subdirectories too. Which files are displayed depends on how you name them and where you keep them. To display a specific picture, use its full or relative pathname as parameter for LxPic. The wildcards * and ? are allowed in the filename to display a group of pictures with similar names. ÄEXAMPLESÄ LXPIC displays all pictures in the current directory LXPIC/S displays all pictures in the current directory and its subdirectories LXPIC DEMO.* displays for example DEMO.PCX, DEMO.GIF and DEMO.JPG in the current directory LXPIC \PIC\V?.PCX displays for example V1.PCX and V2.PCX in the directory PIC of the current drive LXPIC D:/S displays all pictures on your D: drive. Very useful for CDROMs LXPIC C:\GAMMA.GIF /S searches your whole C: drive for the file GAMMA.GIF and displays it if present If you use the scan switch /S, LxPic exits after all files have been displayed. Without /S, LxPic loops endlessly until you press ESC. Going back one picture is only possible within one subdirectory, so don't be puzzled by unexpected results using the {P}revious picture key in a scan. The /S switch is most useful to browse a CDROM on the desktop within seconds. Press the {L}ist key to have a thumbnail overview or press the {A}utozoom and {V}ideo key to have the fastest and most informative overview of the pictures on a CDROM. Using a standard picture viewer under Windows, it would take hours of mouse clicking to do the same job. If you want to add LxPic to the Application Manager of your HP Palmtop, copy LXPIC.COM and LXPIC.ICN into the directory where your pictures reside, for example C:\PIC, and enter as path entry of the new application: C:\PIC\LXPIC.COM|70 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ KEYBOARD AND MOUSE COMMANDS ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ The Help key {F1} pops up a window with all command keys. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³v6.0 (c)1997 stefan.peichl@metronet.de³ ³ LXPIC [filename.BMP|GIF|JPG|PCX][/S] ³ ³ * ? Wildcards ok, /S scans SubDirs ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³JKL ListMode on/off³F1 Help (or Menu)³ ³F FileInfo on/off³F2 VGA|EGA|CGA|HP³ ³X FileName on/off³F3 SVGA VesaModes³ ³H HPResize on/off³F4 Save as bw PCX³ ³E EraseScr on/off³F5 Save scrn only³ ³I InvtPict on/off³F6 Pixl Asp ratio³ ³U UpsiDown on/off³ESC Exit (or Q,^C)³ ³A AutoZoom on/offÃÄÄÄÄCOLOR/GREYÄÄÄÄ´ ³T TextZoom on/off³C Col dsp on/off³ ³+=- ZoomPict in/out³W B&W dsp on/off³ ³S V Slid/Vid on/off³RGB RGB col select³ ³> < Slid/Vid fa/slo³M Mix RGB colors³ ³BAR Slid/Vid suspnd³D Dither on/off³ ³DEL Delete picture³/ Reset values³ ³N Rename picture³6 9 Gamma - +³ ³P Prev picture³7 8 Shadows - +³ ³CR Next picture³4 5 Highlights - +³ ³PG..Move 8 row/col³1 2 Contrast - +³ ³CU..Move « screens³0 . Brightness - +³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Press {F1} again or press {ESC} to close the Help window. If you press a valid command key, the Help window is closed, and the corresponding action is immediately performed. Almost all commands are single key strokes and I tried to assign meaningful keys to the commands. The action taken upon a command is valid for the actual and all following images. If you have, for example, a sequence of pictures with little contrast, you have to adjust contrast only once. You may enter a command at any time. The command is immediately executed, interrupting the actual output. You don't have to wait with command input until the picture is completely displayed. If you hear a key click, the pressed key had no function at all or did not apply to the actual picture type, or you reached the end of a range. Use the cursor keys or the mouse to scroll an image. Cursor keys scroll the image by 1/2 screen in the indicated direction. Page keys (Palmtop: Fn+cursor) scroll the image by 8 columns or 8 lines in the indicated direction. I exchanged the meaning of these keys for single key strokes on the Palmtop. I tried to keep the x/y offset in consecutive pictures to allow you zoom- ing the same position in a slideshow. ÄMOUSE INPUTÄ LxPic automatically enables mouse support if it finds a mouse driver installed and a mouse connected. Mouse and keyboard may be used concurrently. The supported mouse functions are: click left Next picture click right Previous picture press left + click right Zoom in press right + click left Zoom out press left + move mouse Move picture, as if you put your hand on the picture. Move the mouse slowly for best results! ÄKEYBOARD INPUTÄ L High resolution thumbnail mode. See LIST MODE section for further information K Medium resolution thumbnail mode J Low resolution thumbnail mode F Display file and parameter information box: GAMMA.GIF Filename ÚÄÄÄÄÄÄÂÄÄÄÄÄÄ¿ ³Bytes ³ 1244³ Filesize : in bytes or KB ³Type ³ COLOR³ Picturetype: COLOR | GREY | B&W ³Comprs³ LZW³ Compression: SOFx_YCbCr|LZW|RLE|NONE ³Frame ³ 1³ Framenumber: usually 1 except in videos ³Deep ³ 4³ Colordepth : 1|2|3|4|5|6|7|8|24 (in bits) ³Wide ³ 344³ Pixelwidth : actual representation ³High ³ 50³ Pixelheight: actual representation ³X_0 ³ 0³ Pixelcolumn: of upper left displayed corner ³Y_0 ³ 0³ Pixelline : of upper left displayed corner ³Ratio ³ 1:1.0³ Pixel ratio: 1:0.5 - 1:1.4 ³Zoom ³ 1:1³ Zoom in/out: 32:1 - 1:32 in powers of 2 ³B&wDsp³ OFF³ B&W display: ON | OFF ³ColDsp³ OFF³ Col display: ON | OFF ³Dither³ ON³ Dither mode: ON | OFF ³Color ³ RGB³ Col select: RGB | RED | GRšN | BLUE | GREY ³Gamma ³ 0³ Gamma : 0=unchanged, 5=max, - 5=min ³Shadow³ 0³ Shadow : 0=unchanged, 127=max, -127=min ³Hlight³ 0³ Highlights : 0=unchanged, 127=max, -127=min ³Contra³ 0³ Contrast : 0=unchanged, 127=max, -127=min ³Bright³ 0³ Brightness : 0=unchanged, 127=max, -127=min ÃÄÄÄÄÄÄÁÄÄÄÄÄÄ´ ³ 640x200x4 ³ Screenmode : width x height x colors ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ X Display only file name in the upper left corner. H Resizes the picture to a pixel aspect ratio of 1:0.8. A picture with 640x240 pixel is resized to 640x200 pixel for example. The actual aspect ratio is displayed in the file info box. HP resize is off by default. See also the more general pixel aspect ratio command {F6}. E Erase screen between two pictures (ON by default) I Invert screen. LxPic inverts pictures by default, if running on a HP Palmtop Z Center picture in the middle of the screen (ON by default) U Display picture upside down and mirrored. This has no effect on the save commands {F4} and {F5}. A Auto zoom. If switched on, the zoom mode is selected, which displays most of the picture. Auto zoom is OFF by default. If switched on, you see the letter 'A' in the 'Zoom' entry of the file info. T Text zoom out mode. Zooming out for B&W images is implemented by default as 'drop two, keep two' to prevent moire effects from previously dithered pictures. This command toggles zoom out mode to 'drop one, keep one', which is better for viewing B&W pictures including text. If switched on, you see the letter 'T' in the 'Zoom' entry of the file info box. Text zoom is OFF by default and only available for B&W pictures. + Zoom out to 1:2, 1:4, 1:8, 1:16 and 1:32 = Reset Zoom to 1:1 and start display with the upper left corner set to 0,0. (Use also {*} on desktops) - Zoom in to 2:1, 4:1, 8:1, 16:1 and 32:1 S Perform a slideshow V Perform a video. Same as slideshow, but at maximal speed without erase screen between pictures. Multi image Gif files are also displayed at maximal speed, giving you the illusion of a video. > Slideshow/Video faster up to maximal speed < Slideshow/Video slower BAR Enter 'single step' mode for Slideshow/Video/List or multi image GIFs. Press Spacebar again for next picture/frame. Exit single step mode with {CR} or {P}. DEL Delete the actual displayed picture. You have to confirm before the file is deleted N Rename/Move picture filename. You may not move the file to a different drive because this would be a 'copy', which is not supported. After the rename, the next picture is displayed. May not work under Win95. P Display previous picture, as found in the directory. This command also changes the direction for Slide/Video/List. You cannot use it to run a video backwards. CR Display next picture, as found in the directory. This command resets the direction for Slide/Video/List to forward. ESC Exit LxPic. If you exit LxPic with {^C}, an errorlevel of 1 is returned, which is useful in batch files. Q Quit LxPic. Same as ESC. F1 Display Help window. (Also {Menu} on the Palmtop) F2 Cycle through all standard VGA modes, if supported by your hardware. Use {Shift F2} to cycle backwards. F3 Cycle through all VESA SVGA modes, if supported by your bios and hardware. Use {Shift F3} to cycle backwards. Try also {Alt F3} to switch between direct hardware access and VESA bios pixel output. F4 Save the whole picture -as you see it- to a B&W PCX file. You are asked for a filename. You must use a different filename from the original name and you have to add the extension PCX. The width of the saved picture is restricted to 1280 pixels. Exceeding pixels are cut off. BMP pictures end mirrored upside down. Use the {U}pside down command for correct display. The {U}pside down command has no effect on the saved picture! To save a frame of a multi image GIF file, use {Spacebar} to select the frame. F5 Same as {F4}, but only the visible part of the picture is saved. If you want to select an even smaller part on the Palmtop, switch with {F2} to the HP95 mode and save from there. To invert a Palmtop topcard, load it, press {I} and then {F5} to save the inverted topcard. Also use this command to save a CGA thumbnail screen to a PCX file. F6 Selects pixel aspect ratios in the range 1:0.5 to 1:1.4 Enter the number after the decimal point (= 0-9). Useful for distorted camera pictures and CGA monitors. The HP resize command {H} is the shortcut of {F6}{8}. The actual aspect ratio is displayed in the file info box. F7 Converts B&W picture to a 8 bit greyscale picture. This enables you to edit a B&W picture with the commands that are only available for color or greyscale pictures. F8 Show color palette in the upper left corner. Only works on EGA or better. The palette length depends on the screen mode and is 16 or 256. Show palette is OFF by default. F10 JPEG application segments may contain 'baseline' copies of 'progressive' pictures. If processing of application segments is turned on, the (better quality) 'baseline' picture is displayed. If turned off, the 'progressive' picture is displayed. Processing is OFF by default. ÄCOLOR PICTURES ONLYÄ The following commands are only available if a picture with more than two colors is displayed. C Toggles between greyscale and color display. Color display is ON by default. W Toggles between B&W and color/greyscale display. B&W display is OFF by default. D Switch Dithermode OFF/ON. (ON by default). R Display Red part of the picture only G Display Green part of the picture only B Display Blue part of the picture only M Mix Red, Green and Blue to Grey = 30%R + 59%G + 11%B / Reset Shadow, Highlight, Contrast, Brightness and Gamma to 0. Set color to RGB. Switch dither on. Switch color display on. Switch B&W display off. 6 Decrease Gamma: nonlinear brightness decrease 9 Increase Gamma: nonlinear brightness increase 7 Decrease Shadows: Colors <127 move towards Grey 8 Increase Shadows: Colors <127 move towards Black 4 Decrease Highlights: Colors >127 move towards Grey 5 Increase Highlights: Colors >127 move towards White 1 Decrease Contrast: All colors move towards Grey 2 Increase Contrast: Colors <127 move towards Black Colors >127 move towards White 0 Decrease Brightness: All colors move towards Black . Increase Brightness: All colors move towards White (use also {,} on desktops) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LIST MODE ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ You enter and exit List mode by simply pressing one of the three keys {J,K,L}. If you enter list mode, the next image in the directory will be the first picture displayed as a thumbnail. You may exit list mode at any time. The last displayed thumbnail becomes the actual picture. If one screen is filled with thumbnails, press {Enter} to see the next screen. LxPic stops output if all pictures of a directory have been displayed as thumbnails. If you run LxPic in scan mode (command line switch /S), LxPic stops output after the last image of all subdirectories has been displayed. LxPic then beeps to signal the end. Press any key to exit LxPic. By default, LxPic displays filenames in list mode. Press {X} to suppress filename output. During list mode, you may always press {Space Bar} to enter single step mode. LxPic then stops after every thumbnail. You may now press one of the three keys {J,K,L} to exit list mode and view the last thumbnail in full screen mode. Use this feature to select a picture from the list. During list mode, almost all command keys are available, except those keys that require input from you, and those keys, that perform output, like the help key {F1} and the {F}ile info key. All other commands may be entered at any time. You may for example press {P} to list backwards or switch dither off to have sharper thumbnails. For display, list mode uses the actual configuration as set by you before entering list mode (pixel aspect ratio, contrast, brightness etc.). Under CGA screen mode, you may save a thumbnail screen as a B&W PCX file with {F5}. This is useful for creating archives from digital camera pictures. On the Palmtop, thumbnails look nicer in the 4 grayscale mode. Thumbnails, saved in the 4 gray- scale mode, may also be viewed in this mode. In every other screen mode, you have to use a screen capture TSR utility to perform this task. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PALMTOP ADVICE ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Ä4 GRAYSCALE CGAÄ I implemented a 640x200x4 grayscale CGA mode on the HP Palmtop by reprogramming the display controller. As long as you only view B&W pictures you will remark no difference. The new mode is only activated for color or grayscale pictures. You may have to increase your displays contrast by pressing {On+}. The draw- back of this mode is, that text output is blurred. If you don't like this mode, simply press {W} once, to enable B&W display. On some speed upgraded Palmtops, the 4 grayscale display may flicker. This is because of some clock drivers, constantly resetting the frame rate. You may replace your clock driver through DSPEED.COM contained in the LXPIC.ZIP file to work around this problem. Be sure to replace your old clock driver and reboot your system. Do not simply add DSPEED.COM as a second clock driver, because two clock drivers surely conflict. NOTE: Installation of DSPEED.COM is at your own risk! I am not responsible for any damage of your data! Be sure to backup your Palmtop before rebooting it! ÄSTORAGEÄ If you are concerned about little storage capacity, JPEG will be your preferred picture format on the Palmtop. But if you want to have output speed, B&W PCX files have the best speed/ size ratio. In other words, it makes no sense to keep BMP, GIF or color PCX files on your Palmtop. To convert color pictures to the speedy B&W PCX format, proceed as follows: - Press {H} to have the exact width/height proportions - Adjust contrast, brightness, shadow, highlight - Zoom in/out, if needed - Press {F4} to save the whole image or - Press {F5} to save only the visible part of the image. If you want to select a smaller part than the HP100/200 screen, use {F2} to switch to the HP95 mode and make your selection in the HP95 window and press {F5} in the HP95 mode to save this smaller part only. - Delete the original color picture. I do not recommend to use B&W GIF files, because GIF's LZW decoding is slow compared to PCX's RLE decoding. The slightly smaller B&W GIF file size does not compensate for this drawback. NOTE: BMP and PCX files with less than 33K, GIF files with less than 21K and JPG files with less than 13K perform better because the whole picture can be kept in the buffer of LxPic. Larger files have to be loaded and reloaded in portions, which might be time consuming if you use slow storage devices. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ JPEG ON THE PALMTOP ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ You have to understand some basics of JPEG in order to use it most effectively on the Palmtop. This applies only if you have influence on the JPEG pictures you want to display, that is, if you have a software to produce the (or convert to the) JPEG format. The LxPic implementation of JPEG supports the baseline and progressive (DC values only) mode of operation. These modes are lossy, that is, when the JPEG picture is created, the informa- tion of the original image is reduced to save storage space. The amount of information that is lost may be determined by you. Before saving a JPEG file, a good software asks you for a quality factor. You may go down to low quality and still have a good picture on the palmtop, because most of the quality is lost anyway in the B&W representation on the Palmtop. JPEG supports grayscale and True Color images. True Color is represented by luminance and chromatic values instead of red, green and blue components. Furthermore, the luminance component may be more weighted than the chromatic component of a picture, again in order to save space. The luminance component of a JPEG image is nothing else than its grayscale representation and grayscale JPEG images only have the luminance component. LxPic extracts this luminance component and displays it. The chromatic components are ignored on the Palmtop. Hence you loose no information if you use only greyscale JPEG, but you save space. A True Color JPEG image with low quality may have a compress- ion rate of 0.2 bit/pixel, which is about 4K for a full screen CGA image. The same BMP image needs 24 bit/pixel, which is 120 times bigger. Hence you save about 99% of storage capacity and loose only little quality. Compression rates with greyscale JPEGs are even better. Compared to B&W PCX images, which use 1 bit/pixel, you still need only 20% of storage space. LxPic performs best with low quality greyscale JPEG images, which also produce the smallest files. The output speed is highly correlated with the quality, because the better the quality, the more time consuming calculation has to be done in the inverse discrete cosine transform (IDCT). ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ TECHNICAL ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LxPic uses information provided by the VESA bios to access the hardware directly for better performance. Your VESA bios must provide a pointer to a 'bank switch subroutine' and must use a 64KB memory window. If this is not the case, LxPic starts in the standard VGA mode. But your VESA bios may still support pixel functions. They are slow but usable. You access them with {F3} if your bios only supports pixel functions, or with {Alt F3} if your bios supports direct hardware access and pixel functions. In this case, {Alt F3} toggles between these two output modes. Color reduction to 256 or 16 colors is done by using a very fast 'nearest color' algorithm based on a stuctured palette. The dither mode uses modified Floyd-Steinberg error diffusion, where the color error of a pixel is distributed to the adjacent pixels. Grey values are build from 30% Red + 59% Green + 11% Blue. This takes into account the luminescence of the colors instead of simply calculating Grey as R+G+B/3. A Grey value of 0 means Black, a Grey value of 127 means Grey and a Grey value of 255 means White. The inverse discrete cosine transform (IDCT) of JPEG uses an algorithm with only 4 multiplications, which I developed to make things go at some speed on the Palmtop's 80186. LxPic does not use internal bitmap representation because of restricted memory. It decodes directly to the screen via a line buffer. Any action leads to a completely new decoding of the picture. LxPic is developed on a HP200LX. It is written in Assembler. This language still exists and tends to produce small and quick code. LxPic is also a demonstration of what can be done in graphics with 15KB code in 64KB memory on a 8088. Think of what could be done with 1MB code in 32MB memory on a 80568 processor and compare it to today's reality! ÄRESTRICTIONSÄ - no uncompressed PCX files - no compressed BMP (=.RLE) files - no hierarchical and lossless JPEG modes of operation - no transparent GIF display ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ PROGRAMMERS INTERFACE ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LxPic has an internal interface for use with other programming languages or batch files. This interface allows you to place pictures at a desired position in an already filled application screen. You may select whether you want to gain back control immediately after the picture has been placed on the screen, or whether you want to pass intermediate control to LxPic and get back control when the ESC key of LxPic is pressed. The appli- cation may then write around or even into the picture. Multiple pictures may be positioned or overlayed on one screen. If you want to put more than one color picture on a color screen, all pictures should use the same color palette, otherwise only the colors of the last drawn picture are correct. The interface uses 12 bytes of the bios data area starting at the absolute address 00450h (40h:50h relative). The bios reserves these bytes for the cursor coordinates of the text pages 1-6 in an ascii text mode. In graphic modes, these bytes are zeroed and unused. Since LxPic works only in graphic modes, these bytes may be used as an interface for LxPic. ÄINTERFACE SPECIFICATIONÄ byte 00450h Interface selection flag: 00h = do not use the interface (default) 01h = use interface, exit via DOS EXIT function 02h = use interface, exit via RET FAR instruction 03h = use interface, exit via RET instruction Set bit 7 in the interface selection flag if you want to pass intermediate control to LxPic. All command keys are available except the mode keys {F2} and {F3}. If you only want to enable the zoom and scroll keys, set bit 6 as well. word 00451h Mode selection word. This word is bit coded. 10 9 8 7 6 5 4 3 2 1 0 = bit number | | | | | | | | | | | | | | | | | | | | | | Meaning if bit is set | | | | | | | | | | | --------------------- | | | | | | | | | | |___clear screen | | | | | | | | | |_____invert picture | | | | | | | | |_______center picture | | | | | | | |_________autozoom | | | | | | |___________HP Palmtop resize | | | | | |_____________dither off | | | | |_______________text zoom | | | |_________________convert to B&W | | |___________________convert to greyscale | |_____________________upside down |_______________________display file info box byte 00453h Zoom factor. Valid values are: -5 = 1:32 -4 = 1:16 -3 = 1:8 -2 = 1:4 -1 = 1:2 0 = 1:1 1 = 2:1 2 = 4:1 3 = 8:1 4 =16:1 5 =32:1 if the value is not valid, 0 is assumed. word 00454h Screen Pixel column. If the pixel column is not valid in the actual graphic mode, 0 is assumed. NOTE: LxPic output always starts at pixel columns, that are multiples of 8. word 00456h Screen Pixel row. If the pixel row is not valid in the actual graphic mode, 0 is assumed. word 00458h X0 offset (upper left column) within the picture word 0045Ah Y0 offset (upper left row) within the picture ÄRETURN CODESÄ LxPic exits via DOS funktion 04Ch or a RET FAR or a RET instruction leaving behind return codes in register AL. The codes and their meaning are: 0 errorfree execution -1 (reserved for DOS) -2 file not found -3 invalid screen mode -4 unsupported signature/version of picture file -5 uncompressed PCX file -6 compressed BMP file -7 unknown GIF separator -8 invalid LZW code in GIF file -9 unsupported JPEG mode of operation -10 unsupported arithmetic coding in JPEG -11 unsupported Y sampling factor in JPEG -12 no default DQT table support in JPEG -13 no DNL support in JPEG -14 no OS/2 DIB support in BMP -15 insufficient memory ÄDETAILSÄ If LxPic finds at address 00450h a value other than 0, it takes it and puts back 0. That is, you always have to fill in the interface if you want to use it. If the value was not 0, LxPic checks for a valid graphic video mode. If no valid graphic video mode has been set by you, LxPic exits without action. Valid graphic modes are: VGA = 13h VGA = 12h EGA = 10h CGA = 06h HP95 = 20h VGA = 101h (VESA) SVGA = 103h (VESA) XGA = 105h (VESA) SXGA = 107h (VESA) Any change of the video mode or any clear screen, performed using BIOS or DOS functions, resets the interface to 0. That is, fill in the interface *AFTER* you configured the screen. If you selected 'center picture' in the mode word, the pixel row and pixel column values are ignored. If you selected 'autozoom' in the mode word, the zoom factor, the pixel row and pixel column values are ignored. ÄTURBO-C SAMPLE CODE FOR USE OF LXPIC VIA SYSTEM CALLÄ /*-----------------------------------------------------------*/ /* This example assumes that LXPIC.COM and GAMMA.GIF are */ /* stored in the directory C:\PIC of your computer. */ /* Because of inline assembly, you have to use TCC from the */ /* command line, to compile this example */ /*-----------------------------------------------------------*/ #include #include #include /* function prototype */ int picture(int mode,char zoom,int column,int row,char *pic); /*-----------------------------------------------------------*/ main() { /* set a valid graphic mode */ asm mov ax,6 /* select video mode 6 */ asm int 10h /* set it */ /* your code goes here */ printf(" this is GAMMA.GIF"); /* output GAMMA.GIF half sized at column 16, row 10 */ picture(0,-1,16,10,"C:\\PIC\\GAMMA.GIF"); /* your code goes here */ printf("\n\n\n\n\n\n\n\n this was GAMMA.GIF"); } /*-----------------------------------------------------------*/ int picture(int mode,char zoom,int column,int row,char *pic) { char lxpic[100]="C:\\PIC\\LXPIC "; /* full LXPIC pathname */ /* fill in the interface */ asm push ax /* save AX */ asm push bx /* save BX */ asm push ds /* save DS */ asm mov ax,0 /* load DS... */ asm mov ds,ax /* ...with segment 0 */ asm mov bx,0450h /* load bx with offset */ asm mov al,1 /* flag = use DOS EXIT */ asm mov [bx+0],al /* set flag */ asm mov ax,mode /* load mode selection */ asm mov [bx+1],ax /* set mode selection */ asm mov al,zoom /* load zoom factor */ asm mov [bx+3],al /* set zoom factor */ asm mov ax,column /* load pixelcolumn */ asm mov [bx+5],ax /* set pixelcolumn */ asm mov ax,line /* load pixelrow */ asm mov [bx+7],ax /* set pixelrow */ asm pop ds /* restore DS */ asm pop bx /* restore BX */ asm pop ax /* restore AX */ /* display the picture */ return(system(strcat(lxpic,pic))); } /*-----------------------------------------------------------*/ ÄUSE OF LXPIC AS A SUBROUTINEÄ To use LxPic as a subroutine using INTERsegment calls, you have to do the following: 1- allocate a whole segment of continuous memory (=64K), say with segment address SEG. 2- load the LxPic code at SEG:100h using the DOS loader/exec function 04Bh (subfunction AL=3) 3- set a valid graphic video mode 4- fill in the command tail at SEG:80h with the filename of the picture you want to display. See a DOS documentation for the structure of the command tail in the PSP. 5- fill in the interface, using interface selection flag = 2 6- set DS=ES=SEG and execute LxPic as a subroutine via CALL FAR SEG:100h. LxPic saves and restores all registers except AL, which holds the return code. ...repeat steps 4-6... 7- release the 64K memory block If you want to create COM files, you have to use INTRAsegment calls to LxPic. LxPic recognizes the intrasegment call and shrinks its internal buffers, to fit in the rest of the 64k segment. Proceed as follows: 1- find the first free paragraph in your 64k segment, say at address FREE. 2- load the LxPic code at FREE+100h using the DOS loader/exec function 04Bh (subfunction AL=3) 3- set a valid graphic video mode 4- fill in the command tail at FREE+80h with the filename of the picture you want to display. 5- fill in the interface, using interface selection flag = 3 6- set DS=ES=FREE and execute LxPic as a subroutine via CALL FREE+100h. LxPic saves and restores all registers except AL, which holds the return code. ...repeat steps 4-6... NOTE: Programs using the LxPic interface may not be distributed commercially without license. Details are available from the author. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ DISCLAIMER AGREEMENT ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ LxPic is copyrighted freeware. LxPic may not be distributed commercially or bundled with commercial products without license. This also applies to programs which use the internal interface of LxPic. Users of LxPic must accept this disclaimer of warranty: "LxPic is supplied as is. The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The author assumes no liability for damages, direct or consequential, which may result from the use of LxPic." ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ