Name

image

image create pixmap imageName [option value...]

Create a Tk image using XPM format. Supported options are as follows:

-data string

Source for the XPM image is specified in string. Takes precedence over the -file option.

-file fileName

Source for the XPM image is to be read from the file fileName.

When a pixmap image is created, a Tcl command with the same name as the image is created. This command supports the cget and configure operations for querying and changing the image options.

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.