I am trying to render and save multiple images through python script in blender. I know how to render and save the image through the Blender GUI but I want to do it all through
import bpy
bpy.context.scene.render.filepath = 'pathToOutputImage'
bpy.context.scene.render.resolution_x = w #perhaps set resolution in code
bpy.context.scene.render.resolution_y = h
bpy.ops.render.render()