A Python-based library that recreates a retro-futuristic style
Project description
Scanline Effects in Python
A Python-based library that recreates a retro-futuristic "scanline" style. It allows you to apply scanlines to:
- Static images (PNG, JPEG, etc.)
- Animated GIFs (frame-by-frame processing)
Note: This project is inspired by the R scanline package's approach to scanline effects. However, the results may differ slightly due to underlying implementations in Pillow, NumPy, and ImageIO.
Features
- Static image processing via
scanline():- Resizes the image to a specified vertical resolution.
- Applies customizable alpha-based scanline patterns, color mapping, borders, and optional noise.
- GIF animation processing via
scanline_gif():- Reads each GIF frame, flattens cumulatively (like R’s
image_flatten), then applies the scanline effect. - Returns all frames plus per-frame durations, which can be saved as a new GIF.
- Reads each GIF frame, flattens cumulatively (like R’s
Showcase
| Original | Scanlined |
|---|---|
Installation
pip install pyscanline
Quick Start
from pyscanline import scanline
# Apply the scanline effect
result_img = scanline("input.png", n_scanlines=60)
# Save the result
result_img.save("ouput.png")
See the examples directory for more usage scenarios.
License
GPLv3 License. See LICENSE for details.
Enjoy creating retro-futuristic scanlines for your images and animations!
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 pyscanline-0.1.4.tar.gz.
File metadata
- Download URL: pyscanline-0.1.4.tar.gz
- Upload date:
- Size: 4.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fac62678f81367fc5eaa80071fc1d0af267521e63048938ddad14a0ae8e4814
|
|
| MD5 |
7c31e7c62529308cd63123b4f7837b47
|
|
| BLAKE2b-256 |
c510547d03f73aea1d05f79e5ceca853a80682010aac6946f428bf952eaac871
|
Provenance
The following attestation bundles were made for pyscanline-0.1.4.tar.gz:
Publisher:
publish.yml on onukura/pyscanline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscanline-0.1.4.tar.gz -
Subject digest:
5fac62678f81367fc5eaa80071fc1d0af267521e63048938ddad14a0ae8e4814 - Sigstore transparency entry: 159500090
- Sigstore integration time:
-
Permalink:
onukura/pyscanline@991c923abc9aa05801e9c688d2417263d7bfc4fe -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/onukura
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@991c923abc9aa05801e9c688d2417263d7bfc4fe -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyscanline-0.1.4-py3-none-any.whl.
File metadata
- Download URL: pyscanline-0.1.4-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5d906c8e5ed91af97461e511b0727ea801b360db38137f84ac1c43f93b1778a
|
|
| MD5 |
b4530b07c3d27a969a357bc0e4170a5f
|
|
| BLAKE2b-256 |
51eb9fb530937508286cadd4921d9b3d111a2508362aa85500aad8c402a7ae53
|
Provenance
The following attestation bundles were made for pyscanline-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on onukura/pyscanline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscanline-0.1.4-py3-none-any.whl -
Subject digest:
b5d906c8e5ed91af97461e511b0727ea801b360db38137f84ac1c43f93b1778a - Sigstore transparency entry: 159500094
- Sigstore integration time:
-
Permalink:
onukura/pyscanline@991c923abc9aa05801e9c688d2417263d7bfc4fe -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/onukura
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@991c923abc9aa05801e9c688d2417263d7bfc4fe -
Trigger Event:
push
-
Statement type: