IMAGE(9)                                                 IMAGE(9)

     NAME
          image - Create and manipulate images

     SYNOPSIS
          image option ?arg arg ...?

     DESCRIPTION
          The image command is used to create, delete, and query
          images.  It can take several different forms, depending on
          the option argument.  The legal forms are:

          image create bitmap ?name? ?option value ...?
               Creates a new image and returns its name.  name
               specifies the name for the image;  if it is omitted
               then Tk picks a name of the form imagex, where x is an
               integer.  A bitmap image is defined by two bitmaps,
               called the source and the mask.  The source is
               displayed whereever the mask has a non-zero pixel,
               otherwise nothing will be displayed, producing a
               transparent effect. The two bitmaps must have the same
               dimensions.  The following options are supported:

               -file name
                    name gives the name of a file whose contents
                    define the source bitmap.  The file must be in
                    image(6) format.

               -maskfile name
                    name gives the name of a file whose contents
                    define the mask. The file must be in image(6) for-
                    mat.

          If an image already exists by the given name then it is
          replaced with the new image and any instances of that image
          will redisplay with the new contents.

          image delete ?name name ...?
               Deletes each of the named images and returns an empty
               string.  If there are instances of the images displayed
               in widgets, the images won't actually be deleted until
               all of the instances are released.  However, the asso-
               ciation between the instances and the image manager
               will be dropped.  Existing instances will retain their
               sizes but redisplay as empty areas.  If a deleted image
               is recreated with another call to image create, the
               existing instances will use the new image.

          image height name
               Returns a decimal string giving the height of image
               name in pixels.

     Page 1                       Plan 9             (printed 4/19/24)

     IMAGE(9)                                                 IMAGE(9)

          image names
               Returns a list containing the names of all existing
               images.

          image type name
               Returns ``bitmap'' if name is an existing image, or an
               error otherwise.

          image width name
               Returns a decimal string giving the width of image name
               in pixels.

     BUGS
          Currently, changing the bitmap associated with an image does
          not change the appearance of any current instances of that
          image; there is no ``image manager'' as such.

     SEE ALSO
          options(9), types(9), imageput in tk(2),

     Page 2                       Plan 9             (printed 4/19/24)