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
Metadata
Release files for streamlit-cropperjs 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| streamlit-cropperjs-0.0.9.tar.gz | 369.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| streamlit_cropperjs-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 743.3 kB
Release files / streamlit-cropperjs-0.0.9.tar.gz
| Download URL | streamlit-cropperjs-0.0.9.tar.gz |
|---|---|
| Size | 369.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8d8c08d3e8d71818736ff1f2e0b890b75f66eb87edd10af9a7731d06e1b38697
|
|
BLAKE2b-256 checksum How to use checksums |
471a092207a2a6523d88ade6b5154f224a840f212d2858f106c3420b3c40fe6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.5
|
Release files / streamlit_cropperjs-0.0.9-py3-none-any.whl
| Download URL | streamlit_cropperjs-0.0.9-py3-none-any.whl |
|---|---|
| Size | 373.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
057bd73d12c48628ceb4e99c396fe8c8ce626f0a510327d99f259a6978f3cfc5
|
|
BLAKE2b-256 checksum How to use checksums |
70c751e075dee6143c4336199e9ad7c4dd7e15147530fd7c60bf161b74ea76e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.5
|