Skip to main content

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

  1. Clone this repository or download the files.

  2. 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

  1. Install
    In your terminal, change directory (cd) into the location of setup.py, then run:

    pip install logo2cc
    
  2. 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)

Source distribution for logo2cc 0.1.5
File Size Uploaded
logo2cc-0.1.5.tar.gz 3.2 kB Details

Built distribution (wheel)

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

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.0

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