Use viewer gamma in RenderedImageServer by Rylern · Pull Request #1849 · qupath/qupath
Interesting! I didn't imagine it would be so simple... I also didn't imagine getGammaOp() would be a public method in the viewer. I'm not sure it should be a public method, but it is, so this looks like a good fast solution for now.
Minimal example script to document use:
def path = buildPathInProject("rendered.png") writeRenderedImage(getCurrentViewer(), path)
I confirm it applies the gamma to the image, while the overlay is unchanged.