getTextureInfo: Difference between revisions
Lou Montana (talk | contribs) m (Some wiki formatting) |
Killzone Kid (talk | contribs) No edit summary |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
|gr1= System | |gr1= System | ||
|descr= Return texture information - resolution in pixels and average colour. Multiply the pixel values by [[pixelW]] and [[pixelH]] to get screen coordinates. | |descr= Return texture information - resolution in pixels (mipmap level 0) and average colour. Multiply the pixel values by [[pixelW]] and [[pixelH]] to get screen coordinates. | ||
|s1= [[getTextureInfo]] texture | |s1= [[getTextureInfo]] texture | ||
| Line 16: | Line 16: | ||
* height: [[Number]] | * height: [[Number]] | ||
* {{GVI|arma3|2.08|size= 0.75}} rgbaAverageColour: [[Array]] format [[Color]] | * {{GVI|arma3|2.08|size= 0.75}} rgbaAverageColour: [[Array]] format [[Color]] | ||
|s2= [[getTextureInfo]] [texture, sizeH] | |||
|s2since=arma3 2.22 | |||
|p21= texture: [[String]] - texture path (.paa, .jpg, .ogv) | |||
|p22= sizeH: [[Number]] - texture height in screen size | |||
|r2= [[Array]] in format [width, height] - width and height of the texture in screen units | |||
|x1= <sqf>getTextureInfo "a3\characters_f\blufor\data\clothing1_co.paa"; // [2048, 2048, [0.458824, 0.427451, 0.34902, 1]]</sqf> | |x1= <sqf>getTextureInfo "a3\characters_f\blufor\data\clothing1_co.paa"; // [2048, 2048, [0.458824, 0.427451, 0.34902, 1]]</sqf> | ||
|x2= <sqf>getTextureInfo ["\A3\UI_f\Data\Logos\arma3_shadow_ca.paa", 0.1]; // [0.150111, 0.1]</sqf> | |||
|seealso= [[pixelW]] [[pixelH]] [[getModelInfo]] [[supportInfo]] [[getObjectType]] [[getObjectTextures]] | |seealso= [[pixelW]] [[pixelH]] [[getModelInfo]] [[supportInfo]] [[getObjectType]] [[getObjectTextures]] | ||
}} | }} | ||
Latest revision as of 13:40, 1 November 2025
Description
- 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.
- Groups:
- System
Syntax
- Syntax:
- getTextureInfo texture
- Parameters:
- texture: String - texture path (.paa, .jpg, .ogv)
- Return Value:
- Array in format [width, height, rgbaAverageColour] where:
Alternative Syntax
- Syntax:
- getTextureInfo [texture, sizeH]
- Parameters:
- texture: String - texture path (.paa, .jpg, .ogv)
- sizeH: Number - texture height in screen size
- Return Value:
- Array in format [width, height] - width and 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]
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note