imageInfo function

Syntax

  • float imageInfo(filePath, attribute)

Parameters

  1. filePathstring
    Path to texture. See Asset Search for information about search locations.
  2. attributeselector
    Specified texture dimension.
    • {sx}—Width
    • {sy}—Height

Returns

Return the image resolution.

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

Examples

example.1
	imageInfo(myTexture.jpg, sy))
	# result = 1024 (height of the texture in pixels)
example.2
	imageInfo(myTexture.jpg, sx))
	# result = 512 (width of the texture in pixels)

In this topic