Skip to main content

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

https://github.com/fengyuanchen/cropperjs

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)

Source distribution for streamlit-cropperjs 0.0.9
File Size Uploaded
streamlit-cropperjs-0.0.9.tar.gz 369.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-cropperjs 0.0.9
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page