Skip to main content

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

  1. Clone this repository or download the files.

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

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

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

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

logo2cc-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

logo2cc-0.1.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

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

Hashes for logo2cc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1fee46a56840d4f34c0b11c97869d3f04efcd48f0ba010cb646107eb946a9d67
MD5 46bfcf02648dad5657ff54d830f739ed
BLAKE2b-256 7c13e119906365bc85a8c12e2c47c7e9ba9a6246194086cc504d14a85496426f

See more details on using hashes here.

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

Hashes for logo2cc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5907850b1f501aeb4439ab72539161469ba578fadeb75c4fc1a23117c686baa8
MD5 d1b7c9250ff2dd8e2a49807eaa8a9255
BLAKE2b-256 6e45af66b044714da169c7a00e375434eedd5dd2ef60afcd34e3debf4dabaa28

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