A streamlit module integrating cropperjs
Project description
Streamlit-cropperjs
Integrating the amazing cropperjs with streamlit.
This streamlit module is primarily built with mobile usage in mind.
Demo
Access the demo app here: https://st-cropperjs.streamlit.app/
Installation
pip install streamlit-cropperjs
Example
import streamlit as st
from streamlit_cropperjs import st_cropperjs
pic = st.file_uploader("Upload a picture", key="uploaded_pic")
if pic:
pic = pic.read()
cropped_pic = st_cropperjs(pic=pic, btn_text="Detect!", key="foo")
if cropped_pic:
st.image(cropped_pic, output_format="PNG")
Features
- Crop and return image data
- Supports touch (mobile)
- Supports cropping on demand with a button (customised button text)
Future Development
- Support for all cropperjs options
- Support for cropperjs v2
References
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit-cropperjs-0.0.9.tar.gz
(369.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamlit-cropperjs-0.0.9.tar.gz.
File metadata
- Download URL: streamlit-cropperjs-0.0.9.tar.gz
- Upload date:
- Size: 369.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d8c08d3e8d71818736ff1f2e0b890b75f66eb87edd10af9a7731d06e1b38697
|
|
| MD5 |
6f6867c6803352a0fbf3da9db52e498d
|
|
| BLAKE2b-256 |
471a092207a2a6523d88ade6b5154f224a840f212d2858f106c3420b3c40fe6c
|
File details
Details for the file streamlit_cropperjs-0.0.9-py3-none-any.whl.
File metadata
- Download URL: streamlit_cropperjs-0.0.9-py3-none-any.whl
- Upload date:
- Size: 373.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
057bd73d12c48628ceb4e99c396fe8c8ce626f0a510327d99f259a6978f3cfc5
|
|
| MD5 |
a1c17e74a0a73e775a5d1f1d2d5b5611
|
|
| BLAKE2b-256 |
70c751e075dee6143c4336199e9ad7c4dd7e15147530fd7c60bf161b74ea76e5
|