If you are using the Viewer and brightness/contrast list, you haven’t applied a function to the images at all. QuPath doesn’t really have much in the way of image adjustment functions, it is just your view of them that changes.
If you want to create a new image, as above, you need to have the visualization you want selected, and then export the image in the File->Export images section. I used Rendered RGB to get the object layer included.
I’m not sure there is a way to do that by script at the moment. I wanted to do something similar a month or two ago and Pete recommended leaving the command list function open so I could go from image to image exporting relatively quickly.
It could be that this has changed in the intervening time, and Pete might jump in with a way to do it, but I’m afraid that’s all I have. OME-TIFF export for whole slide images using color deconvolved channels is another function that would be neat to have, but there just isn’t enough development time for everything, and he only just got funded a week or two ago! More to come.