code: 9ferno

ref: e16b4d85dd6b1cf14834387b765113114dabeae2
dir: /man/9/image/

View raw version
.TH IMAGE 9
.SH NAME
image \- Create and manipulate images
.SH SYNOPSIS
\f5image\fR \fIoption \fR?\fIarg arg ...\fR?
.SH DESCRIPTION
The \f5image\fR command is used to create, delete, and query images.
It can take several different forms, depending on the
\fIoption\fR argument.  The legal forms are:
.TP
\f5image create bitmap \fR?\fIname\fR? ?\fIoption value ...\fR?
Creates a new image and returns its name.
\fIname\fR specifies the name for the image;  if it is omitted then
Tk picks a name of the form \f5image\fIx\fR, where \fIx\fR is
an integer.
The following options are supported:
.RS
.TP
\f5-file \fIname\fR
\fIname\fR gives the name of a file whose contents define the
source bitmap.
The file must be in
.IR image (6)
format.
.TP
\f5-maskfile \fIname\fR
\fIname\fR gives the name of a file whose contents define the
mask. The file must be in
.IR image (6)
format.
.RE
.PP
If an image already exists by the given name then it is replaced
with the new image.
.PP
Transparency effects can be achieved by either the source image including an alpha channel
or by specifying a mask image.
If a mask is specified then the resultant image is generated by rendering the source
through the mask onto a transparent destination image.
.PP
The following commands are posible for images:
.TP
\f5image delete \fR?\fIname name\fR ...?
Deletes each of the named images and returns an empty string.
Each image name is invalidated.
If there are instances of the images displayed in widgets,
the images won't actually be deleted until all of the instances
are released.
.TP
\f5image height \fIname\fR
Returns a decimal string giving the height of image \fIname\fR
in pixels.
.TP
\f5image names\fR
Returns a list containing the names of all existing images.
.TP
\f5image type \fIname\fR
Returns ``bitmap'' if
.I name
is an existing image, or an error otherwise.
.TP
\f5image width \fIname\fR
Returns a decimal string giving the width of image \fIname\fR
in pixels.
.SH BUGS
When an image is reconfigured the widgets that refer to it
will continue to render the original image until their
.B -image
option is reconfigured.
.SH SEE ALSO
.IR options (9),
.IR types (9),
.B imageput
in
.IR tk (2),