I‘d say that Nextion is just way too slow for such a thing. In theory, if you were running native code, then it could be possible. But since you‘re running on top of the Nextion Interpreter you‘re hit by a severe performance loss (executing a single variable assignment takes >3000 clock cycles or 78us f.ex.). This is btw the reason why I have such a strong dislike for the default argument against new features: „it can [already] be done“ (often said by Patrick to tell people to implement things thenselves in the Nextion language instead them being added to the Nextion firmware). My reply to that is yes, it can be done, but there are >3000 reasons why it shouldn‘t be done.
Aaaanyways, sorry for the tangent. I do indeed have some code that renders a graphic to the screen. It does however involve quite some math per pixel so it is not exactly representative for your case. I limited the resolution to 8x8 pixels per rendered pixel to keep the rendering to a reasonable time (and because that resolution was sufficient for my case).
Code should be easy enough to understand without great explanations
Kind regards,
Max