Using GPT to reset image's contrast settings after applying Sea Mask

I’m using GPT to process images. After using the Land-Sea-Mask operator, the image’s contrast changes. There doesn’t seem to be a way to disable this behavior in the operator’s arguments, so the only way might be to manually set the contrast to the min and max values of the original image.

How do I do this without using the GUI? After manually setting the contrast and saving it as a new GeoTIFF-BigTIFF, the GUI app opens it with the set contrast. However, when I look at the metadata and processing graph, no meaningful changes were made, I don’t know how this change is represented.

Remote sensing workflows generally separate data manipulation and visualization. GPT is primarily a data manipulation tool. You can use ESA SNAP snappy to reproduce visualizations done using the GUI. In the past I have done that for batch processing workflows involving 100’s of images because I had NASA NetCDF4-CF data that was not yet supported by the GIS packages available at the time.
See: Export Bands as Images

GIS packages have a much wider user and developer base than ESA SNAP and put more emphasis on visualization, so may now be a more effective tool for visualization.