Convert images to black and white (no gray) to use as custom logos on Stripe credit cards.
Project description
logo2cc
A PyPi library to convert images to black and white (no gray) to use as custom logos on Stripe credit cards.
Processing Pipeline: Applies a slight Gaussian blur, resizes it to fit a maximum dimension of 1000×200 pixels, and centers it on a white canvas.
Installation
-
Clone this repository or download the files.
-
In the same directory as
setup.py, run:pip install .
or to install in editable mode:
pip install -e .
Usage
from logo2cc.converter import convert_to_black_and_white
# Convert an image to black & white and save it
convert_to_black_and_white("input_image.png", "output_image.png", threshold=128)
How to Install and Use
-
Install
In your terminal, change directory (cd) into the location ofsetup.py, then run:pip install .
-
Import and Call
In your Python script or REPL:from logo2cc.converter import convert_to_black_and_white convert_to_black_and_white("input.png", "output.png", threshold=128)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 logo2cc-0.1.0.tar.gz.
File metadata
- Download URL: logo2cc-0.1.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fee46a56840d4f34c0b11c97869d3f04efcd48f0ba010cb646107eb946a9d67
|
|
| MD5 |
46bfcf02648dad5657ff54d830f739ed
|
|
| BLAKE2b-256 |
7c13e119906365bc85a8c12e2c47c7e9ba9a6246194086cc504d14a85496426f
|
File details
Details for the file logo2cc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: logo2cc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5907850b1f501aeb4439ab72539161469ba578fadeb75c4fc1a23117c686baa8
|
|
| MD5 |
d1b7c9250ff2dd8e2a49807eaa8a9255
|
|
| BLAKE2b-256 |
6e45af66b044714da169c7a00e375434eedd5dd2ef60afcd34e3debf4dabaa28
|