fusebead
Turn a photo into a fuse-bead pattern: a pegboard grid, the nearest bead color, a printable PNG, and a color-count chart.
Color matching follows the ROCKIMG fuse-bead pattern maker: sRGB to CIE Lab, CIE76 distance, the same brightness and contrast sliders, and the same three palettes.
Perler, Hama, and Artkal are trademarks of their owners. This package is not affiliated with those brands. Palette RGB values are the approximations used by the website, not official manufacturer color cards.
Install
pip install fusebead
From a checkout of this repository:
pip install -e packages/fusebead
Requires Python 3.9+ and Pillow.
Library
from fusebead import Pattern
pattern = Pattern.from_image(
"cat.png",
palette="perler", # perler, hama, or artkal
grid_width=50, # max pegs on the long side; aspect ratio is kept
grid_height=50,
brightness=0, # website slider range is -80..80
contrast=0,
remove_background=True,
)
pattern.save_png("pattern.png")
pattern.save_csv("beads.csv")
pattern.width, pattern.height
pattern.total
pattern.cell(0, 0) # BeadColor or None when the background was removed
pattern.entries[0].color.code
pattern.entries[0].count
Phone photos are rotated with EXIF orientation before sampling. The website canvas does not do that step.
Command line
fusebead cat.png -o pattern.png --csv beads.csv --palette hama --width 40 --height 40 --remove-bg
--no-grid draws beads flush. --bead-size sets the peg diameter in pixels. By default the PNG width follows the source image, capped at 1000 pixels, and each peg is at least 4 pixels.
Metadata
Release files for fusebead 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fusebead-0.1.0.tar.gz | 12.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fusebead-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / fusebead-0.1.0.tar.gz
| Download URL | fusebead-0.1.0.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4be6812357989a45488918b94fe99953be4f194e9cf21d7f4e69516159298384
|
|
BLAKE2b-256 checksum How to use checksums |
cc2edeb6189fe7ed8e14ca30125839e9462e1a9900e30aa42e936df36be34dca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.3
|
Release files / fusebead-0.1.0-py3-none-any.whl
| Download URL | fusebead-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bfccfd5ea1a1402f8e258a8bbfbc7d32027bddba534f0fc91b0de2c5365f62f
|
|
BLAKE2b-256 checksum How to use checksums |
e8f0d590aaa0e78466c5254ed390019dad8961ade3497bbeb17cb079610c0c82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.3
|