Convert TFT file to HMI

hello.
I am using Nextion 7inch LCD.
(NX8048P070)

I would like to change the LCD to 5 inches.
(NX8048P050)

There is a .TFT file to upload to NX8048P070.

When I upload this file to NX8048P050, it says that the model name is incorrect.

Is there a way to convert a TFT file suitable for NX8048P070 into an HMI file??

I think you just need to change the model name of the TFT file suitable for 7INCH to 5INCH.

Or can I open the TFT file and change it to the NX8048P050 model name???

That is not possible this way. The .TFT file is compiled with respect to specific hardware, and firmware entry points, not only the screen resolution.
You will need the original .HMI project file to load it into the Nextion editor. Then, you can change the screen model using the Device button in the top toolbar and compile a new, adapted .TFT file for your new device.

There is no hmi file.

Can’t I convert tft file to hmi?

You can’t. It’s like with Arduino or any other code. As long as you have the sources (.c and .h files for example, or .hmi for Nextion) you can modify these. But as soon as it is compiled (.hex for Arduino, .exe for Windows, .tft for Nextion), it’s immutable.

When a .tft file exists, the corresponding .hmi file from which the .tft file has been compiled must exist, too.