gx v5.91 (Salida) 2008.6.13 by Frank Barchard,EAC
USAGE: gx -options imagein [=imageout]

VERSION: PC v5.91 (Salida) 2008.6.13, Spit v4.00
SUMMARY: GX graphics file format conversion tool
         SPIT environment variable is GX_OPTS

    @file          response file, containing a list of options and files
    =file          specify a output file ie source=dest
                   %%d in <dest> uses frame index.  %s uses framename
    -b0            disable banner
    -v<n>          verbose level (aka -verbosity)
                   0 no console output
                   1 less output
                   2 normal output (default)
                   3 more (-v)
                   4..6 diagnostics
    -info<n>       show frame information (before processing)
                   -1 use -v verbose level (default)
                   0 turn off info option
                   1 terse one line information
                   2 one line information per frame (normal)
                   3 detailed information per frame
                   4 full frame information (diagnostic)
    -w0            dont output file
    -r             recurse subdirectories to find files
    -r%ENV%        traverse environment variable ENV to find files
    -openas<str>   open as specified file format
    -reset         set to default options
    -4             convert to 4 bit indexed
    -8             convert to 8 bit indexed
    -15            convert to 555 rgb
    -16            convert to 565 rgb
    -24            convert to 24 rgb
    -32            convert to 32 rgb
    -5a3           convert to 5a3 argb
    -pscolred<n>   use photoshop to colour reduce from 8..32 bpp
                   requires photoshop7
    -yuy2          convert to YUY2
    -a8            convert to alpha8 if supported
    -bpp<n>        convert to n bits per pixel
    -n<n>          convert to n colours (2..256)
    -pack          pack output (default)
    -pack0         dont pack output (aka -unpack)
    -pack1         RLE pack (for most formats).  (default)
    -pack2         refpack (for shape files only)
    -pack3         texture compression (for shape files only)
    -pack4         iframe texture pack (for shape files only)
    -pack-1        auto select based on source
    -pack('CODE')  fourcc code for AVI
          'VP60'    VP6 codec
          'CVID'    Cinepak 8,16,32
          'IV50'    Indeo 24
          'MSVC'    MS Video 1 8,16
          'MP42'    MPeg 8,24,32
          'MRLE'    MS RLE 8  -> this codec only supports 8bpp.
          'MJPG'    Motion JPeg 24 -> www.jpg.com
          'MJ2C'    Motion JPeg2000
    -dxt           dxt compress. shortcut for -pack3
          -dxt0     disable dxt compression. shortcut for -pack0
          -dxt1     dxt1 opaque+transparent only. shortcut for -pack3 -25
          -dxt3     dxt3 includes 4 bit alpha. shortcut for -pack3 -28
          -dxt5     dxt5 bit interpolated alpha. shortcut for -pack3 -27
                    see also: fdxt,gst
    -fdxt          fast dxt compress. shortcut for -pack4
          -fdxt0    disable dxt compression. shortcut for -pack0
          -fdxt1    dxt1 opaque+transparent only. shortcut for -pack4 -25
          -fdxt3    dxt3 includes 4 bit alpha. shortcut for -pack4 -28
          -fdxt5    dxt5 bit interpolated alpha. shortcut for -pack4 -27
    -gst<bw>,<db>  PS2 GS texture compression, can be used with fsh and ssh.
                   <bw> - blockwidth when compressing. Accepted: 1,2,4,8
                   <db> - detailbpp number of bits in the detail texture
                          can be 1 or 2 bits
                                                       
                                       GST DESCRIPTION 
                                      -----------------
                   GST is a texture compression scheme for encoding textures
                   using anywhere from 1.5 to 4 bits per pixel (not including
                   the palette), depending on the compression options used.
                   Very little processing power is required to decompress a GST
                   texture back into a palletized texture. In fact, on some
                   consoles, this operation can be done mostly in hardware. A
                   GST texture decompresses to an 8 bit texture from a base 
                   and detail component. The base texture is a small version
                   of the original image whose dimensions depend on the block
                   width chosen. For example, in the case of 4x2x2 the base
                   texture will be width/4 x height/2. The detail texture is a
                   one or two bit texture that modifies the index of the base
                   texture. GST can achieve near 8 bit quality at roughly
                   3 bits per pixel (422), a 70% decrease in size.
                                                     
                                         USAGE NOTES 
                                        -------------
                   o  while GST is available in other shape file formats
                      it is primarily intended for use with SSH.
                   o  GST should always be used in conjunction with -swizzle
                      when working with SSH, but only supports SSH swizzleing
                   o  GST should only be used with mipmont, using GST with
                      mipmap will result in non compressed.
                      non collapsed mipmaps.
                   o  GST textures must always be a multiple of 32x16
                                                       
                                        GST BIT DEPTHS 
                                       ----------------
                   The following table shows some combinations of encoding
                   values and the resulting storage requirements for various
                   texture sizes:
                       See the T&L document on GST for more information.
                       (assumes a 1024 byte clut)
                   blockwidth blockheight detailbpp total bpp  256x256 512x512
                   ---------- ----------- --------- ---------  ------- -------
                   2          2           2         4          33 KB   129 KB
                   2          2           1         3          25 KB   97  KB
                   4          2           2         3          25 KB   97  KB
                   4          4           2         2.5        21 KB   81  KB
                   4          2           1         2          17 KB   65  KB
                   4          4           1         1.5        13 KB   49  KB
    -filterdxt<n>       run image through dxt filter (n=1..5 dxt filter type
                                        n=-1 choose based on alpha depth)
    -grb<n>        8 bit grrrrbbb palettizer (n=1 horiz,2=vert,3=both)
    -hflip         horizontally flip image
    -vflip         vertically flip image
    -sort          sort input names numerically (sgi style)
    -sort2         sort input names alphabetically
    -noremap       force colours not to be remapped
    -charname      rename characters in font to ascii
    -acopy0        copy alpha to RGB
    -acopy1        copy max(r,g,b) to alpha
    -extract       extract frames to seperate files
    -grey          make image into grey scale (aka gray)
    -alphacomment  imbed comment into alpha channel
    -alphacomment2 extract comment from alpha channel
    -invert        invert ARGB values
    -invert<m>     xor ARGB values with specified colour mask
    -tedge         extrude RGB onto transparent pixels
    -subtype<n>    set subtype, -1 same, -2 same if shp (also -s)
                   Can specify subtypes for shape using list of things
                   you want and dont want seperated by , + or |
                   use ! or 'no' for items you dont want
      SHAPE SUBTYPES
      -csm1        swizzled ps2 clut (default)
      -csm2        linear ps2 clut
      -swizzle     swizzle pixel order
      -noswizzle   linear pixel order (aka unswizzle)
      -pal         include a palette (aka -palette)
      -nopal       do not include a palette (aka -palette)
      -shp         include the shape (aka -shape,-image)
      -noshp       do not include the shape
      -hot         include hot spots (aka -hotspot)
      -nohot       do not include hot spots
      -nocomment   do not include comments (also see -comment)
      -anim        include palette animation (aka -anm)
      -noanim      do not include palette animation
      -namedpal    name palettes in header (aka -namedpalette)
      -nonamedpal  do not name palettes in header
      -mipmapcollapse   make mipmaps into one shape (default, aka mmc)
      -nomipmapcollapse do not make mipmaps into one shape
      -dxtcollapse   make dxt into shapetype (default)
      -nodxtcollapse do not make dxt into shape..leave as codec
      -advanced      enable advanced image formats (shaders required)
      -noadvanced    disable advanced image formats (default)
      -sorted        sort the shape header (for VSH)
      -nosorted      do not sort the shape header
      -nonameelement do not output a long name element
      -isdot3      flag a texture as dot3
      -isembm      flag a texture as embm
      -iscubemap   flag a texture as cubemap
                   this flag is rather complex, user must ensure:
                     1) texture is a multiple of 6
                     2) for mipmaps, is a power of 2 as well
                     3) for mipmaps, you do NOT generate
                        mipmaps smaller than <anysize> x 6
                        with the -mipmap option.
                     This is extremly important for the cubemap
                     collapse, gx will generate a cubemap but the
                     texture will have black stripes at the bottom
                     due to roundoff of the texture size during the collapse
      -ismipmont   flag a texture as mipmont
      -metalbin    flag a texture has metalbin
      -isopaque    flag a texture being opaque
      -istransparent flag a texture being 1 bpp transparent
      -ishalfalpha flag a texture being halfalpha range (128=opaque) for ps2
      -config      configure AVI codec advanced properties (for vp6)
      FONT SUBTYPES
      -char16      use CHARACTER16 font format (for ffn,xfn,sfn,gfn)
      -powerof2    make texture power of 2 square
      -maxwidth256 limit width of font texture page to 256
    -userdata<n>    create a user data area in a shape file
    -screen<c>,<o> screen mask image (1/2 transparent)
                   <c> screen colour
                   <o> orientation (0=upperleft,1=upperright)
    -preten        preattenuate ARGB values
    -preten1       unattenuate ARGB values
    -tblack        make black transparent
    -bblack        make black blue (0xff080808)
    -twhite        make white transparent
    -replace<s>,<r>,<sm>,<rm>,<sn> replace a colour with another colour
                   <s> search colour ie WHITE
                   <r> replace colour ie BLACK
                   <sm> search mask ie 0xf8f8f8f8
                   <rm> replace mask ie 0xffffffff
                   <sn> search not 1=search for not s&sm
    -palcopy<d>,<s> palette copy
    -palmove<d>,<s> palette move (zero source)
    -palswap<d>,<s> palette swap entries
                   <d> destination palette entry
                   <s> source palette range
    -palgrad<s>,<e>,<min>,<max>,<mask> palette gradient
                   <s> start colour
                   <e> end colour
                   <min> min argb colour value (see COLOURS)
                   <max> max argb colour value (see COLOURS)
                   <mask> mask argb colour value (see COLOURS)
    -palgrad<s>,<e> palette gradient using existing palette entries
                   <s> start colour
                   <e> end colour
    -halfalpha     reduce alpha to 1/2 (-pixel(a+1)/2,r,g,b)
    -doublealpha   increase alpha to 2x (-pixel(min(255,(a*255+64)/128)),r,g,b)
    -halfpixel     reduce pixel to 1/2 (-pixel(a+1)/2,(r+1)/2,(g+1)/2,(b+1)/2)
    -fyi<ys>,<yo>,<cs>,<co>,<as>,<ao> adjust ayiq for ps2/xbox
                   Adjust image for ps2 to/from xbox.  See MS whitepaper
                   <ys> luminance scale
                   <yo> luminance offset
                   <cs> chrominance scale
                   <co> chrominance offset
                   <as> alpha scale
                   <ao> alpha offset
                   For ps2 to xbox/gc: -fyi1.0811,-20.68,1.115
                   For xbox/gc to ps2: -fyi0.925,19.25,0.8968
    -threshhold<n> bump values >= n to 255, and < n to 0
    -pixel<r>,<g>,<b> replace pixels using expressions
    -pixel<a>,<r>,<g>,<b>,<i>,<x>,<y> pixel expression
                   <a> alpha expression
                   <r> red expression
                   <g> green expression
                   <b> blue expression
                   <i> index expression for 8 bit image
                   <x> map destination x to source x with expression
                   <y> map destination y to source y with expression
                   Symbols available:
                     a,r,g,b,x,argb,frame,framenum,width,height,bpp,
                     startcolour,numcolours,colours,subtype,packed,
                     quality,framesize,alphabits,redbits,greenbits,
                     bluebits,centerx,centery,defaultx,defaulty,
                     numhotspots,fps,dpi,ispal,framename
                     hot0x,hot0y,hot1x,hot1y,hot2x,hot2y,hot3x,hot3y,
                     hot4x,hot4y,hot5x,hot5y,hot6x,hot6y,hot7x,hot7y,
                     hot8x,hot8y,hot9x,hot9y,hot10x,hot10y,hot11x,hot11y,
                     hot12x,hot12y,hot13x,hot13y,hot14x,hot14y,
                     hot15x,hot15y,hot16x,hot16y,hot17x,hot17y,
                     hot18x,hot18y,hot19x,hot19y
                   a_ prefix for auxilliary file variables (see -a)
                   ispal is for expressions on the 8 bpp index <i> which are
                     applied to both palette index and image
                   Function available:
                     min(...)     smallest of n values
                     max(...)     largest of n values
                     int(n)       cast to integer (truncate toward 0)
                     round(n)     round to nearest integer
                     floor(n)     truncate down to integer(negative away from 0)
                     ceil(n)      truncate up to integer (negative toward 0)
                     sin(n)       sine of radian angle
                     cos(n)       cosine of radian angle
                     tan(n)       tan of radian
                     asin(n)      arcsine
                     acos(n)      arccosine
                     atan(n)      arctangent
                     exp(n)       e raised to power of n
                     log(n)       log base e of n
                     log2(n)      log base 2 of n
                     log10(n)     log base 10 of n
                     sqrt(n)      square root of n
                     rand(max)    float random up to/including max
                     hypot(...)   hypotenous of n dimensional vertex
                     floorpow2(x) next lower power of 2 of x
                     ceilpow2(x)  next higher power of 2 of x
                     pow(x,y)   x to the power of y
    -safe1         ntsc safe colour fix using desaturation (dawson)
      -safe2         ntsc safe colour fix using colour space shift (loken)
      -safe2_grey<n> ignore colours with the same r,g,b within # threshold
    -blur<n>       blur with n pixel radius
    -dilate<n>     dilate with n pixel radius
    -erode<n>      erode with n pixel radius
    -equalize      equalize an image (maximize range of each channel)
    -blurp<n>      blur with n pixel percentage radius
    -gamma<n>      gamma correct (1.0 default)
    -sharpen       sharpen using standard convolution kernel
    -sharpen<n>    1 - (default) standard convolution kernel
                   2 - gaussian kernel much clearer but introduces
                       a lot of artifacts
    -x<n>          default x-position
    -y<n>          default y-position
    -dx<n>         add n to default x-position
    -dy<n>         add n to default y-position
    -cx<n>         centre-point x-position
    -cy<n>         centre-point y-position
    -hotadjust0    adjust hot spots from absolute to center point relative
                   same as -sethot(hot0x-centerx),(hot0y-centery)
    -hotadjust1    adjust hot spots from relative to absolute
                   same as -sethot(hot0x+centerx),(hot0y+centery)
    -hotadd<n>,<x>,<y>       adjust hot spot n by x,y
    -setvar=expr   set a user variable to a value (expression)
    -sethot<n>,<x>,<y>...    set hot spots starting at 'n'
    -sethot<x>,<y> set hot spots starting at first hot spot
      <n>          starting hot spot - range constraint on numhot spots
    -comment<str>  add comment for image.  str is printf formatter
                     %s is used to access the old comment
                     no argument turns off comment option
                     empty string clears the comment. see also -nocomment
    -shell<str>    launch shell command for every frame processed
    -echo<str>     echo a string to the screen for every frame processed
    -echo<form>,<expr> printf format an expression
    -name<str>,<expr>    name shape
      <str>          formatting string
      <expr>         frame index range constraint (expression) for %d etc
                     a_framename uses auxillary file framename for %s
    -startindex<n>  starting frame number for output filenames
    -sort<n>       sort filenames (0=off, 1=sort)
    -hash<n>       hash names to n characters (default 512)
    -d             dither.  if -555 is specified, low bits use jitter on
                     32 bit image.  If -888 or -8888 is used, jitter if off
      -d1            Floyd-Steinberg
      -d2            Burkes
      -d3            Stucki
    -d2            randomize dither low bits. use -555 to specify bits
    -return<expr>  set return value (ERROR LEVEL) for command line based
                   on an expression.  Requires an image and has access
                   to image information. default return is error count
                   See also -pixel for variables/functions
    -f<range>      frames to extract from source(default all)
    -ff<range>     frames to filter from source(default all)
    -if<expr>      process the frame if an expression is true
    -fif<expr>     write image if an expression is true
    -while<expr>   process the frame while an expression is true
    -channel<n>    Photoshop channel to extract
    -overwrite<n>  overwrite source if no dest (0=no,1=backup,2=overwrite)
    -opaque<range> opaque colours
    -black<range>  black out a range of colours (opaque black)
    -t<range>      transparent colours
    -l<range>      translucient colours
    -avoid<range>  colours to avoid using in colour reduction
    -a<file>       auxillary frames with specified file
    -p<file>       read a palette to convert to from any image file
      -p<file>,<frame> specify framenumber or framename to use
    -log<file>     log file for output instead of stdout
    +<file>        composite frames with specified file (or -+file)
    -paste         composite paste frames
    -add           composite add pixels
    -sub           composite subtract pixels
    -remove        composite remove pixels (clipped subtract)
    -psnr          calculate PSNR of the image vs the composite file
                   -psnr2 just show PSNRY and set return code to psnry
    -blendmethod<n> composite method
                   0 alpha blend unattenuated (default)
                   1 paste
                   2 sub
                   3 add
                   4 remove
                   5 psnr calc
                   6 alpha blend preattenuated
                   7 multiply
                   8 screen
                   9 overlay
                   10 alpha test (aka tmask) - stamp non-transparent pixels
    -blendbehind   composite drawn behind image (swaps order)
    -blend<n>      composite blend n percent (default 100%)
    -blend<f>,<b>  foreground/background percentages
    -blend<f>,<b>,<m> blend with channel mask
    -q<n>          lossy compression quality 0..100
                   0 bad, 100 perfect, -1 same as original, -2 auto (default)
    -framesize<n>  set lossy compress level based on bytes in a frame
                   for madcow, default is sqrt(width*height)*42
    -datarate<n>   set datarate in term of KB/s.  Respects FPS if specified to
                   convert to framesize.  Default is 29.97 fps
    -gop<i>,<p>    set movie i and p frame intervals (15,3 recommended)
    -dpi<n>        set dpi (dots per square inch)
    -align<n>      shape data alignment
    -fps<n>        set frames per second.  Common frame rates include:
                   23.976          (24*1000/1001)
                   24      Movie
                   25      PAL/2
                   29.97   NTSC/2  (30*1000/1001)
                   30
                   50      PAL
                   59.94   NTSC    (60*1000/1001)
                   60
    -background<c> set a default background colour
    -break<n>      break (int3) for debugging. 1=in options, 2=process image
    -low           priority low to run in background
    -high          priority high
    -omp<n>        set number of openmp threads to use (0 autodetect, 1 to disable)
    -setcolour<c>,<val>        set palette entries to ARGB(0xaarrggbb)
    -setcolour<c>,<val>,<mask> mask which channels are set(ie 0xffffffff)
      <c>          colour range (ie 4..7)
      <val>        value to set to (range constraint)
      <mask>       channel mask
    -rot<n>        rotate by 90 degrees. 1=90cw, 2=180, 3=90ccw
    -rotate<n>     rotate by arbitrary degrees 0..360 (negative ok)
    -transpose     transpose the image same as doing a hflip
                   and a 270 degree rotate
    -deint         deinterlace
    -temporalfix   fix WMV temporal compression duplicate frames (grey frames)
    -palsort<m>    m=method 0=histogram,1=argb,2=hls,3=weighthls,4=ihist,5=yuv
                   sort in any order using the following symbols (uppercase
                   sorts largest>smallest, lowercase sorts smallest>largest):
                       A(alpha),R(red),G(green),B(blue),H(hue),S(saturation)
                       L(lightness),Y(luminance),U(chrominance),V(chrominance)
                       P(popularity(histogram))
    -palsort<m>,<b> b=1 forces black to be colour 0,2=trans 255,3=trans 0
    -wrap<x>,<y>   wrap image (latenight style)
    -deband        dithering to remove banding
    -deband<rgb>,<rad> rgb threshhold and pixel radius for dithering
    -shadow<x1>,<x2>,<y>,<dx>,<dy> generate skewed shadow.
                   x1,x2,y1 in percent (ie 100).  dx,dy are offsets
    -dropshadow<x,y,z> Use a semi raytracer to dropshadow a glyph
                       x,y,z specify light location in 3D coords.
                       Glyph is texture mapped to a plane at <0,1,0>
                       Camera at <0,1.10,0> pointing down y axis.
                       BackPlane at <0,0,0> This combination
                       allows any shadow from glyph to fall on the
                       back plane and create the shadow effect.
        -dslighttype<n>     0 - pointlight (default)
                            1 - cylinder light.
                            2 - spotlight.
                            3 - area point light
                            4 - area spotlight
                            5 - area cylinderlight
        -dslightdir<x,y,z> direction of light source. for 
                           directional light sources only!
        -dsradius<n>       radius of cylindrical light.
        -dsfalloff<n>      falloff of light source.
        -dsFadePower<n>    fade power of spotlight.
        -dsFadeDist<n> absolute fade distance of spotlight.
        -dsAreaL<x,y,z,x,y,z,w,h> Build area light, with
                                  Axis1 and Axis2 specifying rectangle
                                  direction <x,y,z> preferable perp.
                                  to each other.
                                  w - number of light in Axis1 direct.
                                  h - number of light in Axis2 direct.
                                  NOTE large area creates large
                                  smudged out shadows
        -dsLTightness<n>   Tightness of spotlights and cylinderlights
                           affects the rate of falloff of a light.
        -dsTexPlaneOff<n>  Where down the y axis the texture plane
                           is located. default 1.
        -dsShadPlaneOff<n> Where down the y axis the shadow plane is
                           located. default 0.
        -dsLookAt<x,y,x> Point at which the camera focuses.
                           default <0,0,0>
        -dsshadcol<r,g,b>  colour of the shadow, values range from
                           0 -> 1 default is <0,0,0> so shadow will
                           be completly black.
        -dsCamLoc<x,y,z>   Camera location, or vantage point in scene.
                           values are in floating point.
                           default is <0,2.0,0>    
        -dsAntiAlias<n>    number of rays to shoot for each pixel.
                           n - 1..3 (1 default)
    -mkftexmap     make facial texture map
                   takes each frame seperatly, crops out the central
                   col. and inserts from left to right into final bitmap.
    -swap<a>,<b>   swap 8 bit colours A and B
    -zoom<w>,<h>   zoom to width/height specified (0 dont zoom)
    -zoom<w>,<h>,<sharpness> sharpness in pixel percentage (100 default)
    -scale<w>,<h>  point sample scale to width, height
    -scale<w>      point sample scale to width (height proportional)
    -mipmont       mipmap montage for ps2
                   a montage is a collage of mipmaps in a manner that
                   can be uploaded all at once.
                   This is the only option when working with GST
                   compression and mipmaps.
    -mipmap        mipmap with specified parameters
     -mipmap<levels>,<min>
     -mipmap<levels>,<maxwidth>,<maxheight>
     -mipmap<levels>,<maxwidth>,<maxheight>,<min>
     -mipmap<levels>,<maxwidth>,<maxheight>,<min>,<trans>,<chroma>,<clear>
     -mipmaps...   use bicubic filter (size filter)
     -mipmapc...   use bicubic filter but global colour reduce
                   across mipmaps to retain bit depth
     -mipmapb...   use box filter (default - halfsize)
     -mipmapp...   use old p2 method, (point sample) use only for <=8bpp images
       levels      total number of levels including base texture
       maxwidth..  size of top mipmap
       min         stop when width or height hits this minimum pixel size
       trans       transparency flag for size. ignored by halfsize (default)
       chroma      chromakey. ignored
       clear       clear last n mipmaps to background colour
    -shrinktofit<m> crop to minimum rectangle (remove transparency)
                   1   remove transparent pixels (alpha=0)
                   2   use pixels with colour of upper left pixel
                   3   remove both upper left and transparent pixels (default)
                   4   remove bottom right only
    -autocenter    triangulate a center point based on 2 pixels on edge
    -hsv<h>,<s>,<b>,<v> adjust hsb/v. h=180..180. s,b,v=-100..100
    -contrast<c>,<b> adjust contrast brightness. -100..100
    -chroma<tol>   chromakey to a tolerance (45 default)
    -edge<colour>,<pixels>,<pits>  clean edge pits and spikes
    -fill<colour>  flood fill starting at 0,0 with colour
    -fill<x>,<y>,<colour>    flood fill starting at x,y with colour
    -rect<x>,<y>,<w>,<h>,<c> draw rectangle
    -outline<x>,<y>,<w>,<h>,<c> outline (normally for fonts)
    -grid<x>,<y>,<w>,<h>,<c> draw grid
    -line<x>,<y>,<x2>,<y2>,<c> draw line
    -clut<x>,<y>   set clut position in vram
    -crop          crop to specified dimensions (negatives ok)
     -crop<n>      crop to specified number of pixels area
     -crop<width>,<height>
     -crop<width>,<height>,<colour>
     -crop<x>,<y>,<width>,<height>
     -crop<x>,<y>,<width>,<height>,<colour>
     -crop<x>,<y>,<width>,<height>,<colour>,<clamp>
     -crop<x>,<y>,<width>,<height>,<colour>,<clampx>,<clampy>
       <clamp> 0 Fill with solid colour
               1 Clamp to edge
               2 Wrap around
               3 Mirror
     -cropby<left>,<top>,<right>,<bottom>,<colour>
     -cropby...     crop by specified pixels (negatives for outward)
     -cropto...     crop to specified alignment. (pos up, neg down)
     -cropmax...    crop anything above maximum specified size
     -crop<n>%...   crop to percentage (any arg)
     -croppix<n>    crop to specified number of pixels area (aka -crop)
     -cropby<n>%... crop by percentage
     -cropby<left>,<top>,<right>,<bottom>,<colour>
    -halfsize<n>   reduce image to half size 1=vertical,2=horizontal,3=both
    -thumb<w>,<h>  reduce image to thumbnail. w/h default to 128,102
    -size<w>,<h>     size to width/height specified (0 dont size)
      -size<n>       size to specified number of pixels area (also -sizepix)
      -size<n>%...   size to percentage (any arg)
      -size<w>,<h>,<method0..6>,<trans>,<chromakey>,<sharpnessx>,<sharpnessy>
       <method> 0 Lanczos    Good choice (sharper than Mitchell)
                1 Mitchell   Good choice (B=1/3 C=1/3)
                2 Cubic      Good choice (2|t|^3 - 3|t|^2 + 1 for -1 <= t <= 1)
                3 Triangle   Linear interpolation
                4 Box        Point sample with interpolation
                5 Bell       Blurry
                6 B-Spline   Blurry
                7 Quadratic  Faster than cubics, good quality
       <trans>       0 use alpha, 1 maintain if any pixel is transparent
       <chromakey>   transparent colour for <trans> option
       <sharpnessx>  sharpness horizontally. 100 default. 50 sharp. 200 blurry
       <sharpnessy>  sharpness vertically.   100 default. 50 sharp. 200 blurry
    -pointsize<s>    size for ttf true type font in points (72 dpi). default 24
    -antialias<n>    specify antialiasing for ttf
                     0=none, 1=antialias 8 bpp (default), 2=antialias 4 bpp
    -style<n>       specify font style
                    0 Regular
                    1 Bold   (aka -bold)
                    2 Italic (aka -italic)
                    3 Bold/Italic
                    4 Underline
                    8 Strikeout
    -italic         italic font (aka -style2)
    -bold           bold font (aka -style1)
    -charset<n>     specify font charset <n>
                    ANSI            0
                    DEFAULT         1
                    SYMBOL          2
                    SHIFTJIS        128
                    HANGEUL         129
                    HANGUL          129     (common asian format)
                    GB2312          134
                    CHINESEBIG5     136
                    OEM             255
                    JOHAB           130
                    HEBREW          177
                    ARABIC          178
                    GREEK           161
                    TURKISH         162
                    VIETNAMESE      163
                    THAI            222
                    EASTEUROPE      238     (central european)
                    RUSSIAN         204
                    MAC             77
                    BALTIC          186
    -typeface<face> specify font face in unicode
    -aspect<n>      specify font aspect ratio. 1=1:1.  0.5=half height
    -tighten<n>     specify font tighten (spacing scale factor)
                    1=none, 0.8 narrow, 1.2 spaced out
    -tracking<n>    specify font tracking (spacing translation value)
                    0=none, -1 narrow, 1 spaced out
    -smallcaps<n>   specify smallcaps ratio. 0.8 typical. 0 disable
                    makes lowercase use uppercase with this size ratio
    -ascii<n>       1=use ascii, 0=unicode
    -baseline       positions from baseline instead of upper left
    -stereo<f>,<r> make stereogram from height field.
       <f>         focus (default 63)
       <r>         range (default 10)
    -embm<t>,<s>,<f>,<w> create embm from height field
       <t> - type of embm to create
                1 - (default) UVL 888 format
                2 - UV 8800 format (default)
                difference values are signed with 0 being
                no change in height
        <s> scale height before generating normal (def 600/width)
        <f> filter 0=3x3, 1=point.
        <w> wrap 0=clamp, 1=wrap.
    -gshembm       make GameCube embm from height field
                   (biased by 128 unsigned char)
    -unembm<n>     attempt to reconstruct the height field from embm data
                   lossy conversion so attempt will produce greyscale image
                      n - specifies where sea level is for the height field
                          this is a percentage of the max height
                          ie -unembm50  (50%)
    -gshunembm<n>  attempt to reconstruct the height field
                    (GSH ONLY) from embm data
                    lossy conversion so attempt will produce greyscale image
                      n - specifies where sea level is for the height field
                           this is a percentage of the max height
                           ie -unembm50  (50%)
    -dot3<s>,<f>,<w> create normal map from height field
                    s - scale height before generating normal (def 600/width)
                    f - filter 0=3x3, 1=point.
                    w - wrap 0=clamp, 1=wrap.
    -undot3<n>     attempt to reconstruct heightfield from dot3 normalmap.
                   n specifies starting point for heightfield. (default 127)
    -semitrans<n>  transparency page value 0..5
                   0 opaque, 1 50/50, 2 opaque, 3 add, 4 sub, 5 25/100
    -flatten       Flatten all frames into one
      -flatten2    Save x,y,w,h info as hot spots in flattened image
    -flattened     Extracts only the flattened Photoshop PSD image
    -layered       Treats texture files as layered images
    -doinvisible   Flatten even the invisible layeres.
    -cram<w>,<h>   cram the current shape with a vram page of w/h
                   defaults to 1024x256
    -cramtranspose   Let cram option do a transpose if necessary.
    -cramrotate      Let cram option do rotation if necessary.
    -cramcenterpoint Let cram update center point info as well
    -cramcheckedge   Let cram option check edge boundaries and edges
    -cramodd         Let cram option expand height to odd if width odd
    -crambppsort     Let cram option sort by bitdepth
    -cramclutsort    Let cram option sort by clut bit depth
    -cramgroup<bit>,<clut>  specifies groupings of bitdepth and clut depth
                            that should be lumped together when cramming
    -cramtpage<w>,<h>Set cram texture page width & cram texture page height
    -cramwrap        Set cram max width after which it will wrap
    -cramwid         Cram option fails if width of tex. is more than tpage width
    -cramspace<n>    add n pixels of space between the textures
    -crampos<x>,<y>  Set cram x position Set cram y position
    -cramnumfixed    Set number of shapes that are fixed and should not be moved.
    -globalpalette Generates single palette for all frames.
    -time          Display timing diagnostic (for colour reduction)
    -pass<n>       number of passes of image processing to apply
    -warp...       warp an image along a control line
     -warp<type = 1><clampx><clampy><fillcolor><startx><starty><endx><endy>
     -warp<type = 2><wavevertical><wavehorizontal>
     -warp<type = 3><clampx><clampy><fillcolor><numberofLinePairs><LinePairs...>
     -warp<type = 4><clampx><clampy><fillcolor><numberofLinePairs><LinePairs...>
                   clamp codes:
                   1 fill
                   2 clamp
                   warp types:
                   1 regular single line quadrant warp.
                   2 wave image.
                   3 non bilinear multiple control line warp.
                   4 bilinear control line warp.
    -m<n>          colour reduction method -1,1..10 (1 default)
      -m-1         -1 auto select method based on num colours or argb bits
      -m1          Wu with 666 colour cube for 24 bit art
      -m2          Fu with 3555 colour cube
      -m3          Wu with 777 colour cube
      -m4          PQ (default).  Best for most cases
      -m7          exact simple histogram preserves alpha & order
      -m8          Alpha - WU's with alpha
      -m9          Wu with 555 colour cube
      -m10         WuDa (Wu for alpha data) memory intensive version of 4DWu
                   that handles images with arbitrary data in the alpha channel
                   better than 4DWu.
    -ma<n>         colour reduction method for translucient images -1,1..10
      -ma-1        -1 auto select method based on num colours or argb bits
      -ma2         Fu with 3555 colour cube
      -ma4         PQ (default).  Best for alpha channel
      -ma7         exact simple histogram preserves alpha & order
      -ma8         Alpha - WU's with alpha
      -ma10        WuDa (Wu for alpha data) memory intensive version of 4DWu
                   that handles images with arbitrary data in the alpha channel
                   better than 4DWu.
      -exact       same as -m7, simple histogram colour reduction method
      -wu5         same as -m9, 555 variance based colour cube
      -wu6         same as -m1, 666 (default) variance based colour cube
      -wu7         same as -m3, memory intensive version of Wu5 that produces
                   marginally better results.
      -pq          same as -m4, good for most types of art
      -fu          same as -m2, runs Wu5 on 8 different alpha levels, good for
                   images with limited transparency
      -4dwu        same as -m8, Alpha, Wu with 6 bits of alpha precision
                   - 6565 colour cube sensitive to channel depth.
                   If green tint ensues from extra bit of precision in the
                   green channel set image to 6555 and 4dwu will reduce
                   with equal precision in each channel. Note also that 4dwu
                   will only generate a single completly transparent colour as
                   it assumes that perceptually, only one is required.
      -wuda        same as -m10, Alpha, 6666 colour cube - memory intensive and
                   slow but better for images with data in the alpha channel. 
                   WUDA: Wu for alpha data
                   Wuda will generate several completly transparent colours
                   if necessary.
    -text<text>,<x>,<y>,<pointssize>,<bold>,<colour>,<truetype font>
      <text>       ascii text to render into frame
      <x>,<y>      position to render font (upper righthand corner)
      <pointsize>  pointsize to render font
      <colour>     colour value for text
                   (8bpp does a best match in palette)
      <bold>       flag, 0/1 turns bold on or off
      <truetype font> file/pathname of font, including extension and folder


