Open DanielChuDC opened 4 years ago
The python-docx , r.add_picture function allow to resize with cm and inch
python-docx
r.add_picture
cm
inch
If we input the certain value, the picture may looks flat or out of shape depend on the content.
Need a additional function that detect the image ratio (such as rectangle or square) and resize the image in ratio of 4
https://stackoverflow.com/questions/273946/how-do-i-resize-an-image-using-pil-and-maintain-its-aspect-ratio
https://auth0.com/blog/image-processing-in-python-with-pillow/
https://towardsdatascience.com/how-to-resize-images-using-python-8aaba74602ed
The
python-docx
,r.add_picture
function allow to resize withcm
andinch
If we input the certain value, the picture may looks flat or out of shape depend on the content.
Need a additional function that detect the image ratio (such as rectangle or square) and resize the image in ratio of 4