getTextureInfo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{RV|type=command |game1= arma 3 |version1= 2.06 |gr1= System |branch= dev |descr= Currently, returns width and height of the given texture. |s1= getTextureInfo textu...")
 
m (Some wiki formatting)
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


|game1= arma 3
|game1= arma3
|version1= 2.06
|version1= 2.06


|gr1= System
|gr1= System


|branch= dev
|descr= Return texture information - resolution in pixels and average colour. Multiply the pixel values by [[pixelW]] and [[pixelH]] to get screen coordinates.


|descr= Currently, returns width and height of the given texture.
|s1= [[getTextureInfo]] texture


|s1= [[getTextureInfo]] texture
|p1= texture: [[String]] - texture path (.paa, .jpg, .ogv)


|p1= texture: [[String]] - path to texture (.paa or .jpg)
|r1= [[Array]] in format [width, height, rgbaAverageColour] where:
* width: [[Number]]
* height: [[Number]]
* {{GVI|arma3|2.08|size= 0.75}} rgbaAverageColour: [[Array]] format [[Color]]


|r1= [[Array]] - in format [width, height]
|x1= <sqf>getTextureInfo "a3\characters_f\blufor\data\clothing1_co.paa"; // [2048, 2048, [0.458824, 0.427451, 0.34902, 1]]</sqf>


|x1= <code>[[getTextureInfo]] "a3\characters_f\blufor\data\clothing1_co.paa"; {{codecomment| // [2048,2048]}}</code>
|seealso= [[pixelW]] [[pixelH]] [[getModelInfo]] [[supportInfo]] [[getObjectType]] [[getObjectTextures]]
|seealso= [[getModelInfo]], [[supportInfo]], [[getObjectType]], [[getObjectTextures]]
}}
}}

Revision as of 19:09, 5 May 2022

Hover & click on the images for description

Description

Description:
Return texture information - resolution in pixels 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:

Examples

Example 1:
getTextureInfo "a3\characters_f\blufor\data\clothing1_co.paa"; // [2048, 2048, [0.458824, 0.427451, 0.34902, 1]]

Additional Information

See also:
pixelW pixelH getModelInfo supportInfo getObjectType getObjectTextures

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