{"id":3040,"date":"2025-11-12T11:24:50","date_gmt":"2025-11-12T04:24:50","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=3040"},"modified":"2025-11-12T11:24:50","modified_gmt":"2025-11-12T04:24:50","slug":"uiimage","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/ios\/images\/uiimage\/","title":{"rendered":"UIImage"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"uiimage\">UIImage<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"imagefiletype\">ImageFileType<\/h2>\n\n\n\n<p>\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e1a Support<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>enum ImageFileType: String {\n    case png = \".png\"\n    case jpg = \".jpg\"\n    case gif = \".gif\"\n    case video = \".video\"\n    case unknow = \"\"\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #0000FF\">enum<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #267F99\">ImageFileType<\/span><span style=\"color: #000000\">: String {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0070C1\">case<\/span><span style=\"color: #000000\"> png = <\/span><span style=\"color: #A31515\">&quot;.png&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0070C1\">case<\/span><span style=\"color: #000000\"> jpg = <\/span><span style=\"color: #A31515\">&quot;.jpg&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0070C1\">case<\/span><span style=\"color: #000000\"> gif = <\/span><span style=\"color: #A31515\">&quot;.gif&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0070C1\">case<\/span><span style=\"color: #000000\"> video = <\/span><span style=\"color: #A31515\">&quot;.video&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0070C1\">case<\/span><span style=\"color: #000000\"> unknow = <\/span><span style=\"color: #A31515\">&quot;&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>png<\/td><td>\u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 PNG<\/td><\/tr><tr><td>jpg<\/td><td>\u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 JPEG<\/td><\/tr><tr><td>gif<\/td><td>\u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 GIF<\/td><\/tr><tr><td>video<\/td><td>\u0e27\u0e35\u0e14\u0e35\u0e42\u0e2d<\/td><\/tr><tr><td>unknow<\/td><td>\u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e2d\u0e37\u0e48\u0e19\u0e46<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-overview\">Method Overview<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Return<\/th><\/tr><\/thead><tbody><tr><td>init()<\/td><td>\u0e01\u0e32\u0e23 Initial UIImage \u0e14\u0e49\u0e27\u0e22 base64 \u0e2b\u0e23\u0e37\u0e2d URL<\/td><td>void<\/td><\/tr><tr><td>jpgData()<\/td><td>\u0e01\u0e32\u0e23\u0e41\u0e1b\u0e25\u0e07\u0e20\u0e32\u0e1e\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e47\u0e19 Data \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19\u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 JPEG<\/td><td>Optional(Data)<\/td><\/tr><tr><td>base64()<\/td><td>\u0e01\u0e32\u0e23\u0e41\u0e1b\u0e25\u0e07\u0e20\u0e32\u0e1e\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e47\u0e19 base64<\/td><td>Optional(String)<\/td><\/tr><tr><td>rotate()<\/td><td>\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e20\u0e32\u0e1e\u0e44\u0e14\u0e49\u0e41\u0e1a\u0e1a\u0e2d\u0e34\u0e2a\u0e23\u0e30\u0e14\u0e49\u0e27\u0e22\u0e21\u0e38\u0e21 Radians \u0e2b\u0e23\u0e37\u0e2d Degree<\/td><td>Optional(UIImage)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-details\">Method Details<\/h2>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>convenience init?(base64: String)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">convenience<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">init<\/span><span style=\"color: #000000\">?(<\/span><span style=\"color: #001080\">base64<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #267F99\">String<\/span><span style=\"color: #000000\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e32\u0e23 Initial UIImage \u0e14\u0e49\u0e27\u0e22 base64<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters\">Parameters<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>base64<\/td><td>base64 \u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e17\u0e33\u0e21\u0e32\u0e2a\u0e23\u0e49\u0e32\u0e07 UIImage<\/td><td>String<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>convenience init?(url: URL)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">convenience<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">init<\/span><span style=\"color: #000000\">?(<\/span><span style=\"color: #001080\">url<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #267F99\">URL<\/span><span style=\"color: #000000\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e32\u0e23 Initial UIImage \u0e14\u0e49\u0e27\u0e22 URL<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-1\">Parameters<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>url<\/td><td>url \u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e17\u0e33\u0e21\u0e32\u0e2a\u0e23\u0e49\u0e32\u0e07 UIImage<\/td><td>URL<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>func jpgData(compressionQuality: CGFloat = 0.5) -> Data?<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">func<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">jpgData<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">compressionQuality<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">CGFloat<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #098658\">0.5<\/span><span style=\"color: #000000\">) -&gt; <\/span><span style=\"color: #001080\">Data<\/span><span style=\"color: #000000\">?<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e41\u0e1b\u0e25\u0e07\u0e20\u0e32\u0e1e\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e47\u0e19 Data \u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19\u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 JPEG<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-2\">Parameters<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>compressionQuality<\/td><td>\u0e04\u0e38\u0e13\u0e20\u0e32\u0e1e\u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23 Compress \u0e41\u0e25\u0e49\u0e27<\/td><td>CGFloat<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns\">Returns<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Optional(Data)<\/td><td>Return Data \u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17 JPEG \u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e17\u0e33\u0e01\u0e32\u0e23 Compress \u0e41\u0e25\u0e49\u0e27<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>func base64(type: ImageFileType = .png) -> String?<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">func<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">base64<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">type<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">ImageFileType<\/span><span style=\"color: #000000\"> = .<\/span><span style=\"color: #001080\">png<\/span><span style=\"color: #000000\">) -&gt; <\/span><span style=\"color: #001080\">String<\/span><span style=\"color: #000000\">?<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e41\u0e1b\u0e25\u0e07\u0e20\u0e32\u0e1e\u0e43\u0e2b\u0e49\u0e40\u0e1b\u0e47\u0e19 base64<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-3\">Parameters<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>type<\/td><td>\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19 base64<\/td><td>ImageFileType<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns-1\">Returns<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Optional(String)<\/td><td>Return String base64 \u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>func rotate(radians: Float) -> UIImage?<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">func<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">rotate<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">radians<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">Float<\/span><span style=\"color: #000000\">) -&gt; <\/span><span style=\"color: #001080\">UIImage<\/span><span style=\"color: #000000\">?<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e20\u0e32\u0e1e\u0e44\u0e14\u0e49\u0e41\u0e1a\u0e1a\u0e2d\u0e34\u0e2a\u0e23\u0e30\u0e14\u0e49\u0e27\u0e22\u0e21\u0e38\u0e21 Radians<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-4\">Parameters<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>radians<\/td><td>\u0e21\u0e38\u0e21\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e20\u0e32\u0e1e<\/td><td>Float<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns-2\">Returns<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Optional(UIImage)<\/td><td>Return UIImage \u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e41\u0e25\u0e49\u0e27<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>func rotate(degree: Float) -> UIImage?<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">func<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">rotate<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">degree<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">Float<\/span><span style=\"color: #000000\">) -&gt; <\/span><span style=\"color: #001080\">UIImage<\/span><span style=\"color: #000000\">?<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e20\u0e32\u0e1e\u0e44\u0e14\u0e49\u0e41\u0e1a\u0e1a\u0e2d\u0e34\u0e2a\u0e23\u0e30\u0e14\u0e49\u0e27\u0e22\u0e21\u0e38\u0e21 Degree<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-5\">Parameters<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>degree<\/td><td>\u0e21\u0e38\u0e21\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e20\u0e32\u0e1e<\/td><td>Float<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns-3\">Returns<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Optional(UIImage)<\/td><td>Return UIImage \u0e02\u0e2d\u0e07\u0e20\u0e32\u0e1e\u0e17\u0e35\u0e48\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2b\u0e21\u0e38\u0e19\u0e41\u0e25\u0e49\u0e27<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"featured_media":0,"parent":3037,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-3040","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=3040"}],"version-history":[{"count":1,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3040\/revisions"}],"predecessor-version":[{"id":3041,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3040\/revisions\/3041"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3037"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=3040"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=3040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}