home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 037.NAKEDEYE.TXT < prev    next >
Text File  |  1992-08-14  |  21KB  |  221 lines

  1.  
  2.  
  3.  
  4.  
  5.                 NakedEye A SuperVga GIF viewer
  6.                             
  7.                      Version 1.10
  8.                             
  9.                     Van Dao Mai
  10.                 Wollongong University
  11.                             
  12.                     June 1992
  13.                             
  14.  
  15.  
  16. 1.1 Acknowledgments
  17.  
  18. I think  it is  always the  work of  somebody else   that makes   your work  worth doing.  That is  why I  wish  to acknowledge the  good work  of  Jordan  Hargrave  (for  a SuperVGA BGI driver) and Gershon Elber (a GIFLIB library) for   their   excellent  work.  The  SVGA256  BGI  driver written by  Jordan for  the Borland compilers is truly  superb. On the other hand, the GIF library written by Gershon  is impressive  and so  easy to use. I created this software  NakedEye Version  1.10 relying  on the two software items  mentioned above  and found them extremely useful.
  19.  
  20. 1.2 What does NakedEye 1.10 offer ?
  21.  
  22. This GIF  viewer is designed to work and make the most of what a  small architecture  like that  of a PC can offer, typically 64K  memory segments  and a  maximum of 640K of conventional  memory.  To  work  within  this  restricted environment, the amount of memory the GIF viewer needs is 1K of  conventional memory  for   each opened image. This 1.5K is used mainly for the colour table, and the rest of the image  is either in EMS (Expanded Memory LIM 4.#)  or XMS memory or in a hard disk buffer. It has been tested to run well under OS/2 v2.0 DOS emulation in full screen mode.
  23.  
  24. This GIF  viewer is  a pure  SuperVGA GIF viewer, it does not understand  anything less than the resolution 640x400 (this is actually a lie, it does know 320x200, but I hate this  low   resolution).  The   BGI   (Borland   Graphics Interface)   driver by  Jordan knows 640x480, 800x600 and 1024x678 in  256 colours.  Thanks to  the  beautiful  BGI driver, we  have  256  colours  for  all  resolutions  of SuperVGA (it does not handle modes with less colours).
  25.  
  26. Supports Resolutions : 640x400, 640x480, 800x600 and 1024x678.
  27. Supports 256 colours (out of 256K colours).
  28.  
  29. Can open up to 200 GIF files (about 40-50 Mbytes) and be ready for very fast switching between them.
  30.  
  31. Only 1.2 K is needed for each GIF picture in the conventional 640K memory and the rest  is in EMS or/and hard disk.
  32.  
  33. Automatically detect the  idle  time  (when  the  user is looking at the current picture) and make  use of it to decode the next image in advance.   This  method  gives NakedEye a substantial speed advantage to many other popular GIF viewers.
  34.  
  35. Provides automatic compression  of  the  colour table  to leave some colour entries for text and windows.
  36.  
  37. Does not have any complicated installation  or configuration, thanks to the BGI driver's ability to auto-detect the hardware type and handle it  accordingly.
  38.  
  39. Is almost totally mouse-driven and needs minimal key strokes. This is done using a POP-UP menu user interface extensively.
  40.  
  41. Offers a simple music/sound association between GIF images and sound recorded in VOC format for the Sound Blaster card.
  42.  
  43. Supports an on line catalogue of GIF images with reduced (passport photo size) image and large space for comments.
  44.  
  45. Gives some limited capabilities to resize and save the images in GIF format. Provides a set of exotic features uniquely designed for the pleasure  of the  eyes.
  46.  
  47. 1.3 Using NakedEye
  48.  
  49. This GIF viewer is easy to use, all you have to do is  to make  sure  that  all  its  files  are  in  one directory. If you run OS/2 v2.0 the best way to set up NakedEye is to create an icon to fire up a full screen DOS session with the optional argument point to your favourite GIF directory. You can also associate the .GIF file extension with NakedEye for the OS/2 file manager.
  50.  
  51. The hardware  requirement for  this software to run is an IBM PC  or compatible  with a  SuperVGA video  card and a SuperVGA monitor.  The video card must have at least 512K
  52. RAM for  resolutions up  to 800x600  in 256  colours, and definitely 1Mb  RAM for  the resolution  1024x768 in  256 colours.
  53.  
  54. Here is the list of video cards supported by the SuperVGA graphics driver : Ahead, ATI, Chips & Tech, Everex, Paradise, Trident, Tseng (both 3000 and 4000 chipsets), Oak, and Video7. Experience shows that the Tseng family of cards work very well with NakedEye.
  55.  
  56. At the DOS prompt type   ne gif-files    where gif-files is a  list of  GIF files (a wild card is accepted in each item of  the list). If directories are given they will be scanned and all GIF files within them will be picked up.
  57.  
  58. All the GIF file names will be sorted  alphabetically. This first file will be displayed immediately. The rest will be loaded on demand and by the automatic loading feature which works when the CPU is idle. When Automatic loading is working, it is interrupted any time the user demands attention from the program.
  59.  
  60. 1.4.1 The Control Panel
  61.  
  62. Let's first  look at a mouse technique, the mouse is seen as a  big  + sign. To  select an area you find a suitable spot and  press the  leftmost button once, release it, go to another  spot opposite to form a rectangle, then press the same  button once again. The two points together help NakedEye to  determine the  size of  a square  area  (the smaller side  of the rectangle). This square area will be used as  the active  image area  directly affected by the current command. The mouse click should be soft and quick to avoid being interpreted twice.
  63.  
  64. All commands should explain themselves. In this version of NakedEye, some items on the ControlPanel has a sub-menu that pops up. Many commands are activated by the keyboard. Here is a list of keyboard commands. Here are some of the commands. Please use F1 to get the on-line help information with all key board commands.
  65.  
  66. E    exits to DOS (Exit).
  67. F     switches ON/OFF full-screen mode (FullScr).
  68. I     pops up a menu for image editing.
  69. N    goes to next image (Next).
  70. P     shows the Puzzle (Puzzle).
  71. R    restores the colour and redraws the image (Restore).
  72. T     toggles background/foreground colour.
  73. U     increases the magnification factor by 1.
  74. V     pops up a menu for selecting VGA modes
  75. W     writes the images out (Save).
  76. F1    shows a help window.
  77. F2    does a slide show (Show'em).
  78. F3     pops up a menu for selecting a delay in seconds  between images in a slide show.
  79. F5    activates a VOC sound player.
  80. F8    generates PostScript output for the current image.
  81. F9    does shell ESCape to DOS (SHELL).
  82. F10    toggles ON/OFF the idle time detection and automatic next-image-decoding running in     the background.
  83. ESC        stops the current command or exit back to DOS if no command is running.
  84. HOME    shows the top-left corner of the current image.
  85. LEFT     shifts the image left gradually.
  86. UP    shifts the image up gradually.
  87. DOWN    shifts the image down gradually.
  88. RIGHT    shifts the image right gradually.
  89. CTRL-S saves the gif file (Save).
  90. CTRL-I  activates the IMAGE sub-menu
  91. CTRL-F activates the FILE sub-menu.
  92. CTRL-D dumps the screen. The only portion that fits into the window is dumped out in GIF     format. This is  very similar to Save but the source is the screen. The output file is     "eye#.gif" where # is a number.
  93.  
  94. Please note  that LEFT,  DOWN, UP and RIGHT are the arrow keys. You  can control  the scrolling  of the image using these keys.  If you are in KeyBoard mouse mode (or you do
  95. not have  a mouse)  the keys  are used  for the  KeyBoard Mouse, therefore  not available  for scrolling the image. The keys  PGUP and  PGDN are still available. The command Scroll on  the Control  Panel is always available for the purpose.
  96.  
  97. You may  have noted that the magnification factor you get from the  keyboard is  not the  same as  the one  on  the control panel. The keyboard is for the whole image whilst the magnification  from the  panel is  for the  real-time magnifying glass, the convex and concave mirrors.
  98.  
  99. The current  command can  be stopped by the ESC key or at other situations,  by holding  the leftmost  mouse button down (mouse-related commands)
  100.  
  101. 1.4.2 Other weird features
  102.  
  103. There are  a couple of weird features that can be invoked from the  keyboard. When  NakedEye is  waiting  for  your command the  two keys  J and  K are  used to  change  the colour of  the mouse.  The mouse  has its colour from the colour table  of the  current GIF  image.  Sometimes  the mouse is  hard to  see and the keys can be used to change it. Initially  the colour of the mouse is set to the last colour index in the colour table.
  104.  
  105. When you  are in  the shifting mode where the whole image drifts slowly,  the current  image is drifting up/down or left/right depending  on what  arrow key  was  used.  The arrow keys  are also  used to  slow  the  speed  down  or increase it depending upon in what direction the image is drifting. Simply  do some  experiments with  them and you will see that they are intuitive enough.
  106.  
  107. You will  also notice  that the keys U and D are used for instant magnification and reduction of the current image. The way  they work  are through  duplicating pixels,  and this means  the image  will be  blown up  by 2,  3, 4 ... times   the    original   size.   NakedEye   limits   the magnification  factor   to  10,  but  it  also  offers  a magnification factor of 0.5. This causes 50  of the pixels to be skipped in both directions and effectively  reduces the  image by half each side. It is the  only way  to bring  huge images (about 1500x1500) into the  SuperVGA  screen  instantly  without  the  huge overhead of  scaling. But  as soon as you are ready to do something else,  NakedEye will  return the  image back to the original  size, then  continue to do what you command it to do.
  108.  
  109. 1.5 What else do you need to know ?
  110.  
  111. This  copy   of  the   software  is   offered  for   free (unregistered copy)  without warranty of any kind. If you are happy  with the  unregistered copy  and its  slightly restricted functionality,   you  are welcome  to use  it. However if you would like to have a fully functional copy of NakedEye you should register. More information will be given later,  especially if  you support an environmental organisation  you  are  more  than  welcomed  to  have  a registered copy for free.
  112.  
  113. NakedEye has been tested extensively, and no obvious bugs are known. There may be a minor problem with the SuperVGA graphics driver.
  114.  
  115. The BGI  driver of  Jordan crashes on some video cards if you try to select the video mode that your hardware does not support.  On some good video cards the driver will be able to  come back and complain. I cannot handle the case when it crashes. The machine will have to be rebooted. To avoid this  situation, you  can explicitly  tell NakedEye about the  video modes  that your  video card  can handle (look at the file NakedEye.cfg).
  116.  
  117. The variable resol in the file NakedEye.cfg can be set to the correct video modes. NakedEye does  not handle interlaced GIF files. This is a limitation due  to a  trade-off  in  the  design  of  the software to  conserve core  memory.  NakedEye  uses  very little memory  for each  GIF file, and this  makes it too hard for  decoding interlaced  GIF files.  You  have to convert interlaced  GIF files into normal GIF files using some utility in the public domain.
  118.  
  119. There are  a couple  of command line options that you can use to invoke NakedEye into a correct video resolution or avoid the automatic compression of the colour table. Here is the full DOS style synopsis :
  120.  
  121.  
  122. NE [-mRES] [-c] [-q] [-s] [-dSECS] [-ns] [-h] gif-files
  123.  
  124. Or
  125.  
  126. NE gif-files [/mRE] [/c] [/q] [/s] [/dSECS] [/ns] [-h]
  127.  
  128.  
  129. Gif-files is a list of GIF files or names with wild card or even directory names. The scanning process can take some time if you give NakedEye too many places to search for GIF files.
  130.  
  131. Option -m is used to set the start-up resolution for the video card where RES is one of 320x200, 640x400, 640x480, 800x600 and 1024x768. To save you from typing such a long string, NakedEye also understands -0, -1, -2, -3 and -4 respectively.
  132.  
  133. To start  NakedEye up in 800x600, simply type  ne -3 *.gif, for instance.
  134.  
  135. Option -c tells NakedEye not to compress the colour table for each  image. This  is useful  if you  do not  want to alter the  images fearing some problem later when you may like to  save them  into new GIF files.  I have not found any problems  with  compressing  the  colour  table.  The
  136. compression tends  to leave  a few  empty colour  entries behind to  be used  as colours  for the Control Panel and text.
  137.  
  138. Option -q  is for  quick display  of  a  GIF  file.  When NakedEye sees  this flag it will display the GIF file (or the first  of many)  straight away. The displaying of the LOGO is skipped (registered copy only).
  139.  
  140. Option -s  is for  starting up a slide show. A slide show can be started up by option -q then the F2 key, but there will be users who want to save one extra key stroke.
  141.  
  142. Option -d  is used  to set  up a delay time value between each picture  in a  slide show  of the GIF pictures where SECS is  the amount  of time  in seconds.  To get a slide show going, the typical method is to run  NakedEye with a wild card to match all the desired GIF files and option -s for a quick start up straight into a slide show. 
  143.  
  144.       NE -s -d5 *.gif
  145.  
  146. The above  command will  start NakedEye  and set it ready for you to have a slide show with 5 seconds delay between each image.  I assume  that you  have all the desired GIF files in  the current  directory. Of course, at first the show will  be much  slower than  5 seconds  between  each image because  a lot  of time  is needed to load (decode) the images into memory (and/or hard disk cache). Once all the GIF  files have  been decoded,  the speed can be very fast depending on how much memory your machine has.
  147.  
  148. Option -ns  stops NakedEye  from sorting  the list of GIF files given  to it.  This may be what you desired so that you can  manually arrange  the images  into a  particular order.
  149.  
  150. Perhaps you would have noticed that the DOS convention of option using  the /  character  is  also  supported.  The options can  be placed  anywhere on the command line even between the  list of  GIF files.  NakedEye  automatically discards all  non-GIF formatted  files if  you use a wild card. The  wild card  "*" means  everything that  can  be read. This is in fact the one I use myself all the time.
  151.  
  152. There is  also a  configuration file  called NakedEye.cfg for you  to set  the default  start up  for your  PC. The sample file  is self-explanatory  with a  lot of comments inside. Simply  follow the  comments and set it right for your system. The most probable item that you would set is
  153. the default  start-up resolution.  This should  be set to the best  resolution you  have in  your hardware.  If you worry about  speed, also  set the swap buffer file's path to your  fastest hard  drive. In  case you  do not have a memory manager  LIM 4.#  installed, but  you have a large
  154. ram disk installed,  then go for it! - set the path of the swap file  to this ram disk to make swapping a lot faster. Please read the section  Configuring NakedEye if you plan to tune NakedEye to your taste.
  155.  
  156. If NakedEye  crashes due  to some  system exception trap, the EMS  memory may  not be  freed, and  this  means  the machine  has  to  be  rebooted  to  get  the  EMS  memory functional again.  This is  inevitable for  this kind  of situation. To reduce the chance that this happens, please
  157. do not  use Ctrl-C  or Ctrl-Break  to break  the  program unless you  are desperate  to do  so, and  also do not to switch to  the video  modes  that  your  hardware  cannot handle. In  any  problematic case hit the ESC key and wait for NakedEye  to complete  what it  is  doing  and  exits cleanly.
  158.  
  159. In case  of crashes  you should  look for  a file  called buffer#.tmp in  your disk  and delete  it as  that is the swap file used for buffering the decoded GIF images. The software is designed to handle up to 50 Mbytes of GIF files in a session, therefore the swap buffer file can be
  160. very large.
  161.  
  162. If you  use commands  that will  alter the actual size of the image  NakedEye will  have to performed a lot of disk I/O because  it is  designed to  conserve memory. It will create temporary files for swapping. These files all have the  .tmp  extensions to make it easy for you to identified and delete  them if the system crashes. It is a good idea to set  the variable  bufpath in  nakedeye.cfg  to  the fastest hard  disk you  have, and  make  it  point  to  a directory that  is used  mainly for  temporary files that can be  removed any  time. For example, if you have drive C: as the fastest drive (and/or it has a lot of free disk space), the  bufpath should  be set  to c:\tmp.  Then you create c:\tmp  to accommodate all the temporary files. If you have a large RAM disk, please go for it.
  163.  
  164. 1.6 Configuring NakedEye
  165.  
  166. NakedEye will run fine in most situations with a decent hardware set-up.  However, you  can get  the most  out of NakedEye by doing some tuning to fit it in perfectly with your system.   You  can set the variables in NakedEye.cfg to alter the behaviour of NakedEye.
  167.  
  168. svga  is  a variable  to be  set to  the full path name to your preferred SuperVga BGI driver. Some video cards have their own  BGI driver,  therefore  if  the  standard  BGI driver which  comes with  NakedEye  does  not  work,  you should set this to the one that works.
  169.  
  170. Here is an example
  171.  
  172. svga=c:\mydriver.bgi
  173.  
  174. You  have  to  be  careful  if  you  choose  a  different BGIdriver for  NakedEye. The  mapping of  the video  mode numbers and  the actual  resolution  in  the  Svga256.bgi driver is as follows:
  175.  
  176.    Mode 0  to  320x200
  177.    Mode 1  to  640x400
  178.    Mode 2  to  640x480
  179.    Mode 3  to  800x600
  180.    Mode 4  to  1024x768
  181.  
  182. If the  mapping of your SuperVGA driver is different then some commands may switch NakedEye to a wrong resolution.
  183.  
  184. bufpath is the directory path name to where the temporary buffer file  for NakedEye  to swap  decoded raster images out when  memory is low. It should be set to your fastest and/or largest hard disk.
  185.  
  186. Here is an example
  187.  
  188. bufpath=c:\tmp
  189.  
  190. NakedEye uses the hard disk very often for swapping therefore it  creates a  number of  temporary files  that will be  removed when  no longer  needed.  However,  your system crashes  when NakedEye is running, these files may have to  be removed  manually if your are short of space. That is  why it  is a  good idea  to  set  bufpath  to  a directory which  is used mainly for temporary stuffs that can be removed at any time.
  191.  
  192. ems   is  a  yes/no  flag  to  indicate  whether  you  want NakedEye to use EMS memory. The default is yes as this is what most people want.
  193.  
  194. greeting  is  a yes/no  flag to  indicate that whether you want to  have the  LOGO display  when NakedEye starts up. You may want to disable it when you have got a registered copy of  the software  and do not want to wait 30 seconds for the LOGO to disappear.
  195.  
  196. compress  is  a yes/no  flag that  indicates  whether  you would like  NakedEye to  compress the  color  table.  The default is  yes because  this is  what  almost  everybody wants.
  197.  
  198. quick start  is  a yes/no  flag that  indicates  whether a quick start-up  is what  you want.  This is  identical to option  /q  on the  command line. If it is set to yes, the LOGO and file selection menus are skipped altogether. But the only  difference is  that NakedEye will start up with the Full Screen  mode OFF  instead of ON  NakedEye has been designed  to   be   simple.   This  configuration   step unfortunately  makes   it  look  a  little  bit  complex. However, it  is hoped  that you  will not have to do much configuration at  all and  still get what you want out of
  199. NakedEye.
  200.  
  201. 1.7 Some conditions
  202.  
  203. Personal use  here is granted for an unregistered copy of NakedEye,  however an  unregistered copy  is  not  fully activated, and you definitely miss out some of the exotic features. I  will be very happy to give a registered copy of this  software out  to anyone  who makes  a reasonable
  204. donation to  support an  environmental  organisation  for instance GreenPeace.   Simply  send me a proof of such an effort and the money covering postage and diskettes.
  205.  
  206. For others  who wish  to have  a fully functional copy of NakedEye, please send a registration form to me. You will receive the  latest copy  of NakedEye. The alternative is to donate  the money to an environmental  organisation, then send  me the money to cover for postage and diskettes.
  207.  
  208. If you are on the Internet, I can e-mailed the key to you after receiving the registration form.
  209.  
  210. I also  disclaim any  responsibility in case the software causes any  damage to  your computer.  It has been tested fully and  no bug  is currently  known, apart  from  some possible problems  with the SuperVga graphics driver when an unpopular video card is used.
  211.  
  212. I hope  that everybody  will enjoy  NakedEye, please send all comments  to my e-mail address  v.mai@uow.edu.au  or  mail me at
  213.  
  214.  
  215.    Mr. Van Dao MAI
  216.    50/7 Corrimal st.
  217.    Wollongong N.S.W 2500
  218.    Australia
  219.  
  220. Any  suggestion   for  improvement   would   be   greatly appreciated.
  221.