
vinsert(1)                   Khoros                    vinsert(1)

PROGRAM
     vinsert - Insert a (sub)image into another image.

SYNTAX
     vinsert

     -i1            input image

     -i2            second input image

     -o             resulting combined image

     [-x]           insert subimage beginning at upper left x
                    coordinate

     [-y]           insert subimage beginning at upper left y
                    coordinate

     [-l]           image real constant pad level

     [-m]           image imaginary constant pad level

     [-V]           Gives the version for vinsert

     [-U]           Gives the usage for vinsert

     [-P]           Prompts for command line options

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

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

DESCRIPTION
     vinsert inserts a subimage into the input image to form the
     output image.  The subimage is placed at the same coordi-
     nates as was extracted from unless the xoffset and yoffset
     of the upper left corner of the target location are speci-
     fied.

     If the subimage does not completely fit into the input
     image, then the input image will be padded to a larger size
     to encompass the subimage. The -l argument specifies the
     padding value for the larger size image. In the event that
     images are of data storage type COMPLEX, the -m argument
     specifies the imaginary pad value.

     For byte type images:

     If the level value specified by user is greater than 255,
     the level value will be scaled down to 255. If the level
     specified by user is less than 0, the level value will by
     scaled up to 0.

     There are no restrictions to the input image (-i1) and the
     subimage (-i2) size. It is possible to input a large image
     into a small image, thus the small image will no longer
     exist.

     This routine will work on multiple band images. But both
     input images must contain the same number of data bands.

     The input images may be of the same or different data types.
     If the input images are of different data types, then both
     input images will be upcast to the highest input image data
     type.  The output image data type will be the same as that
     of the highest data type of the input images.

     IMPORTANT: If the -x argument and the -y argument are NOT
     specified, then vinsert will insert the subimage  (-i2
     image) at the location specified in the image header fields
     startx and starty. If this image is not a "subimage" the
     image is inserted at location 0,0.

REQUIRED ARGUMENTS
     -i1    type: infile
            desc: input image

     -i2    type: infile
            desc: second input image

     -o     type: outfile
            desc: resulting combined image

OPTIONAL ARGUMENTS
     -x     type: integer
            desc: insert subimage beginning at upper left x coor-
            dinate
            default: 0
            bounds: value >= 0

     -y     type: integer
            desc: insert subimage beginning at upper left y coor-
            dinate
            default: 0
            bounds: value >= 0

     -l     type: float
            desc: image real constant pad level
            default: 0
            bounds: value >= 0.0

     -m     type: float
            desc: image imaginary constant pad level
            default: 0
            bounds: value >= 0.0

EXAMPLES
     vinsert -i1 large_image -i2 sub_image -o new_image -x 515 -y
     0 -l 255

     Large_image is 512x512, and sub_image is 30x30. The
     sub_image will be placed outside the large_image at location
     515x0.  A new image is created called new_image of size
     545x512 where the region larger than 512x512 will be padded
     with the value 255, except where the sub_image was placed.

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

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

Khoros                    Release: 1.0                          1

