logo2cc
logo2cc is a Python library for converting images to black and white (no gray) for 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 logo2cc
or to install in editable mode:
pip install -e logo2cc
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)
Real-world demo: https://github.com/VerisimilitudeX/logo2cc-demo
How to Install and Use
-
Install
In your terminal, change directory (cd) into the location ofsetup.py, then run:pip install logo2cc
-
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)
Release files for logo2cc 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| logo2cc-0.1.5.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logo2cc-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / logo2cc-0.1.5.tar.gz
| Download URL | logo2cc-0.1.5.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d8e7d6cb188ee7d5ecd74baf73c715db5ac19856924058a4acd4250be3ebf95
|
|
BLAKE2b-256 checksum How to use checksums |
f3c24410227578cd4ac244ebbb01a7385956031fe4d7d30ad31d3c6b14b634a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.1
|
Release files / logo2cc-0.1.5-py3-none-any.whl
| Download URL | logo2cc-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d45d6a1aeef6e5e3b63c8de756e6001a3b43b1009997801664561d8413faaac
|
|
BLAKE2b-256 checksum How to use checksums |
936a087b6e4d48e2db49bc861d0a49f231e1cf0f0da19787697b6605082b20a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.1
|