# Portrait to landscape

**URL:** <http://forum.squareline.io/t/portrait-to-landscape/4015>\
**Category:** Bugs\
**Created:** [November 20, 2024, 6:28am UTC](http://forum.squareline.io/t/portrait-to-landscape/4015 "2024-11-20T06:28:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasanthR3](http://forum.squareline.io/letter_avatar_proxy/v4/letter/p/df788c/32.png) [@prasanthR3](http://forum.squareline.io/u/prasanthR3)\
**Post date:** [November 20, 2024, 6:28am UTC](http://forum.squareline.io/t/portrait-to-landscape/4015/1 "2024-11-20T06:28:10Z")

</div>

I’m trying to rotate my display image from landscape to portrait. When this is done in the SLS project settings it works fine in the user interface but has no effect on the actual display.

[  
 ![err](https://github.com/user-attachments/assets/87faa9a2-d0ce-4b1c-a432-8f24e896a379)  
 ![image](https://github.com/user-attachments/assets/145748bd-e851-4fd2-af6a-e6332f8f0257)

]([https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-5#Modify\_the\_Driver](https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-5#Modify_the_Driver))

```auto
#define ESP_PANEL_LCD_WIDTH (480)  
#define ESP_PANEL_LCD_HEIGHT (800)

#define LVGL_PORT_ROTATION_DEGREE (90)

these macros are in [https://github.com/FCam1/waveshare_ESP32S3_TouchLCD4.3_Arduino](https://github.com/FCam1/waveshare_ESP32S3_TouchLCD4.3_Arduino)
______________________________________________________________________ -
//And this code is **lv_hal_disp.h** in lvgl src
// arduino lvgl library version - 8.3.11
//Sqline version - 8.3.11 
uint32_t direct_mode : 1; /**< 1: Use screen-sized buffers and draw to absolute coordinates*/
    uint32_t full_refresh : 1; /**< 1: Always make the whole screen redrawn*/
    uint32_t sw_rotate : 1; /**< 1: use software rotation (slower)*/
    uint32_t antialiasing : 1; /**< 1: anti-aliasing is enabled on this display.*/
    uint32_t rotated : 1; /**< 1: turn the display by 90 degree. @warning Does not update coordinates for you!*/
    uint32_t screen_transp : 1; /**Handle if the screen doesn't have a solid (opa == LV_OPA_COVER) background.
                                       * Use only if required because it's slower.*/

```

---

<div class="post-metadata">

**Author:** ![Hermit](http://forum.squareline.io/user_avatar/forum.squareline.io/hermit/32/971_2.png) [@Hermit](http://forum.squareline.io/u/Hermit)\
**Post date:** [November 20, 2024, 11:09am UTC](http://forum.squareline.io/t/portrait-to-landscape/4015/2 "2024-11-20T11:09:06Z")

</div>

You’ll need to make the rotation in realtime involving rotation-settings of the display-driver.

---

<div class="post-metadata">

**Author:** ![Richard](http://forum.squareline.io/user_avatar/forum.squareline.io/richard/32/1129_2.png) [@Richard](http://forum.squareline.io/u/Richard)\
**Post date:** [November 21, 2024, 8:01pm UTC](http://forum.squareline.io/t/portrait-to-landscape/4015/3 "2024-11-21T20:01:29Z")

</div>

If it helps, see: [Display interface — LVGL documentation](https://docs.lvgl.io/8.4/porting/display.html#rotation)
