a utility for separating images for screen printing
Project description
# ColorSep
A utility for separating a single png (such as one produced by an [inkscape](https://inkscape.org/) export) into
separate per-color images such as might be useful for silk screen printing at a place like
[ooshirts](http://www.ooshirts.com).
## Features
The current feature set includes:
- separation into a specifiable number colors
- a "near pixel threshold" option for fuzzily matching colors that are close but not exactly what's expected
- a "white base" option to produce a white pixel under all active pixels of any color
- a specifiable alpha threshold beneath which all pixels will be discarded
## Requirements
Colorsep probably requires python 3. I'll gladly accept PRs to fix this and/or assertions to the contrary. I just
haven't tested it.
## Install
It should be as simple as `pip install colorsep` for python-friendly folks.
## Basic usage
To generate the images I needed to make my t-shirt, I ran this:
```colorsep --input resources/farm_scene.png --output-base output/output_ --num-colors=7 --base-white --near-pixel-threshold=100```
To get help:
```
$ colorsep --help
Usage: colorsep [OPTIONS]
Options:
--input TEXT input png
--output-base TEXT base name of output pngs
--alpha-threshold INTEGER on/off threshold for alpha
--num-colors TEXT use to set number of output colors
--base-white should all color be underlaid with white?
--near-pixel-threshold INTEGER tolerance for nearest-color computation
--help Show this message and exit.
$
```
A utility for separating a single png (such as one produced by an [inkscape](https://inkscape.org/) export) into
separate per-color images such as might be useful for silk screen printing at a place like
[ooshirts](http://www.ooshirts.com).
## Features
The current feature set includes:
- separation into a specifiable number colors
- a "near pixel threshold" option for fuzzily matching colors that are close but not exactly what's expected
- a "white base" option to produce a white pixel under all active pixels of any color
- a specifiable alpha threshold beneath which all pixels will be discarded
## Requirements
Colorsep probably requires python 3. I'll gladly accept PRs to fix this and/or assertions to the contrary. I just
haven't tested it.
## Install
It should be as simple as `pip install colorsep` for python-friendly folks.
## Basic usage
To generate the images I needed to make my t-shirt, I ran this:
```colorsep --input resources/farm_scene.png --output-base output/output_ --num-colors=7 --base-white --near-pixel-threshold=100```
To get help:
```
$ colorsep --help
Usage: colorsep [OPTIONS]
Options:
--input TEXT input png
--output-base TEXT base name of output pngs
--alpha-threshold INTEGER on/off threshold for alpha
--num-colors TEXT use to set number of output colors
--base-white should all color be underlaid with white?
--near-pixel-threshold INTEGER tolerance for nearest-color computation
--help Show this message and exit.
$
```
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
colorsep-0.0.3.tar.gz
(5.3 kB
view details)
Built Distribution
File details
Details for the file colorsep-0.0.3.tar.gz
.
File metadata
- Download URL: colorsep-0.0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c78071393343f19764f88746bf6c41a3cd3fe7e8d422717a88a0deaa966ef02d |
|
MD5 | f67ba7eef0d1dfe2cb355788c5e4c2b3 |
|
BLAKE2b-256 | f0c3984028809c56855e352dd2cfdd76d2ee8c06274f7d30ff9b6d8b4fffa48e |
File details
Details for the file colorsep-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: colorsep-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cac4cf271ada63a18fb12c83e331c864eae78611afc299fe02000a5985c0343 |
|
MD5 | 49619dd3ef6f2546fe1d6696a0f90830 |
|
BLAKE2b-256 | 112016e21280e4501bea376d94eabf742d3fc127542ec9b2bf9cf0f6f8a05c08 |