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.
  • Matplotlib figure support:
    • Export plots to in-memory PNG and pass them into scanline() to produce stylized visualizations.

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.3.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.3-py3-none-any.whl (31.0 kB view details)

Uploaded Python 3

File details

Details for the file pyscanline-0.1.3.tar.gz.

File metadata

  • Download URL: pyscanline-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 3ea31ba0e2ab32aaa3422d934e3ea3fa7bf24bb81d5fcfc7a5a605e5346abc4d
MD5 4af03ae58644c59d28da16a00b2c76f3
BLAKE2b-256 3132a070fbf627ba6c904752657e380eaf735fa162c0439794646f609969f3a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyscanline-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: pyscanline-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 31.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e1ff98cad2c7e733bd4768bc4a7721a9a35cad1c5c1778658f733523b1379ef1
MD5 bd38b8eaddee37d17861540bfa62c12b
BLAKE2b-256 48af9bcf84ea2f50785a18bee043d604baa1d76c58f5ca6d07679646f9496401

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyscanline-0.1.3-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