Skip to main content

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.

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

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.6.tar.gz (369.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_cropperjs-0.0.6-py3-none-any.whl (375.0 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-cropperjs-0.0.6.tar.gz.

File metadata

  • Download URL: streamlit-cropperjs-0.0.6.tar.gz
  • Upload date:
  • Size: 369.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for streamlit-cropperjs-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0c11098b78004893d36c27a91930278df01e49ef9303f7dffb92f143330d57dd
MD5 1795e3afec4af665e97a3031373cfc3b
BLAKE2b-256 192c84a0a2fb4dfeb329ab7feea12672d04d37dc647365e725b60a3aae214ea2

See more details on using hashes here.

File details

Details for the file streamlit_cropperjs-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_cropperjs-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 dbd2b49f1020e77560ff65d61c622ae249343794f3976730ce101336af0b1795
MD5 e1726b31e23e2001677e4969c19030eb
BLAKE2b-256 1e1a7b2a44d513216b7cf9776d78f6815fc5af09ddd715ef6fecb097a397b6f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page