imageInfo function

float imageInfo(filePath, attribute)

filePath string Path to texture. See Asset Search for information about search locations.

attribute selector sx returns the width, sy returns the height.

Returns the image resolution for the requested attribute.

This function returns the image resolution of the texture defined in filePath, depending on the specified attribute selector.

Examples

imageInfo(myTexture.jpg, sy)
# result = 1024    (height of the texture in pixels)

imageInfo(myTexture.jpg, sx)
# result = 512     (width of the texture in pixels)