Description
Return texture information - resolution in pixels (mipmap level 0) and average colour. Multiply the pixel values by pixelW and pixelH to get screen coordinates.
Syntax
Syntax 1
getTextureInfo texture
Parameters:
texture: String - texture path (.paa, .jpg, .ogv)
Returns: Array with [width, height, rgbaAverageColour]
- width: Number
- height: Number
- Arma 3 v2.08 rgbaAverageColour: Color (RGBA)
Syntax 2
since arma3 2.22
getTextureInfo [texture, sizeH]
Parameters:
Returns: Array with [width, height]
- width: Number - width of the texture in screen units
- height: Number - height of the texture in screen units
Examples
Example 1
getTextureInfo "a3\characters_f\blufor\data\clothing1_co.paa"; // [2048, 2048, [0.458824, 0.427451, 0.34902, 1]]
Example 2
getTextureInfo ["\A3\UI_f\Data\Logos\arma3_shadow_ca.paa", 0.1]; // [0.150111, 0.1]
See also
pixelW · pixelH · getModelInfo · supportInfo · getObjectType · getObjectTextures