FILE FORMATS:
    -3pr   PS3 Packed Resource        
    -act   ACT Photoshop Palette      
    -anm   DPaint ANM                 
    -ash   Gameboy Advance Shape File 
    -avi   Audio Visual Interleave    
    -bif   Binary Info File           
    -bik   Bink                       
    -bmp   Windows BMP                
    -bnr   Nintendo Banner            
    -clp   ClipBoard                  
    -ddf   DirectDraw Big             
    -dds   DirectDraw Surface         
    -eps   Encapsulated Postscript    
    -ffn   PC Font File               
    -fli   FLIC Animation             
    -flm   Adobe FilmStrip            
    -fsh   PC Shape File              
    -fss   PC Streaming Shape         
    -gfn   GameCube Font File         
    -gif   Compuserve GIF             
    -gmx   Gimex Images               
    -gsh   GameCube Shape File        
    -gss   GameCube Streaming Shape   
    -gtf   PS3 Graphics Texture Format
    -hsi   HSI Raw                    
    -ico   Windows Icon Cursor        
    -ijl   Intel JPeg                 
    -jp2   JPeg2000                   
    -jpg   JPeg                       
    -lbm   Amiga ILBM                 
    -mad   Madcow Movie               
    -mdec  MDEC Movie                 
    -mfn   Sony PSP Font File         
    -mov   QuickTime RAW              
    -mpc   MPEG Video                 
    -msh   Sony PSP Shape File        
    -mss   Sony PSP Streaming Shape   
    -new   New Image                  
    -oldashOld GBA Shape File         
    -oldfshOld PC Shape File          
    -oldfssOld PC Streaming Shape     
    -oldgshOld GameCube Shape File    
    -oldgssOld GameCube Streaming Shape
    -oldmshOld Sony PSP Shape File    
    -oldmssOld Sony PSP Streaming Shape
    -oldsshOld PS2 Shape File         
    -oldsssOld PS2 Streaming Shape    
    -oldxshOld XBox Shape File        
    -oldxssOld XBox Streaming Shape   
    -pcx   ZSoft PCX                  
    -pfn   PSX Font File              
    -pict  Macintosh Pict             
    -pix   Alias Pix                  
    -png   Portable Network Graphics  
    -ppm   Portable Pixel Map         
    -psd   Adobe Photoshop            
    -psh   PSX Shape File             
    -qmt   Quake Model Texture Gimex  
    -qt3   QuickTime                  
    -ram   Ram Shape                  
    -ras   Sun Raster                 
    -raw   Erik Kiss RAW              
    -rla   WaveFront RLA              
    -sct   Scitex SCT                 
    -sfn   Sony2 Font File            
    -sgi   SGI RGB Image File         
    -sim   SoftImage PIC              
    -ssh   PS2 Shape File             
    -sss   PS2 Streaming Shape        
    -tga   Targa                      
    -tgv   TGV Movie                  
    -tif   Tiff                       
    -tim   TIM PSX Texture Image      
    -tm2   Tim2 Sony Texture          
    -tpl   GameCube Texture           
    -ttf   TrueType Font              
    -vp6   VP6 Movie                  
    -xds   Xenon DirectDraw Surface   
    -xfn   XBox Font File             
    -xpr   XBox Packed Resource       
    -xsh   XBox Shape File            
    -xss   XBox Streaming Shape       
    -yfn   Sony PS3 Font File         
    -ysh   PS3 Shape File             
    -yuv   ACOM YUV                   
    -zfn   XBox360 Font File          
    -zsh   Xenon Shape File           
