home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / VIEWGIF3.ZIP / VIEWGIF.DOC < prev    next >
Text File  |  1990-03-12  |  11KB  |  225 lines

  1. VIEWGIF ver 1.40
  2. ----------------
  3.  
  4. This program allows viewing GIF files under OS/2 Presentation Manager.
  5. It requires a VGA or super VGA card and works best with a 256 color
  6. PM driver (now available for Video 7 VRAM VGA and NEC Graphics Engine).
  7. I don't know how it works with the IBM 8514/A card, but I think the DAC 
  8. registers are also VGA compatible.
  9. For loading a file you can select if you alter the palette registers directly
  10. (VGA only) or let OS/2 do it for you (with dithered colors).
  11.  
  12. This is a true OS/2 PM program, so it does not run under DOS or the DOS 
  13. compatibility box. There are already enough ones for DOS (VPIC, etc.).
  14. The program is public domain and you can spread and copy it as much you want.
  15.  
  16. The program can also read DeluxePaint LBM files, but not LBM files created by 
  17. DP II Enhanced. I don't know the unpacking algorithm on DP II Enhanced. It can 
  18. also handle ZSOft .PCX files until version 3.00.
  19. The Grab menu creates also (unpacked) DeluxePaint II files, in the same way as 
  20. the CAMERA utility does under DOS.
  21.  
  22. The command line switch -c or /c enables direct palette manipulation as a 
  23. default. You can Associate in the File System VIEWGIF -C for all .PCX, .GIF and 
  24. .LBM files.
  25.  
  26. Menu items:
  27. Menu bar(F10 or doubleclick):
  28.       Toggles menubar/titlebar display.
  29.  
  30. File (F): 
  31.       change directory and load picture file (Only .GIF, .PCX  and .LBM
  32.       extensions are enabled). With marking the Direct Palette manipulation
  33.       check box, the program changes the VGA DAC registers directly so the
  34.       other programs in the PM session 'go technicolor'. In this case a task
  35.       switch with Ctrl-Esc or Alt-Esc or popping up the file menu will restore
  36.       the PM default palette and then the GIF picture is in false color. This
  37.       works only with pictures with less or equal number of colors than the VGA
  38.       driver. When the checkbox is not marked (or the picture has too many
  39.       colors, e.g. a 256 color GIF on a standard VGA) the closest matching PM
  40.       colors will be used.
  41.  
  42. Scale (S):
  43.       Toggle scaled display within the window and part of picture in window.
  44.       The method of scaling is one of three bitmap compression methods provided
  45.       by PM (keys 1,2 or 3). The redrawing is somewhat slow, it takes a few 
  46.       seconds to redraw a 640x480 picture on a 16 MHz AT. This is because of the 
  47.       GpiBitBlt() function. The 'N' key turns scaling off anyway. Scrolling
  48.       through the picture can be done with the cursor keys (PgUp,PgDn, Home,
  49.       End, Arrows) when scaling is off and the picture does not fit in the
  50.       window. When Save is pressed, the picture will be saved in the scaled way
  51.       when Scale is on, so you can expand or shrink pictures and save them
  52.       again.
  53.  
  54. Color (C):
  55.       Change colors (only enabled when the picture has not more colors than the 
  56.       display device driver). When the Rewrite check box is enabled, the program 
  57.       rewrites the color table to the GIF header (GIF files only).
  58.       The RGB slides can also be controlled by the enhanced keyboard 
  59.       Red: Insert/Delete, Green: Home/End, Blue: PgUp/PgDn 'grey' keys. Arrow 
  60.       up/down move to previous/next color.
  61.  
  62. Save Method (M):
  63.       Selects the DeLuxePaint .LBM or ZSoft .PCX format as save option. GIF is 
  64.       not yet implemented. (see below under WANTED.)
  65.  
  66. Update (U):
  67.       Reads the contents of the main window of VIEWGIF and writes it to a 
  68.       DeluxePaint .LBM or a ZSoft .PCX file, depending on the Save Method menu.
  69.       A Z pressed in the main window forces PCX format and sets the save format 
  70.       to it, and a D forces DeluxePaint format.
  71.       When SCALE is enabled, the picture will be saved with the same picture
  72.       size as the window, so you can save scaled pictures.
  73.       Saving will be done in four bits (16 colors) or eight bits (256 colors) 
  74.       dependant on the current PM driver.
  75.  
  76. Update Window(W):
  77.       Reads a part of the main window of VIEWGIF. Can be selected by the mouse. 
  78.       The initial size of the mouse window is 320x200.
  79.  
  80. Grab:
  81.       Grabs the entire PM session screen in a file in .PCX or .LBM format, 
  82.       dependant on the save mode. You can also select a particular area of the 
  83.       screen. Initial size = 320x200, but can be expanded. 
  84. Icons:
  85.       When Icon is selected in the Grab menu (64x64 is best , because it is 
  86.       device independent) you can create icons. The Icon Editor is a somewhat 
  87.       cumbersome tool, because you can just draw dots and little squares and
  88.       that is all. No circles, nonharizontal and nonvertical lines. With Viewgif 
  89.       a GIF or PCX or LBM picture can be shrinked to a bitmap of 32x32 or 64x64
  90.       which can be transferred to the system clipboard and then be pasted
  91.       (paste option) by the Icon Editor provided with the OS/2 Programmer's
  92.       Toolkit. Unfortunately, the colors of IconEdit cannot be changed by the
  93.       bitmap which comes from the clipboard, so the colors do not match,
  94.       because the default colormap of Iconedit does not match the system
  95.       colormap. Therefore I provide a custom icon called CUSTOM.ICO with the
  96.       default color map for 16 colors. You can use any paint program for
  97.       creating icons for PM (I use DeluxePaint) and then read the picture with
  98.       Viewgif and copy the icon into the clipboard. Then you must call iconedit
  99.       with custom.ico and then call paste (in all device formats!) and then
  100.       call Save As (not save) to your own icon file.
  101.  
  102. Custom Size:
  103.       VIEWGIF starts up in full screen mode or in 640x480 size when the PM 
  104.       driver screen size is greater. Pressing F5, F6, F7, F8 or F9 sets the 
  105.       window size to resp. 320x200, 640x400, 640x480, 800x600 and 1024x768. All 
  106.       the sizes work on any screen driver, but int the menu only the screen 
  107.       sizes smaller or equal than the device size are shown. 
  108.       With the F12 key the current window size (set with Custon size or just 
  109.       with the normal resizing of a window), the current client window size is 
  110.       set to the new bitmap size, so you can cut out parts of a bitmap and then 
  111.       magnify them with the Scale menu. When you save the file now, the new size 
  112.       will be the saved to disk too.
  113.  
  114. Saving and loading of files occurs in background, so this slow action won't 
  115. block you switching to other tasks. Only the VIEWGIF window is locked during 
  116. saving and loading.
  117.  
  118. Problems:
  119. ---------
  120.  
  121. The source code for unpacking GIFs is a converted Turbo Pascal program for 
  122. unpacking GIFs. I have optimized it somewhat after converting it to C, but it 
  123. can be faster. I am working on it. The reading and writing goes through a 
  124. separate thread, so VIEWGIF won't block the system while loading a picture and 
  125. the user can switch to another program.
  126. I still don't have appropriate code for writing GIFs, but there are many DOS 
  127. utilities for converting PCX to GIF.
  128.  
  129. Because of the awkward color translation of PM, 256 color pictures do not look
  130. very well on a 16 color PM driver.
  131.  
  132. Because of the inability to manipulate the palette registers under the 
  133. current version of PM ( GpiRealizeColorTable() is a dummy function ) this 
  134. program has an IOPL routine to manipulate the DAC registers of the VGA card 
  135. directly. Therefore, to run this program you must set in CONFIG.SYS:
  136.   iopl=yes
  137. or:
  138.   iopl=viewgif
  139.  
  140. Sometimes the entire screen grab does show an entire white bitmap, but grabbing 
  141. once more in the same way does the right thing. I did not yet solve this bug.
  142.  
  143. On EGA cards the direct palette manipulation does not work, but, still the IOPL
  144. statement must be added to CONFIG.SYS.
  145.  
  146. Big bitmaps consume much memory, a 1024x768 bitmap consumes 768 K so multiple
  147. VIEWGIF sessions can slow down overall performance due to swapping. On my PC
  148. with 4 Megs RAM (of which 768 K ramdisk and 512 K diskcache, so net 2816 K) two
  149. VIEWGIFs with 640x480 slows down considerably. Because of loading and saving
  150. performance reasons I translate all bitmaps, even with 16 colors, wo 8 bit
  151. bitmaps, but this consumes twice as much memory.
  152.  
  153. TGIF.EXE
  154. --------
  155.  
  156. The program TGIF.EXE is a changed version of a Halftone GIF viewer got from an 
  157. BBS but now in converts a GIF (only GIF) file into a black and white picture and 
  158. writes it to disk in PCX format. It is a DOS-OS/2 Family mode program.
  159.  
  160. Trademarks.
  161. ----------
  162.  
  163. DeluxePaint is a registered trademark of Electronic Arts TM.
  164. GIF (Graphic Interchange Format) is a trademark of Compuserve Inc. an H&R 
  165. Block Corporation.
  166.  
  167. WANTED:
  168. -------
  169.  
  170. Source code for WRITING to GIF files. There is enough for reading, but nothing
  171. for writing GIFs.
  172.  
  173. The format of OS/2 1.2 Icons, so I can write .ICO files directly to disk with 
  174. Viewgif.
  175.  
  176. Does someone know if DeluxePaint II exists for OS/2 ? The DOS version is very 
  177. good, but I get frustrated with the many 'Not enough memory' messages even with 
  178. 4 MB RAM on my PC.
  179.  
  180. Information about direct Color Palette changing in future versions of OS/2.
  181. This is not possible now. The way I use now is hardware dependant. I have a .DLL 
  182. with direct color palette change (VGA + Super VGA only) with source code which 
  183. you can download from this BBS (PMPAL.ZIP). Viewgif uses the same code, but it's 
  184. embedded in it.
  185.  
  186. Update record:
  187. --------------
  188. VIEWGIF v. 1.2 (20 Jan 90) OS/2 PTK 1.1:
  189.  
  190. Added ZSOft PCX format.
  191. Fixed bug in Update files, now it saved the entire window, even if it's not 
  192. shown entirely.
  193.  
  194. It has been tested on a Tandon 386/16 and Compaq 386/20e with Video 7 VRAM VGA
  195. board (with all available drivers for it) and a Paradise Plus 16 card with
  196. 800x600 PM driver.
  197.  
  198. VIEWGIF v. 1.3 (14 Feb 90) OS/2 PTK 1.1:
  199.  
  200. Loading/saving in separate thread.
  201. Also part of picture save added.
  202. Setting of custom window/bitmap size.
  203.  
  204. VIEWGIF v. 1.4 (11 Mar 90) OS/2 PTK 1.2:
  205.  
  206. Bug with window maximizing (only in OS/2 1.2) fixed.
  207. Bug with custom size of small pictures (segmentation violation) fixed.
  208. Color icon support enabled for transferring pictures to IconEdit.
  209.  
  210. VIEWGIF is made by:
  211. Klaas van Ditzhuyzen
  212. DATAD Telecom Products
  213. P.O.Box 371
  214. 3900 AJ Veenendaal Holland
  215. Tel +31 8385 33400
  216. Fax +31 8385 26386
  217.  
  218. For suggestions or bugs, refer to the above address.
  219. You can also leave a message to 
  220.  
  221. Klaas Vanditzhuyzen on the FARGO BBS
  222.  (701) 293-5973  2400 n 8 1 MNP 4.
  223. Martin Vermeer on Magnum (Gilmore) BBS
  224.  (805) 581-1275  2400 n 8 1 MNP 4.
  225.