andfanilo / streamlit-drawable-canvas

Do you like Quick, Draw? Well what if you could train/predict doodles drawn inside Streamlit? Also draws lines, circles and boxes over background images for annotation.
https://drawable-canvas.streamlit.app/
MIT License
544 stars 83 forks source link

canvas size #74

Closed RoutineZ closed 1 year ago

RoutineZ commented 2 years ago

what is max canvas width size?, I want to set big as much as possible, but it looks like max width size is 700? canvas_result = st_canvas( fill_color="rgba(255, 165, 0, 0.3)", # Fixed fill color with some opacity stroke_width=stroke_width, stroke_color=stroke_color, background_color=bg_color, background_image=Image.open(bg_image) if bg_image else None, update_streamlit=realtime_update, height = 720, width = 1280, drawing_mode=drawing_mode, point_display_radius=point_display_radius if drawing_mode == 'point' else 0, key="canvas", )

andfanilo commented 2 years ago

Hi @RoutineZ

It's possible your canvas size is limited by the width of the Streamlit container. Does 1280px work with your Streamlit being in wide mode? _you can change that in the Streamlit hamburger menu or set_pageconfig(layout="wide") https://docs.streamlit.io/library/api-reference/utilities/st.set_page_config