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!
Metadata
Release files for pyscanline 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyscanline-0.1.4.tar.gz | 4.3 MB | With provenance | Details for pyscanline-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyscanline-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for pyscanline-0.1.4-py3-none-any.whl |
Total release size: 4.3 MB
Release files / pyscanline-0.1.4.tar.gz
| Download URL | pyscanline-0.1.4.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fac62678f81367fc5eaa80071fc1d0af267521e63048938ddad14a0ae8e4814
|
|
BLAKE2b-256 checksum How to use checksums |
c510547d03f73aea1d05f79e5ceca853a80682010aac6946f428bf952eaac871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2025.
Transparency logRelease files / pyscanline-0.1.4-py3-none-any.whl
| Download URL | pyscanline-0.1.4-py3-none-any.whl |
|---|---|
| Size | 30.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5d906c8e5ed91af97461e511b0727ea801b360db38137f84ac1c43f93b1778a
|
|
BLAKE2b-256 checksum How to use checksums |
51eb9fb530937508286cadd4921d9b3d111a2508362aa85500aad8c402a7ae53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2025.
Transparency logSecurity for pyscanline 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyscanline-0.1.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 4, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.