home *** CD-ROM | disk | FTP | other *** search
/ Der Mediaplex Sampler - Die 6 von Plex / 6_v_plex.zip / 6_v_plex / DISK2 / MULTI_04 / GRAYPCX.ZIP / GRAYPCX.TXT < prev    next >
Text File  |  1990-03-28  |  6KB  |  122 lines

  1.   GRAYPCX- a program to convert monochrome PCX files, as produced by hand
  2. scanners, to gray-level PCX files.  The result will be 1/6 the size
  3. horizontally & vertically, and will be well suited for VGA viewing.
  4.   This program also will convert any file in the 256 color PCX format to
  5. gray-level.
  6.  
  7.   GRAYSET- a program to evaluate monochrome PCX files, to determine
  8. resulting gray levels.  It also will suggest settings for the controls in
  9. GRAYPCX, and write a file for GRAYPCX's automatic use of them.
  10.  
  11.  
  12.   Quick start instructions:
  13.  
  14.   Save your scan in the PCX format, run GRAYSET from the command line:
  15.  
  16.   GRAYSET (scan file name) 1
  17.  
  18.   Then run GRAYPCX with the command line:
  19.  
  20.   GRAYPCX (scan file name) (gray file name) 1
  21.  
  22.   This configuration will use GRAYSET's calculate values.  To see the
  23. conversion with them not adjusted, change the "1" at the end of the command
  24. line starting GRAYPCX to "0".
  25.  
  26.  
  27.   Program options:
  28.  
  29.   GRAYSET- If you have scanned a large image in several files that are to
  30. be pasted together, it is important that the same settings be used for all,
  31. and also the lightest and darkest areas be included in GRAYSET's
  32. calculations.  Start the program with a "1" switch for the initial file,
  33. then rerun using "2" for the remaining files.  Please note that GRAYPCX
  34. will use the settings from the last running of GRAYSET.
  35.  
  36.   GRAYPCX- In addition to the two command line switches, starting the
  37. program with the command line without the "0" or "1" will allow other
  38. options, including the gray-level converting of color files, and setting
  39. the contrast, brightness and gamma separately, as well as different numbers
  40. of grays for the conversion.  In this variation, conversion of the scans is
  41. a two pass operation- mono scan to 37 gray PCX (in the 256 color format),
  42. then color conversion to 16, 32 or 64 grays.  Please note that standard VGA
  43. cards can view much larger 16 gray conversions than 64 or 32 grays, as the
  44. later must be viewed in the 256 color modes.
  45.  
  46.  
  47.   Now, after boring you with all that technical detail, some words on why,
  48. and what it all means.
  49.   After seeing many scans converted to GIFs, I could see two basic problems
  50. with many of them.  One is conversions that have the appalling, spotty look
  51. produced by other than 1/6 size reduction, and the other is the conversion
  52. program produce 37 grays, but IBM hardware doesn't do 37 grays, it does the
  53. closest match to 64 or 16 grays.  If you want to read some details why only
  54. 1/6 size is (mostly) correct, read the text in SCANGF.ARC which can be
  55. found in DL-6, Graphic Support forum, CIS.
  56.   After the initial version of this program,  Jim Beebe egged me into
  57. including the dreaded "gamma" factor.  The problem with gamma is unless the
  58. scans are contrasty, that is, include what will become all 37 grays, some
  59. adjustments have to be done.  And with three adjustment, the opportunity
  60. exists to really mess things up, so I decided to do a automatic adjustment
  61. program, GRAYSET.  As it was all Jim's fault anyway, I used the "look and
  62. feel" of his HISTOGIF for the little graph the program displays.  You may
  63. find this of value in adjusting your scanner.
  64.  
  65.   What the optional adjustments do:
  66.   Gamma:  The gamma factor is a attempt to balance the actual increase in
  67. screen illumination from the various VGA settings, to correspond to the
  68. monochrome increase.  A value of 2.0 is theoretically correct, according to
  69. Jim BeeBe, but the effect seems excessive at this level, especially if
  70. there are few dark areas in the scan.  I suggest trying a value of about
  71. 1.3 or 1.5 here, and also using a higher contrast factor (in the second
  72. step).
  73.   Brightness:  This adjustment will allows all grays in the scan to be
  74. moved an equal amount darker or lighter.
  75.   Contrast:  Many of the scans of color pictures, or conversions from color
  76. PCX files (color in this case meaning not B&W) seem to lack contrast.  In a
  77. gray level conversion, the best results will often be if the lightest
  78. colors convert to 100% white, the darkest to 100% black, but this is often
  79. not the case.  The contrast factor allows you to adjust this, by sort of
  80. "spreading" the luminance levels.  I suggest you try conversions with
  81. several setting on this to see what it does.
  82.  
  83.   256 Color PCX conversion:  If the program finds one of these as your
  84. input file, it will ask two questions, output type and contrast factor.  A
  85. conversion to 64 will result in better viewing, in most cases, on SVGA
  86. machines, and  32 or 16 colors will produce a graphic that can be better
  87. viewed on other machines, in particular, 256K VGA cards, which don't have
  88. the bigger 256 color modes, and Amigas, which only have 16 grays in their
  89. palette.
  90.  
  91.   Interlaced 32/16 gray output:  This experimental conversion is an attempt
  92. to produce a version that lets you have your cake and eat it too, viewing
  93. well in a 16 color mode, but better in a 32 or 256 color one.  This
  94. conversion places every other gray of a 32 gray conversion in the first 16
  95. colors, the remainder in the second set of 16.  It seems to work with
  96. PICEM, after the file is converted to a 32 color GIF.
  97.  
  98.   In all four color reduction options, the reduction is done with a
  99. distributed error dither thru a Sierra filter.  Any yes, you can get more
  100. than 37 grays from the 37 gray starting file, one test run produced 57
  101. actually used.  The reason for this is that the VGA doesn't have grays that
  102. exactly match the ones produced by the 37 gray conversion, so the dither
  103. will alternate between the best match it can find.  Remember, in no case
  104. can VGA equipment ever display more than 64 levels of gray (or any pure
  105. color, for that matter).
  106.  
  107.   Some words about GIF conversion: If you intend to convert the PCX files
  108. produced by this program into gray level GIF files, I recommend running the
  109. GIF thru a utility like CLIP, and using it to produce a standard size (like
  110. 640 x 480) file, correctly incoded with either 37 (the file will actually
  111. be 64), 64, 32 or 16 colors.  Note that the conversions produced by this
  112. program will be in 37, 64, 32 or 16 colors _USED_, but will be in the 256
  113. color PCX format, and most conversions will make a 256 color GIF from them.
  114.  
  115.  
  116.  
  117.   Jim Burton, CIS 73210,3557
  118.  
  119.   Copyright (c) James A. Burton, 1990.  I intend these programs to be
  120. free-ware, but I require they be distributed as a package of: this text
  121. file, GrayPCX and GraySET.  Source code available on request.
  122.