COLOUR SYNTAX:
    There are 3 basic ways you can specify an ARGB colour
    1. (R,G,B) or (A,R,G,B)
    2. A single value, typically in hex form 0xAARRGGBB.
    3. Using a predefined colour.  The predefined colours are:
       BLACK,BLUE,GREEN,CYAN,RED,MAGENTA,BROWN,LIGHTGREY,DARKGREY,
       LIGHTBLUE,LIGHTGREEN,LIGHTCYAN,LIGHTRED,LIGHTMAGENTA,YELLOW,
       WHITE,GREY,TRANSPARENT
       Predefined colours can optionally be prefixed with C_ or CA_

RANGE SYNTAX:
    [[!][<start>][..][<end>][+=<step>][,]]*
    ie -f             all frames
       -f5            frame 5
       -f5..9         frames 5..9 inclusive
       -f!10          all frames except 10
       -f5,7,9        frames 5,7 and 9
       -f10..98+=2    even frames in range between 10 and 98
       -fbob,fred     named frames
       -f!S*          not these wildcard frames

    -h4            list of file formats
    -history       history of changes
    -help          launch web help
    -opt?          show help on specified option
    -?word         show help that contains specified word

TYPES:    .3pr .act .anm .ash .avi .bif .bik .bmp .bnr .clp .ddf .dds 
          .eps .ffn .fli .flm .fsh .fss .gfn .gif .gmx .gsh .gss .gtf 
          .hsi .ico .ijl .jp2 .jpg .lbm .mad .mdec.mfn .mov .mpc .msh 
          .mss .new .oldash.oldfsh.oldfss.oldgsh.oldgss.oldmsh.oldmss
          .oldssh.oldsss.oldxsh.oldxss.pcx .pfn .pict.pix .png .ppm .psd 
          .psh .qmt .qt3 .ram .ras .raw .rla .sct .sfn .sgi .sim .ssh 
          .sss .tga .tgv .tif .tim .tm2 .tpl .ttf .vp6 .xds .xfn .xpr 
          .xsh .xss .yfn .ysh .yuv .zfn .zsh 
