What @bildwerk suggests is the correct way now. In 2021.3 the
Renderer (Offscreen) node was marked as experimental and did a software rendering - the returned Skia image was stored in CPU memory. In 2021.4 we changed that node to use hardware accelerated rendering - the returned Skia image is backed by GPU memory. However that GPU memory is context specific. Skia and Stride use different contexts, therefor a read access to such GPU backed images (
DrawImage) will fail if accessed from a context different to the one it was created in. The solution is to first download that image to CPU memory (using the
ToRasterImage node) which can then be accessed by the other contexts as well. Watch out that you’ll find two
ToRasterImage nodes in the node browser, please use the process node as it will control the image’s lifetime in a deterministic way and not leave it to the garbage collector to clean it up.
The download from GPU to CPU will probably incur a rather heavy performance hit. So depending on the image size it might not be a viable solution for you. If that is the case we’ll need to think of other solutions.