
vcrgbhls(1)                  Khoros                   vcrgbhls(1)

PROGRAM
     vcrgbhls - Conversion between NTSC RGB and HLS color spaces

SYNTAX
     vcrgbhls

     -i             input image filename

     -o             output image filename

     [-n]           normalization factor

     [-h]           Convert (RGB to HLS) [True] or (HLS to RGB)
                    [False]

     [-V]           Gives the version for vcrgbhls

     [-U]           Gives the usage for vcrgbhls

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vcrgbhls.ans
                    or file1

     [-a [file1]]   Uses vcrgbhls.ans or file1 as the answer file

DESCRIPTION
     vcrgbhls converts between NTSC RGB or generic RGB and HLS
     color spaces.  Color images are displayed and manipulated
     using the NTSC receiver primary color system.  This routine
     needs to work with an image normalized between 0 and 1.

     The algorithm which transforms from RGB to HLS was taken
     from Foley & VanDam (Fundamentals of Interactive Computer
     Graphics), and the HLS to RGB was taken from Ken Fishkin
     (with our modifications).

     The -h option specifies which conversion will be done.  If
     -h = 1 (TRUE, default), the conversion is from RGB to HLS.
     If -h = 0 (FALSE), the conversion is from HLS to RGB.

     The -n option specifies the normalization factor.  The
     default value is 255.

     This routine will not touch the data map; therefore, the map
     may be invalid after running this routine. The map may be
     deleted from the image or a new map may be inserted.

REQUIRED ARGUMENTS
     -i     type: infile
            desc: input image filename

     -o     type: outfile
            desc: output image filename

OPTIONAL ARGUMENTS
     -n     type: float
            desc: normalization factor
            default: 255
            bounds: value > 0.0

     -h     type: boolean
            desc: Convert (RGB to HLS) [True] or (HLS to RGB)
            [False]
            default: true

EXAMPLES
     vcrgbhls -i image1 -o image2 -h 1
     this will convert image1 (RGB) to image2 (HLS) using normal-
     ization factor = 255.  Normalization factor = 255 is used
     because an 8 color plane machine (256 colors) is being used.

     vcrgbhls -i image1 -o image2 -h 2 -n 15
     this will convert image1 (HLS) to image2 (RGB) using normal-
     ization factor = 15.  Normalization factor = 15 is used
     because an 4 color plane machine (16 colors) is being used.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvcrgbhls(3)

RESTRICTIONS
     vcrgbhls must have an input image of data storage type FLOAT
     and the input image color map model must be of type RGB or
     HLS.

COPYRIGHT
     Copyright 1991, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

