home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / utilities / utilss / sprtools / docs / spr_fsi < prev    next >
Text File  |  1995-03-10  |  13KB  |  327 lines

  1. spr_fsi
  2. =======
  3.  
  4. Version 1.10 (20-Apr-1994)
  5. SPRtools block 1c release.
  6. (C) 1993-4 DEEJ Technology PLC
  7.  
  8. Features
  9. --------
  10. Sprite processing tools, features provided;
  11.  
  12.         Increase / Decrease bits per pixel (number of colours),
  13.         Floyd Steinburg Integer dithering,
  14.         Image scaling with true sub-sampling (anti-aliasing) and interpolation,
  15.         Dynamic intensity range expansion,
  16.         Gamma correction,
  17.         Image inversion,
  18.         Filters including smoothing, sharpening, noise removal & user defined
  19.         Support for common fixed palettes,
  20.         Palette optimisation,
  21.  
  22. Restrictions
  23. ------------
  24. Enough memory must be available to hold the source image and two lines of
  25. the destination image. Further memory is required by certain operations
  26. such as filtering. Palette optimisation can require a large amount of memory
  27. for images with thousands of colours.
  28.  
  29. Only the first sprite in the file is recognised.
  30.  
  31. Syntax
  32. ------
  33. spr_fsi [-bpp <bpp>]
  34.     [-scale <scale>]
  35.     [-palette <palette>]
  36.     [-invert]    
  37.     [-expand]
  38.     [-gamma <gamma>]
  39.     [-filter <filter>]
  40.     [-aspect]
  41.     [-nodither]
  42.     [-nointerp]
  43.     [-quiet]
  44.     [-help]
  45.     [-in <input sprite file>]
  46.     [-out <output sprite file>]
  47.     [-err <progress/error file>]
  48.  
  49. Options may be abrieviated to the minimum unique form.
  50. All options and parameters are case specific.
  51.  
  52. Files default to stdin and stdout with progress or errors to stderr.
  53.  
  54. -bpp <bpp>
  55. <bpp>    = {1 | 2 | 4 | 8 | 15 | 24 }
  56.  
  57.         Bits per pixels in the output image. The default is 24.
  58.         The 24 bpp option produces the standard 24/32 bit deep sprite
  59.         format, a (non-standard) true 24 format is also available,
  60.         which is described later.
  61.  
  62. -scale <scale>
  63. <scale> = {<xsize> ,<Ysize> |
  64.        <XYmul>:<XYdiv> | 
  65.        <Xmul>:<Xdiv>,<Ymul>:<Ydiv> }
  66.  
  67.         The amount the scale the output image can be specified in
  68.         three ways.
  69.  
  70.         <Xsize>,<Ysize> scales to an absolute size
  71.         e.g. -scale 1280,1024 for a sprite 1280x1024 pixels
  72.  
  73.         <XYmul>:<XYdiv> scales both axis by the same ratio
  74.         e.g. -scale 3:2 to expand by 3/2 (1.5)
  75.  
  76.         <Xmul>:<Xdiv>,<Ymul>:<Ydiv> scales each axis separately
  77.         e.g. -scale 3:2,1:2 to expand horizontally by 3/2
  78.                                 and reduce vertically by 1/2
  79.  
  80.         Scales which would produce a very small output sprite, or
  81.         equate to an expansion of more than 128x in any direction are 
  82.         prevented. The scale defaults to 1:1 in each direction, unless
  83.         the input image has rectangular pixels and the -aspect flag is
  84.         not set, in this case a scale of 1:1,2:1 is used to covert the
  85.         sprite to use square pixels.
  86.  
  87. -palette <palette>
  88. <palette> = {rgb | grey | desktop | win3 | fix | opt }
  89.  
  90.         Selects the palette type for output sprites with 1-8 bpp.
  91.         The palette defaults to the same as the input sprite.
  92.         If the input sprite does not have a palette, the default for
  93.         a RISC OS mode with the same bpp is used. Certain palette
  94.         types may only be used for some numbers of bits per pixel in
  95.         the output sprite.
  96.  
  97.         The ‘rgb’ palette can be used with bpp 4 and 8. In 4 bpp the
  98.         palette gives 9 grey levels, 6 fully saturated colours and
  99.         orange, in a layout designed to be desktop friendly. In 8 bpp
  100.         the palette gives 46 grey levels plus a 6x6x6 level RGB colour
  101.         cube (combinations of 6 levels for each component).
  102.  
  103.         The ‘grey’ palette gives linear grey scales for bpp 1-8,
  104.         giving 2 to 256 grey levels.
  105.         
  106.         The ‘desktop’ palette gives the standard 16 colour RISC OS
  107.         desktop palette in 4 bpp, and the standard VIDC1 256 colour
  108.         mode palette in 8 bpp. 
  109.  
  110.         The ‘win3’ palette gives a Windows 3 palette in 4 bpp,
  111.         consisting of 4 grey levels, 6 fully saturated colours and 
  112.         6 half brightness colours. In 8 bpp a custom (non-Windows) 
  113.         palette with 176 grey levels, a 4x4x4 level colour cube plus 
  114.         18 RGYBMC shades is used.
  115.  
  116.         The ‘fix’ palette will use the input sprites palette (or the
  117.         default) but will convert old type 12 bit palettes stored in
  118.         the sprite to full 24 bit. e.g. &B0G0R0xx to &BBGGRRxx
  119.  
  120.         The ‘opt’ palette will examine the input sprite after all
  121.         pre-processing operations have been performed, and will choose
  122.         the best combination of colours to use in the output image.
  123.         More details on this process are given below. This option
  124.         can only be used for output sprites of 4 or 8 bpp.
  125.  
  126. -invert        Invert the source image before processing.
  127.  
  128. -expand        Expand the dynamic range the source image before processing.
  129.         Expand works by finding the lowest and highest intensity pixels
  130.         in the image, the colours of all pixels in the image are then
  131.         adjusted so that the intensities range from zero to maximum.
  132.  
  133. -gamma <gamma>
  134. <gamma>    = positive floating point number
  135.  
  136.         Gamma correction can be performed on the source image before
  137.         processing. The default value is 1.0 which has no effect.
  138.         Values >1.0 (2.2 is the recognised standard) are used to move
  139.         the contrast detail in the image to the brighter part of the
  140.         intensity range. This use useful for correcting scanned images
  141.         and for preparing sprites for printing. Values less than 1.0
  142.         can be used to move detail to darker intensities.
  143.  
  144. -filter <filter>
  145. <filter> = {filter> | <user filter> }
  146.  
  147.         Filters can be used to perform a variety of image processing
  148.         on the image before further processing. See later for a
  149.         description of how filtering works.
  150.  
  151. <standard filter> = filter name:-
  152.         sharpen1 - Sharpen week
  153.         sharpen2 - Sharpen medium
  154.         sharpen3 - Sharpen strong
  155.         smooth1  - Smooth week
  156.         smooth2  - Smooth medium
  157.         smooth3  - Smooth strong
  158.         average  - Averages with surrounding pixels
  159.         noise1   - Noise removal week
  160.         noise2   - Noise removal medium
  161.         noise3   - Noise removal strong
  162.         edge     - Horizontal and vertical edge extraction
  163.         edgeV    - Vertical edge extraction
  164.         edgeH    - Horizontal edge extraction
  165.         edgeNW   - Edge extraction along a 45 degree angle
  166.         edgeNE   - Edge extraction along a 45 degree angle
  167.         edgeSW   - Edge extraction along a 45 degree angle
  168.         edgeSE   - Edge extraction along a 45 degree angle
  169.         emboss1  - 3D embossing effect
  170.         emboss2  - 3D embossing effect, inverted
  171.  
  172. <user filter> = <a>,<b>,<c>,<d>,<e>,<f>,<g>,<h>,[<mul>,[<div>,[<add>,[<diff>]]]]
  173.         Where <a> to <h> are the rows and columns of the 3x3 filter
  174.         matrix. <mul> and <div> are the summation scaling factors which
  175.         default to 1. <add> is an optional component to be added after
  176.         scaling. <diff> is the optional noise filtering level.
  177.         All numbers are positive or negative integers except <div> and
  178.         <diff> which must be positive.
  179.         
  180. -aspect        Normally all sprites containing rectangular pixels are 
  181. converted
  182.         to square pixels during processing (doubling the Y resolution),
  183.         if the -aspect flag is given a rectangular pixel input sprite
  184.         will give a rectangular pixel output sprite.
  185.  
  186. -nodither    This option can be used to prevent Floyd Steinburg Integer
  187.         dithering from being used during processing. This will speed
  188.         up processing but will result in a poor quality output. It
  189.         has no effect when the output sprite is 24 bpp.
  190.  
  191. -nointerp    This option prevents pixel area summing or interpolation being
  192.         used when scaling the image (see the section below on scaling).
  193.         This will speed up the scaling of images, but with a reduction
  194.         in quality. It can be used when scaling up an image to prevent
  195.         the loss of sharpness caused by interpolation.
  196.  
  197. -quiet        Prevents the printing of the state of options on stderr during
  198.         processing.  Progress and errors are still output.
  199.  
  200. -help        Prints a syntax summary.
  201.  
  202.  
  203. Info
  204. ----
  205. True 24 bit sprite format:
  206.         spr_fsi normally produces standard RISC OS deep sprite 24/32
  207.         bpp format when using -bpp 24, this format is 25% larger than
  208.         other 24 bit formats and does not compress as well.
  209.  
  210.         By using ‘-bpp 8 -palette rgb’ a non standard true 24 bit deep
  211.         sprite can be produced. It will not be understood by RISC OS
  212.         applications, but can be used as a storage format for sprites
  213.         to be used again with spr_fsi.
  214.  
  215.         The format has a sprite mode specifier of type 8 (currently
  216.         unassigned in RISC OS 3.5) and stores pixels as consecutive
  217.         three byte quantities (blue, green and red bytes) padded to
  218.         the next word boundary at the end of each line.
  219.  
  220. Scaling        spr_fsi uses two techniques to improve the scaling of image