Convert images into Unknown Pleasures-style waveform art.
Project description
unknown-pixels
unknown-pixels is a simple Python command-line tool that transforms images into waveform art reminiscent of Joy Division's Unknown Pleasures album cover.
Unknown-pixels first converts the input image to grayscale, then (if necessary) it will pad the image along the smallest axis to make the image square. It then slices the image into nlines horizontal slices and renders each slice as a stylised "waveform", creating a unique visual representation of the original image.
Installation
Ensure you have Python 3.8 or higher installed. Then, install unknownpixels using pip:
pip install unknownpixels
Or clone the repo and run
pip install .
in the root of the repository to get the latest "development" version.
Usage
After installation, use the unknown-pixels command:
unknown-pixels --input path/to/image.jpg
This will process the input image and automatically show the waveform representation of the image.
Options
-i,--input: Path to the input image file. This image can be in any PIL-compatible format.-o,--output: [Optional] Path to the output file. If not specified, the output will be saved to the same directory as the input file with a .png extension.-n,--nlines: [Optional] Number of lines to render along the y-axis. Default is 50.-f,--figsize: [Optional] Size of the figure to create. Default is (8, 8).-t,--title: [Optional] Title to add to the image. Default is no title.-p,--preview: [Optional] Show a preview of the input image after some processing.-l,--log: [Optional] Whether to log scale the input image. Default is False.-v,--vmax: [Optional] Maximum value to use for the image. Default is None.-V,--vmin: [Optional] Minimum value to use for the image. Default is None.-c,--contrast: [Optional] The contrast defining the height of the peaks in the waveform. A contrast of 5 will place the maximum peak 5 lines above the flat minimum value. Default is 10.-r,--smooth: [Optional] Radius of the Gaussian smoothing kernel. Default is None.-P,--perspective: [Optional] Add a false perspective effect. Default False.--version: Print the current version.--help: Show a help message and exit.
Example:
unknown-pixels -i path/to/image.jpg -n 50 -t "Joy Division" -c 10
License
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unknown_pixels-0.3.2b0.tar.gz.
File metadata
- Download URL: unknown_pixels-0.3.2b0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81255e1f21ee158de1152d9c8f9afa297d5524a619a86968168c93d7c0ee1940
|
|
| MD5 |
7ae685e5d658acab7f073ee33c67a90c
|
|
| BLAKE2b-256 |
d31413d82a3e686d790aea21238b2573d6cfae8a25710250ee280d6f8d085a1e
|
Provenance
The following attestation bundles were made for unknown_pixels-0.3.2b0.tar.gz:
Publisher:
deploy.yml on WillJRoper/unknown-pixels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unknown_pixels-0.3.2b0.tar.gz -
Subject digest:
81255e1f21ee158de1152d9c8f9afa297d5524a619a86968168c93d7c0ee1940 - Sigstore transparency entry: 208455662
- Sigstore integration time:
-
Permalink:
WillJRoper/unknown-pixels@5f92e6db72d09f2ea885b259579987bb6a07ae8a -
Branch / Tag:
refs/tags/v0.3.2-beta - Owner: https://github.com/WillJRoper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@5f92e6db72d09f2ea885b259579987bb6a07ae8a -
Trigger Event:
push
-
Statement type:
File details
Details for the file unknown_pixels-0.3.2b0-py3-none-any.whl.
File metadata
- Download URL: unknown_pixels-0.3.2b0-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49132cce0feeec5c9b4b5b0ab79787364827867766b5de0f54de2bfe53f567b4
|
|
| MD5 |
76b29eb8612cc74c8a955e50f5dfe260
|
|
| BLAKE2b-256 |
586d2366301579dca43aa06957ff46b216edbb221e591f933214138999ed9b3b
|
Provenance
The following attestation bundles were made for unknown_pixels-0.3.2b0-py3-none-any.whl:
Publisher:
deploy.yml on WillJRoper/unknown-pixels
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unknown_pixels-0.3.2b0-py3-none-any.whl -
Subject digest:
49132cce0feeec5c9b4b5b0ab79787364827867766b5de0f54de2bfe53f567b4 - Sigstore transparency entry: 208455665
- Sigstore integration time:
-
Permalink:
WillJRoper/unknown-pixels@5f92e6db72d09f2ea885b259579987bb6a07ae8a -
Branch / Tag:
refs/tags/v0.3.2-beta - Owner: https://github.com/WillJRoper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@5f92e6db72d09f2ea885b259579987bb6a07ae8a -
Trigger Event:
push
-
Statement type: