═══ 1. Introduction ═══ PMJPEG is a shareware image viewer with image processing and conversion capabilities for OS/2 2.x. PMJPEG is a port of WinJPEG to OS/2 2.x. PMJPEG v.0.95 has the following features: ■ display JPEG, GIF, Targa, Windows BMP, or OS/2 BMP images ■ display of JPEG images with 1-pass/2-pass quantization and Floyd-Steinberg dithering ■ color balance: red, green, and blue adjustment ■ hue, saturation, and brightness adjustment ■ image rotation, vertical or horizontal flip ■ batch file compression of GIF or TARGA files to JPEG File Interchange Format (JFIF) In order to see images displayed with the right colors, you must use a version of OS/2 and a 256 color driver that support palette manager. Both OS/2 2.0 with the Service Pack and OS/2 2.1 beta support palette manager. If you are using the 256 color ET4000 driver that comes with OS/2 2.1 beta, you'll notice that the image under the dialog box or under the drop-down menu is not re-drawn correctly. This is a bug in the ET4000 driver. When you exit, the system colors may not return to normal. This appears to be a bug with the palette manager of the December 1992 OS/2 2.1 beta. However, the palette does appear to correct itself after you open and/or close a window, such as the window list. The planned features for v.1.0 are: ■ display JPEG, TIFF, Targa, GIF, Windows BMP, or OS/2 BMP images ■ export an image to JPEG, TIFF, Targa, GIF, or OS/2 BMP ■ display of 24-bit images with 1-pass or 2-pass(for JPEG only) quantization and Floyd-Steinberg dithering ■ color balance: red, green, and blue adjustment ■ hue, saturation, and brightness adjustment ■ contrast enhancement ■ image rotation, vertical or horizontal flip ■ batch file compression of GIF, TIFF, or TARGA files to JPEG File Interchange Format (JFIF) ■ slideshow: display selected files sequentially with a cycle option Registered users will receive a copy of v.1.0 when it is available (expected in early April). ═══ 2. JPEG ═══ Joint Photographic Experts Group (JPEG) refers to a still-picture compression standard that specifies several modes of operation. The mode used by the Independent JPEG Group's(IJPEG) software, which is incorporated into PMJPEG, is sequential buildup; in this mode, each component of an image is encoded in a left-to-right and top-to-bottom scan. Sequential mode is lossy, which means that when you compress an image, you will lose information. That is, when you decode the compressed image, the decoded image will not exactly match the original. One reason that sequential mode JPEG is lossy is that the algorithm compresses an image by removing visually insignificant information, colors that the human eye cannot detect. ═══ 3. Image File Formats ═══ o JPEG File Formats o Graphics Interchange Format (GIF) o Targa o BMP ═══ 3.1. JPEG File Formats ═══ The JPEG committee has not specified a standard file format, and consequently, many applications of the JPEG algorithm use their own proprietary format. PMJPEG uses the JPEG File Interchange Format(JFIF) which transports only pixel information. JFIF is supported by the IJPEG Group's software and other programs based on their code. Handmade Software's GIF2JPG and Image Alchemy by default use a proprietary JPEG format that is not compatible with the JFIF standard. This proprietary format is not supported by PMJPEG. When you use GIF2JPG, remember to use the "-j" option to produce a JPEG file that is compatible with the JFIF standard and viewable with PMJPEG. However, the GIF2JPG's "-j" option doesn't always produce a file in JFIF. If you have to use a DOS converter, we recommend that you use the IJPEG Group's cjpeg program. Otherwise, you should use PMJPEG's Batch Compression feature, which performs the same task as cjpeg except that only GIF and TARGA images are supported. ═══ 3.2. Graphics Interchange Format (GIF) ═══ PMJPEG can view interlaced/non-interlaced GIF87a and GIF89a files. If a GIF89a file contains more than one image, it will display the first image in the file. ═══ 3.3. Targa ═══ PMJPEG can view uncompressed TARGA files stored with 8, 15, 16, 24, or 32 bits per pixel. ═══ 3.4. BMP ═══ PMJPEG can view OS/2 BMP or Windows BMP files. ═══ 4. Menu Commands ═══ The menus are ordered by the following main topics: o File Menu o Edit Menu o Options ═══ 4.1. File Menu ═══ The File menu includes commands that enable you to open and save files, to batch convert files to JPEG, and to display multiple images in a selected order. o Open o Save All Options o Delete o Batch Compression o Exit ═══ 4.1.1. File Open ═══ Select the name of a file to display. ═══ 4.1.2. Save All Options ═══ This will save all the PMJPEG options to a file named "pmjpeg.sav" in the same directory as the PMJPEG executable. When PMJPEG is initially loaded, the options will be loaded if "pmjpeg.sav" exists. ═══ 4.1.3. Delete ═══ This menu command lets you delete the file containing the currently displayed image. PMJPEG will prompt you for confirmation before deleting the file. ═══ 4.1.4. Batch Compression ═══ Select GIF and TARGA files to compress to JPEG format with the options specified in the JPEG Options dialog. The list box on the left displays the drives and the directories in the current path, the one in the middle displays the files in the current path, and the one on the right displays a list of files to be converted. To add file(s) to the latter box, select the file(s) you want to convert and press the Add button. The output file(s) will have the same name as the input file(s) except that they will have a ".jpg" extension. Also, the output file(s) will be placed in the same directory path in which the input file(s) were located. See also JPEG Options. ═══ 4.1.5. Exit ═══ Exit from PMJPEG. ═══ 4.2. Edit Menu ═══ The Edit menu includes commands that enable you to change the color components of an image, and to manipulate the image. o HSV Adjustment o Color Balance o Rotate o Flip Horizontal o Flip Vertical ═══ 4.2.1. HSV Adjustment ═══ Use the scroll bars to adjust the amount of hue, saturation, and value/brightness in an image. A value of 0 on the scroll bar means that there is no change in the corresponding color component. When the value is increased or decreased, the color component is increased or decreased, respectively. Warning: the HSV calculations are very slow in 24-bit mode. ═══ 4.2.2. Color Balance ═══ Use the scroll bars to adjust the amount of red, green, and blue in an image. A value of 0 on the scroll bar means that there is no change in the corresponding color component. When the value is increased or decreased, the color component is increased or decreased, respectively. ═══ 4.2.3. Rotate ═══ Rotate the image clockwise by 90 degrees. ═══ 4.2.4. Flip Horizontal ═══ Flip the image around the vertical axis. ═══ 4.2.5. Flip Vertical ═══ Flip the image around the horizontal axis. ═══ 4.3. Options Menu ═══ The Options menu includes commands that let you determine how other commands operate. The settings for the options can be saved with the Save All Options command. o JPEG Options ═══ 4.3.1. JPEG Options ═══ 2-pass(Heckbert) quantization produces better looking output than 1-pass quantization and it is slower. Also, 2-pass quantization uses more memory so it may be even slower because PMJPEG will swap to hard disk when it runs out of virtual memory. The output of 1-pass generally looks more grainy. Dithering uses available colors in a palette to simulate additional colors. The dithering method that PMJPEG uses is called Floyd-Steinberg Dithering. Dithering is useful when quantizing to 256 colors or less but it is not needed for a true-color (24-bit) display. You may want to turn off dithering since it sometimes causes a grainy output image. The Quality Factor, an integer between 0 and 100 inclusive, determines the tradeoff between the output file size and the output image quality. If you choose a high quality factor, the image quality will be high but the file size will be large. A lower quality setting will yield a smaller file at a cost of lower fidelity. Since the JPEG algorithm is lossy, a quality factor of 100 will not give you a losslessly compressed image. The Smoothing Factor, also an integer between 0 and 100 inclusive, determines the degree of smoothing to apply to an image before compressing that image with JPEG. The higher you set the factor, the higher the degree of smoothing that is applied. A smoothing factor of 0 means that no smoothing is performed. Smoothing removes noise introduced when an image is dithered, and, in turn, smoothing produces a smaller JPEG file. It should be used for only dithered images, like photographic GIF pictures. Generally, a factor between 10 and 50 removes the dithering noise from an image. Entropy Optimization produces a smaller JPEG file but it takes more time to encode the image. If PMJPEG runs out of virtual memory while it is decoding/encoding JPEG files, it will use temporary files that are created in the specified path. ═══ 5. Reporting Bugs ═══ If you find a bug in PMJPEG, we would appreciate it if you would inform us of the bug through one of our e-mail accounts: Norman Yee nyee@osiris.ee.tufts.edu Ken Yee kenyee@ksr.com When you send us a bug report, include a description of the procedure for reproducing the bug and a description of your system configuration(hardware and software). ═══ 6. Disclaimer ═══ The authors of this program accept no responsibility for damages that are caused by this program and make NO WARRANTY or representation, either express or implied, with respect to this software. This software is provided "AS IS," and you, its user, assume the entire risk when you use it. ═══ 7. Acknowledgments ═══ PMJPEG is based in part on the work of the Independent JPEG Group. Windows is a trademark of Microsoft Corporation. OS/2 is a trademark of International Business Machines Corporation. The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated. WinJPEG is copyright (C) 1992, 1993, Norman Yee and Ken Yee. All rights reserved. PMJPEG is copyright (C) 1993, Norman Yee and Ken Yee. All rights reserved.