Closed damladalgic closed 11 months ago
Could you see if this still happens on the version most recently pushed?
Could you see if this still happens on the version most recently pushed?
Yes it done.
Odd, I can't replicate the behavior. Could you give me a few more details on the environment and possibly how you're calling the cropper or whether you're using it in one of the streamlit container objects? You could try creating a new environment and pip installing streamlit-cropper, then copying app.py and seeing if that works as expected.
Here's my environment:
Windows 10 Python 3.11.1 Streamlit 1.16.0 streamlit-cropper 0.2.1 Chrome, Firefox and Edge browsers tested
Sure Here's my environment: Ubuntu (AWS EC2 Server) Python 3.8.15 streamlit 1.16.0 streamlit-cropper 0.2.0 and 0.2.1 (both tested) Chrome tested
This issue persisted in 2 different conda environments.
I believe image size has something to do with it. Most of the images I used only have this white area in "Wide Mode". The following image has it on both settings. WIDE MODE:
WITHOUT WIDE MODE:
So from what I can tell this happens because Streamlit dynamically stretches the container that the image is in, it's especially noticeable if your computer/browser is in dark mode, because the canvas doesn't know to fill with black. I'm trying to figure out a way to force the component to not resize, but it may take some time.
Yes that is probably what's happening. I don't think theres any need to spend ample time on this. It is seamless in light mode. Thanks a lot for this library !
Exciting news, I think I fixed it on the latest release.