Skip to content

Commit 7acefb5

Browse files
committed
docs: add release notes for the image rendering performance improvements
Assisted-by: Claude Opus 5.5
1 parent 54de849 commit 7acefb5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎doc/release_notes/release_2.12.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
* **Images on high-DPI screens** — With a display scaling factor such as 125 %, 150 % or 200 %, images were rendered at the resolution of the plot canvas and then upscaled to the screen resolution: with a 200 % scaling, images were shown with half the resolution of the screen, and with a 125 % scaling, one screen pixel row and column out of five were duplicated, which made fine image details (e.g. noise, thin lines) look irregular. Images are now rendered at the resolution of the screen; printing and exporting are not affected. Rendering images at the screen resolution takes more time: for a 2000 × 2000 image shown in a 700 × 700 plot, about 8 ms instead of 7 ms with a 125 % scaling and 19 ms instead of 7 ms with a 200 % scaling (104 ms instead of 28 ms with the anti-aliasing interpolation). The new `image/device_resolution` option of the `plot` configuration section restores the previous behavior
88
* **Raw image items** — `RawImageItem` objects were not drawn: each redraw failed with `ValueError: Invalid destination rectangle (expected tuple of 4 integers)`
99

10+
⚡ Performance:
11+
12+
* **Moving shapes over images** — Moving or resizing a shape, a marker, a cursor or an annotation over an image, or drawing a new shape, rendered the image again for each mouse move, although it did not change. The previous rendering of the image is now drawn again instead, unless the image itself, the plot axes or the plot size change: with a 2048 × 2048 image, each mouse move takes about 4 ms instead of 7 to 68 ms depending on the interpolation, and about 10 ms instead of 17 to 175 ms with a 200 % display scaling (see the `plotpy/tests/benchmarks/test_image_interaction.py` benchmark). The new `BasePlot.replot_overlays` method redraws a plot in this way, when only items drawn over images have changed: image items whose `draw_image` method is decorated with `plotpy.items.image.base.reusable_rendering` draw their previous rendering again. As before, any other change of an image item (data, mask, contrast, colormap, ...) must be followed by `BasePlot.replot` or `BasePlot.invalidate`
13+
* **Masked images** — The mask of masked images (`MaskedImageItem`, `MaskedXYImageItem`) is no longer rendered when it is not visible, i.e. when no pixel is masked and the unmasked area is transparent (default): rendering a masked image without masked pixels, e.g. while panning or zooming, is up to 25 % faster
14+
1015
## PlotPy Version 2.12.0 ##
1116

1217
✨ New features:

0 commit comments

Comments
 (0)