I run this code but the screen deos not work and stays like this

// This example renders a png file that is stored in a FLASH array
// using the PNGdec library (available via library manager).

// Include the PNG decoder library
#include <PNGdec.h>
#include “panda_png.h” // Image is stored here in an 8 bit array
PNG png; // PNG decoder inatance

#define MAX_IMAGE_WDITH 420 // Adjust for your images

int16_t xpos = 0;
int16_t ypos = 0;

// Include the TFT library GitHub - Bodmer/TFT_eSPI: Arduino and PlatformIO IDE compatible TFT library optimised for the Raspberry Pi Pico (RP2040), STM32, ESP8266 and ESP32 that supports different driver chips
#include “SPI.h”
#include <TFT_eSPI.h> // Hardware-specific library
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library

//====================================================================================
// Setup
//====================================================================================
void setup()
{
Serial.begin(115200);
Serial.println(“\n\n Using the PNGdec library”);

// Initialise the TFT
tft.begin();
tft.fillScreen(TFT_BLACK);
Serial.println(“\r\nInitialisation done.”);
}

//====================================================================================
// Loop
//====================================================================================
void loop()
{
int16_t rc = png.openFLASH((uint8_t *)panda_png, sizeof(panda_png), pngDraw);
if (rc == PNG_SUCCESS) {
Serial.println(“Successfully png file”);
Serial.printf(“image specs: (%d x %d), %d bpp, pixel type: %d\n”, png.getWidth(), png.getHeight(), png.getBpp(), png.getPixelType());
tft.startWrite();
uint32_t dt = millis();
rc = png.decode(NULL, 0);
Serial.print(millis() - dt); Serial.println(“ms”);
tft.endWrite();
// png.close(); // not needed for memory->memory decode
}
delay(3000);
tft.fillScreen(random(0x10000));
}

//=========================================v==========================================
// pngDraw
//====================================================================================
// This next function will be called during decoding of the png file to
// render each image line to the TFT. If you use a different TFT library
// you will need to adapt this function to suit.
// Callback function to draw pixels to the display
void pngDraw(PNGDRAW *pDraw) {
uint16_t lineBuffer[MAX_IMAGE_WDITH];
png.getLineAsRGB565(pDraw, lineBuffer, PNG_RGB565_BIG_ENDIAN, 0xffffffff);
tft.pushImage(xpos, ypos + pDraw->y, pDraw->iWidth, 1, lineBuffer);
}


i run this code but the screen deos not work and stays like this

LVGL have native png support, and you dont report MCU info and image size.
PNG is normal decoded into RAM PNG decoder — LVGL documentation

the problem is that it doesnt even turn on the light

Then first the display-driver and backligth-wiring should be checked, LVGL and SquareLine Studio doesn’t handle backlight control, it’s up to your soldering and code.