Closed sbesson closed 2 months ago
Tested locally, exporting a figure containing big SVS image panels at various zoom levels, using the export to "PDF and Images" to generate a zip containing the original rendered images. All images were the same size testing with/without this PR except where the image was over 3k x 3k. E.g. without this PR an image was exported at 6062 × 2853 pixels, but with this PR it was 3031 × 1426.
The logic selecting the best resolution for the export can select a plane as large as omero.client.download_as.max_size. With a default value of 144000000, this means regions as wide as 12k x 12k can be requested to the server.
This commit proposes to use the max plane width and height instead to select the appropriate resolution level. Both configurations default to 3k and are already used for identifying an image as "big" and navigating through the resolution levels.
This PR should be tested by running the figure export workflow on a large pyramidal images. Adjust the zoom so that the width & height is in the 3k-10k range and run the figure export script. The server logs should include the arguments passed to the
rednderCompressed
API e.g.With this change included, using the same OMERO.figure configuration, the export script should select a smaller resolution level with
width
andheight
both being smaller than 3k by default e.g.As a side-effect, this significantly reduces the size of the exported PDF