Skip to main content

A Python-based library that recreates a retro-futuristic style

Project description

Scanline Effects in Python

uv image image Python package

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.

Showcase

Original Scanlined
drawing drawing
drawing drawing

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyscanline-0.1.4.tar.gz (4.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyscanline-0.1.4-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

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

Hashes for pyscanline-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5fac62678f81367fc5eaa80071fc1d0af267521e63048938ddad14a0ae8e4814
MD5 7c31e7c62529308cd63123b4f7837b47
BLAKE2b-256 c510547d03f73aea1d05f79e5ceca853a80682010aac6946f428bf952eaac871

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyscanline-0.1.4.tar.gz:

Publisher: publish.yml on onukura/pyscanline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pyscanline-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b5d906c8e5ed91af97461e511b0727ea801b360db38137f84ac1c43f93b1778a
MD5 b4530b07c3d27a969a357bc0e4170a5f
BLAKE2b-256 51eb9fb530937508286cadd4921d9b3d111a2508362aa85500aad8c402a7ae53

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyscanline-0.1.4-py3-none-any.whl:

Publisher: publish.yml on onukura/pyscanline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page