world.WindowImageInfo

MUSHclient script function (Method) — introduced in version 4.34

Returns information about an image

Prototype

VARIANT WindowImageInfo(BSTR WindowName, BSTR ImageId, long InfoType);

Data type meanings

Description

This returns information about a loaded image. You need to specify the name of the miniwindow, and the image id you used when loading the image.

WindowName - the name of an existing miniwindow.

ImageId - the image id you used when you loaded the image.

InfoType - the information you want:

1: Type - Specifies the bitmap type.

2: Width - Specifies the width, in pixels, of the bitmap.

3: Height - Specifies the height, in pixels, of the bitmap.

4: WidthBytes - Specifies the number of bytes in each scan line.

5: Planes - Specifies the count of color planes.

6: BitsPixel - Specifies the number of bits required to indicate the color of a pixel.

For more information, see:

http://www.gammon.com.au/mushclient/mw_images.htm

Lua example

WindowImageInfo(win, "im1", 6)

Lua notes

Lua returns nil instead of a NULL or EMPTY variant.

Return value

The specified information about the image, as described above.
An EMPTY variant, if the image does not exist.
A NULL variant if the InfoType is not a valid type.

Related topic

MiniWindows

See also

FunctionDescription
WindowCreateCreates a miniwindow
WindowCreateImageCreates an image in a miniwindow
WindowDrawImageDraws an image into a miniwindow
WindowImageListLists all images installed into a miniwindow
WindowImageOpDraws an ellipse, rectangle or round rectangle, filled with an image
WindowLoadImageLoads an image into a miniwindow from a disk file