You can reduce the size of the PNG files you import into the Nextion by using a program called PNGCRUSH. This program shrinks the size of PNG files via two methods. First, it can remove optional meta data from the file. Second, it can try 113 different compression methods and select the smallest one.
The web page for the program is pngcrush at sourceforge
However, at least for Windows, I would recommend installing the Gnu Win PngUtils . The installer from the pngcrush webpage for Windows was incomprehensible, but with the Gnu Win PngUtils it is straightforward.
You can see what options are available by typing in the command line:
pngcrush --help
Here is is the command line I use:
pngcrush -d …\crushed -brute -fix -force -l 9 -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text -rem time *.png
Even with the -brute option (try all 111 compression algorithms, it runs very fast). Without the -brute option, the program will use heuristic methods to try a few algorithms it thinks will work best – this works pretty well.
For example, I had one directory of 123 images, total size 1.04 MB. After crushing without -brute, the size reduced to 848 KB. After crushing with -brute, it was further reduced to 448 KB.
In another example, I had a directory of 114 images, total size 23.7 MB. After crushing (with -brute), the size reduced to 21.7 MB.