After rendering using bpy.ops.render.render() to render the image. How do I store it directly to an nd array without actually saving the image and loading it back.
I noticed that after rendering. There is an image object bpy.data.images['Render Result'] which has values but they are mostly empty. I suppose blender immediately flushes all these objects after rendering and makes zero. But, interestingly I am able to use bpy.data.images['Render Result'].save_render('imagepath.ext') and this saves the image which is actually the rendered result. But let's say if I access bpy.data.images['Render Result'].size or pixels etc, all are empty. It is not the case for other images like image textures which I add. As far as I can understand, this implies that blender flushes every other object value like pixels, size of 'Render Result' except save_render.
I know there is a way using viewer node but this requires the GUI to be open. I am trying to render a huge database and I cannot have the gui open. I would like to run this on a server through SSH.
Is there a way to directly save the rendered result to a ndarray rather than saving the image?