::ico::iconsfile ?optionvalue...?
Returns a list of icons found in file where each element is the name or numeric ID. Recognizes the
following options:
-type fileFormat
::ico::iconMembersfilename ?optionvalue...?
Returns a list of images that make up the icon with ID name. Each element is itself a sublist in
the format {name width height bpp}. Recognizes the following options:
-type fileFormat
::ico::getIconfilename ?optionvalue...?
Extracts the icon with ID name from file. The default -format is image which will return the name
of a Tk image containing the icon. The resolution and color depth are selected with the ?-res?,
?-bpp?, and ?-exact? options. If -exact is specified and there is no exact match, an error is
thrown. Optionally -image may be used to specify the name of the Tk image that is created. If
-format is colors then a list of color names in the #RRGGBB format is returned. Each list element
is a horizontal row. Each horizontal row contains a list of colors for all the pixels in that row
from left to right. If -format is name then the resource name of the image chosen is returned.
This is useful for calling writeIcon or getIconByName. Recognizes the following options.
-type fileFormat
-format value
-image value
-res value
-bpp value
-exact value
::ico::getIconByNamefilename ?optionvalue...?
Extracts the image with ID name from file. This name should be the name of a specific image as
returned by ::ico::iconMembers, not an icon name returned from ::ico::icons. If there is no
matching resource ID in file an error is thrown. Recognizes the following options:
-type fileFormat
-format value
::ico::getFileIconfile ?optionvalue...?
This command is only functional when running under Windows. It reads the Windows registry to
determine the display icon for file as it would appear in Explorer or similar. file does not need
to exist and may also be specified as a file extension with a leading dot. If file is a directory
or you specify the special name Folder then the icon representing a folder is returned. This
command takes the same arguments and usage as getIcon:
-format value
-image value
-res value
-bpp value
-exact value
::ico::writeIconfilenamedepthdata ?optionvalue...?
Writes an image to file. name is the resource identifier of the image in file to write. When
writing to an EXE, DLL, or ICL file you may only overwrite existing icons with an icon of the same
dimensions and color depth. No icons may be added to these file types.
When writing to BMP the name is ignored as this type can contain only one image. This means if the
file already existed it is completely overwritten.
When writing to an ICO or ICODATA file if the name specified does not exist then an image is
appended and will be named the next in sequence (the specified name is ignored). Images in ICO and
ICODATA files may be overwritten with differing dimensions or color depths. Note that you will
get strange results when displaying icons if you fail to change every image which makes up a given
icon.
integer depth (in)
This argument must have a value of 1, 4, 8, 24, or 32. If data has more colors than the
color depth allows an error will be generated.
options data (in)
This argument is either a list of colors in the format returned by ::ico::getIcon-formatcolors or the name of a Tk image.
Recognizes the following options.
-type fileFormat
::ico::copyIconfileindexfile2index2 ?optionvalue...?
Copies the icon at index in file to index2 in file2.
-fromtype fileFormat
-totype fileFormat
::ico::EXEtoICOfile ?dir?
Extracts all icons from the executable file to ICO files placed in dir. ?dir? defaults to the
directory file is located in. Icon files will be named in the form file-ID.ico where ID is the
icon resource identifier.
-type fileFormat
::ico::clearCache ?file?
The ::ico::getIconList command caches icon offsets inside EXE, DLL, ICL, and ICO files in order to
speed up extraction. This command clears that cache for the specific ?file? or all files.
::ico::transparentColorimagecolor
If image is a single word it is assumed to be the name of a Tk image. All pixels matching color
in the image will be set transparent. Alternatively, image may be a color list in which case a
modified list is returned.
::ico::Showfile ?optionvalue...?
Application level command which displays a window showing all the icons in file and their name.
-type fileFormat
-parent pathName