My script seems to be taking a very long time to write to disk a .jpg file. The output should be about 1.5-2.0mb in size and shouldn't take more than a minute or two to write to disk.
Monitoring task manager, I notice Blender doing the following:
(a) before printing, Blender uses 40-50% of the CPU and about 1GB of RAM
(b) once printing starts, CPU usage drops to <1% and RAM balloons to 5GB.
def Print_image(outputfilepath,outputformat): for area in bpy.context.screen.areas: if area.type == 'VIEW_3D': space = area.spaces.active space.shading.type = 'RENDERED' bpy.context.scene.render.image_settings.file_format=outputformat bpy.context.scene.render.filepath = outputfilepath bpy.ops.render.render(use_viewport = True, write_still=True) ```