turner-anderson / streamlit-cropper

A simple image cropper for Streamlit
MIT License
180 stars 26 forks source link

Position of the cropper #18

Open benjamin-taheri opened 1 year ago

benjamin-taheri commented 1 year ago

Is it possible to place the cropper in the st.columns()? Or adjust the position of the thumbnail also on the right of the original image?

JPereira-FJB commented 1 year ago

Additionally, the cropper doesn't seem to be responsive. When placing the copper in a column, and decreasing the width of the page, the cropper itself is ... well ... cropped!

turner-anderson commented 11 months ago

I think the most recent release makes the cropper work a little nicer with columns. The biggest remaining issue is that the cropper doesn't have awareness of the container size streamlit has set up for it before drawing the canvas. By default, I resize all images to no more than the 700x700, but this should probably be something like 350x700 if in 2 columns, and so on. That said, for now the best way to handle this is if you want the image in a column you could resize yourself before passing so that it's no larger than a certain size.