Hey guys , is it possible to resize st.image’s height too ?
When you resize the width, the height will automatically adjust to keep the image proportional – so you can resize the height by just resizing the width.
Hey @Caroline ,
exactly , but I want to adjust the aspect-ratio so that the image is 16:9 , is there a way to do that ?
Hi @AYMEN_GADRI - you can use
w, h = Image.open(your_media_file).size from the
PIL package to then compute the correct width for a 16:9 aspect ratio, which you pass to
hey @asehmi ,
Thank you , that’s what I did and it worked .
Thank you guys