{"name":"getResolution","title":"getResolution","type":"command","url":"https://community.bistudio.com/wiki/getResolution","revid":378509,"updated":"2026-05-03T17:11:30Z","groups":["System","GUI Control - Positioning"],"status":"ok","games":{"arma2oa":"1.55","tkoh":"1.00","arma3":"0.50"},"since":"arma2oa 1.55","arma3_since":"0.50","description":"Returns an array containing all information about current client screen resolution.\n\n> [!NOTE]\n> **Arma 3:** **Render resolution** is not returned by this command.\n> A sampling setting of **50%** means half of native width *and* half of native height, resulting in a render resolution of ***25%*** the original resolution.\n\n> [!IMPORTANT]\n> The engine default value for `fovTop` is **0.75** in case it is needed to calculate difference with custom FOV.\n\n> [!NOTE]\n> The `aspectRatio` is calculated as `fovLeft / fovTop` and should be the same as `screenW / screenH` for undistorted image if the FOV is custom. Some of the common values:\n>\n> | 16/9 | 16/10 | 5/4 | 4/3 | 16/9 triple screen |\n> |---|---|---|---|---|\n> | 1.777777(…) | 1.6 | 1.25 | 1.333333(…) | 5.333333(…) |","syntaxes":[{"syntax":"getResolution","params":[],"returns":{"type":"Array","type_expr":"Array","description":"with [screenW, screenH, viewPortW, viewPortH, aspectRatio, uiScale, fovTop, fovLeft, tripleHead, textureQuality]\n- screenW: Number - width of the screen in pixels - screenH: Number - height of the screen in pixels - viewPortW: Number - width of the 4:3 view port in pixels - viewPortH: Number - height of the 4:3 view port in pixels - aspectRatio: Number - screen aspect ratio - uiScale: Number - the scale of the UI, which affects view port size: Arma 3 | Very Small | Small | Normal | Large | Very Large | |---|---|---|---|---| | 0.47 | 0.55 | 0.7 | 0.85 | 1 | - Arma 3 v1.94 fovTop: Number - vertical FOV in radians, the same as `fovTop` value from the user profile - Arma 3 v1.94 fovLeft: Number - horizontal FOV in radians, the same as`fovLeft` value from the user profile - Arma 3 v1.94 tripleHead: Boolean - true if user has triple head screen (see also safeZoneXAbs, safeZoneWAbs) - Arma 3 v2.10 textureQuality: Number - current texture quality set in user preferences in 0..1 range, where 0 is lowest, 1 is highest","text":"Array with [screenW, screenH, viewPortW, viewPortH, aspectRatio, uiScale, fovTop, fovLeft, tripleHead, textureQuality]\n\n- screenW: Number - width of the screen in pixels\n- screenH: Number - height of the screen in pixels\n- viewPortW: Number - width of the **4:3** view port in pixels\n- viewPortH: Number - height of the **4:3** view port in pixels\n- aspectRatio: Number - screen aspect ratio\n- uiScale: Number - the scale of the UI, which affects view port size:\n\n**Arma 3**\n\n| Very Small | Small | Normal | Large | Very Large |\n|---|---|---|---|---|\n| 0.47 | 0.55 | 0.7 | 0.85 | 1 |\n\n- Arma 3 v1.94 fovTop: Number - vertical FOV in radians, the same as `fovTop` value from the user profile\n- Arma 3 v1.94 fovLeft: Number - horizontal FOV in radians, the same as`fovLeft` value from the user profile\n- Arma 3 v1.94 tripleHead: Boolean - true if user has triple head screen (see also safeZoneXAbs, safeZoneWAbs)\n- Arma 3 v2.10 textureQuality: Number - current texture quality set in user preferences in 0..1 range, where 0 is lowest, 1 is highest"},"form":"nullary"}],"examples":[{"text":"```sqf\nprivate _res = getResolution;\n```\n\nExample result with a single 16:9 monitor:\n\n```sqf\n[\n    1920,        // width\n    1080,        // height\n    792,        // 2D viewport width\n    594,        // 2D viewport height\n    1.77778,    // aspect ratio\n    0.55,        // UI scale\n    0.75,        // fovTop\n    1.33333,    // fovLeft\n    false        // tripleHead\n]\n```\n\nExample result with a triple 16:9 monitor setup:\n\n```sqf\n[\n    5760,        // width\n    1080,        // height\n    792,        // 2D viewport width\n    594,        // 2D viewport height\n    5.33333,    // aspect ratio\n    0.55        // UI scale\n]\n```\n\nExample result on a dedicated server:\n\n```sqf\n[\n    160,        // width\n    120,        // height\n    136,        // 2D viewport width\n    102,        // 2D viewport height\n    1.33333,    // aspect ratio\n    0.85        // UI scale\n]\n```","code":["private _res = getResolution;","[\n\t1920,\t\t// width\n\t1080,\t\t// height\n\t792,\t\t// 2D viewport width\n\t594,\t\t// 2D viewport height\n\t1.77778,\t// aspect ratio\n\t0.55,\t\t// UI scale\n\t0.75,\t\t// fovTop\n\t1.33333,\t// fovLeft\n\tfalse\t\t// tripleHead\n]","[\n\t5760,\t\t// width\n\t1080,\t\t// height\n\t792,\t\t// 2D viewport width\n\t594,\t\t// 2D viewport height\n\t5.33333,\t// aspect ratio\n\t0.55\t\t// UI scale\n]","[\n\t160,\t\t// width\n\t120,\t\t// height\n\t136,\t\t// 2D viewport width\n\t102,\t\t// 2D viewport height\n\t1.33333,\t// aspect ratio\n\t0.85\t\t// UI scale\n]"]}],"see_also":["getObjectFOV","worldToScreen","screenToWorld","safeZoneX","safeZoneY","safeZoneW","safeZoneH"],"notes":[{"user":"Tom_48_97","date":"2010-12-20T05:38:00Z","text":"This command can be useful to play a video (see this function BIS_fnc_playVideo) in the given format if you have compiled it for different UI scale."}]}