I am trying to build a python script that places a image as plane object (add-on) programmatically in function of the resolution of the camera.
There are two cases :
1- The image ratio and the camera ratio are the same so i want to place the image as plane so that when i render the scene the image takes full space of the frame.
2- The image ratio of the image is different so i want to place the image as plane so that the camera points to the center of the image and takes a part of the image so that the rendering takes full space of the frame.
If you have any idea of how to do it, i ll be great help.