imageInfo function

Syntax

  • float imageInfo(fileName, attributeSelectorXY)

Parameters

  1. fileNamestring
    Input file texture.
  2. attributeSelectorXYstring
    { sx ("width") | sy ("height") }—specified texture dimension.

Returns

Return the image resolution.

The imageInfo function returns the image resolution of the texture defined in the fileName, depending on the specified attributeSelectorXY.

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