This way the background is optional and the user won't have to wait for the background to be regenerated each time they export to a different type; it is done once globally.
Also implemented a progress bar (same bar as exportToDataPNG and exportToCSV) so the user knows how long it takes until the background layer generation is completed without freezing the user interface (previously they'd have to open the console to see progress, and the UI would be frozen until it completed).
Note: In order to prevent UI lockup, needed to switch the implementation of the pixel iterator from the nested for loop to the doChunk() method that the OG pixel devs implemented.
Fixed my formatting to better match the style of the existing code.
This way the background is optional and the user won't have to wait for the background to be regenerated each time they export to a different type; it is done once globally.
Also implemented a progress bar (same bar as exportToDataPNG and exportToCSV) so the user knows how long it takes until the background layer generation is completed without freezing the user interface (previously they'd have to open the console to see progress, and the UI would be frozen until it completed).
Fixed my formatting to better match the style of the existing code.