home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 564a.lha / wasp_v1.21 / misc / PARAMETERS < prev    next >
Text File  |  1991-07-17  |  4KB  |  91 lines

  1. explanation of the parameter options:
  2.  
  3. -hamcountmeth, -nonhamcountmeth:
  4.  
  5. possible values:
  6. #define COUNTMETH_ALL_1         0
  7. #define COUNTMETH_ALL_DIF       1
  8. #define COUNTMETH_ALL_FIXDIF    2
  9. #define COUNTMETH_JUMP_1        3 
  10. #define COUNTMETH_JUMP_21       4 
  11. #define COUNTMETH_JUMP_421      5
  12. #define COUNTMETH_JUMP_8421     6
  13. #define COUNTMETH_JUMP_DIF      7
  14. #define COUNTMETH_JUMP_DIFSH    8
  15. #define COUNTMETH_JUMP_FIXDIF   9
  16. #define COUNTMETH_JUMP_FIXDIFSH 10
  17.  
  18. defaults:
  19. #define DEF_HAMCOUNTMETH        COUNTMETH_ALL_FIXDIF
  20. #define DEF_NONHAMCOUNTMETH     COUNTMETH_ALL_1
  21.  
  22. COUNTMETH_ALLs count all pixels, COUNTMETH_JUMPs count only pixels
  23. whose color differs from the color of the previous pixel in at least two
  24. of the components red, green and blue.
  25. COUNTMETH_.._1s count all pixels as 1, COUNTMETH_.._DIFs and 
  26. COUNTMETH_.._FIXDIFs take the absolute difference of the color of the current
  27. pixel and the color of the previous pixel, in the red, green and blue components,
  28. eg. greendif=abs((curcolor&0x0f0)-(prevcolor&0x0f0)),
  29. COUNTMETH_.._DIFs count as greendif+reddif+bluedif, COUNTMETH_.._FIXDIFs count as
  30. the sum of the least two of greendif, reddif and bluedif.
  31. COUNTMETH_JUMP_21, 421, 8421, DIFSH and FIXDIFSH all use shifting, for example
  32. COUNTMETH_JUMP_421 counts the pixel where the jump occurs as 4, the next one as 2,
  33. the next one as 1, even when no further jump occurs. If two jumps occur right behind
  34. each other, the shift value is reset, so the first jump would count as 4, the second
  35. jump as 4 too, and the next two pixels as 2 and 1.
  36. DIFSH and FIXDIFSH count the first jump pixel in the same way as their non-shifting
  37. pals DIF and FIXDIF do, then dividing this value by two (shifting it a pixel) for each
  38. successive pixel, until the shift value becomes 0.
  39.  
  40. -threshold:
  41.  
  42. possible values: 0 .. MAX_UNSIGNED_LONG
  43. default: 1
  44.  
  45. Only colors which occur at least threshold times are used by the color distribution,
  46. except when doing so would cause a number of color registers to be unused, in that
  47. case wasp will try to find the lowest possible threshold resulting in at least 16
  48. different colors, in ham or hires mode, or at least 32 different colors, in lores
  49. mode.
  50.  
  51. -distrmeth:
  52.  
  53. possible values:
  54. #define DISTRMETH_MOSTUSED    0
  55. #define DISTRMETH_WORSTFIRST  1
  56. #define DISTRMETH_EHB         2
  57. #define DISTRMETH_HAMSHARP    3
  58. #define DISTRMETH_CONTRACTION 4
  59.  
  60. default:
  61. #define DEF_DISTRMETH         DISTRMETH_WORSTFIRST
  62.  
  63. When the number of different colors is larger than the number of color registers
  64. available, colors will have to be distributed between the color registers.
  65. DISTRMETH_MOSTUSED fills the nregs color registers with the nregs colors which
  66. occur most.
  67. DISTRMETH_WORSTFIRST assigns the two first color registers to the
  68. two colors with the largest (manhattan) distance between them, the next color
  69. register is filled with the color with the largest distance to any of the used
  70. color registers, this process is repeated until all color registers are filled.
  71. Then it goes on to group all colors according to closest color register,
  72. the weighted average of all colors belonging to a certain color register forms the 
  73. new contents of the color register.
  74. DISTRMETH_EHB is a modification of DISTRMETH_WORSTFIRST, to be used for conversion
  75. to EHB only, and the only distribution method that can be used to convert to EHB.
  76. Basically it does the same as DISTRMETH_WORSTFIRST, but when it has found a color
  77. that has the largest distance to any of the used color registers at that moment it
  78. fills one color register with this color, and another color register with the same
  79. color with the red, green and blue values each shifted one bit to the right, or with
  80. the red, green and blue values each shifted one bit to the left. In this way the color
  81. registers are filled in pairs.
  82. DISTRMETH_HAMSHARP computes x, the number of different colors used in the picture
  83. divided by the number of color registers, then fills the first color register with
  84. the color which has the smallest total difference to x used colors, including itself.
  85. It then marks these x colors as done and repeats the process until all color registers
  86. have been filled. It recomputes the color registers by grouping and averaging in 
  87. exactly the same way DISTRMETH_WORSTFIRST does.
  88. DISTRMETH_CONTRACTION repeatedly contracts the two colors closest to each other to
  89. a new color, by weighted averaging the two colors, until the number of remaining colors
  90. equals the number of color registers.
  91.