Skip to main content

A Python image composition engine with layers, filters, and blend modes.

Project description

GlowByte

A Python image composition engine with layers, filters, and blend modes.

Video Demo: https://andstudies.com/tools/glowbyte/glowbyte.mp4

Description

glowbyte is a Python package for programmatic photo editing. Instead of opening Photoshop or GIMP, you write code — stack layers, apply filters, set blend modes and opacity, and export the result.

The idea is simple: a canvas holds layers, each layer holds an image, and each layer can have its own position, size, opacity, blend mode, and effects. When you export, glowbyte composites everything together from bottom to top and writes the final image.

This makes glowbyte useful for automated image generation, social media templates, batch processing, data-driven graphics, and anyone who'd rather write Python than drag sliders. The inspiration came from my work on PyFrame, a video composition engine — glowbyte is the image foundation that PyFrame will eventually build on.

Features

  • Layer-based composition system
  • Image layers with position, size, and opacity
  • Text layers with font, size, and color
  • Solid color and gradient layers
  • Blend modes (multiply, screen, overlay, soft light, etc.)
  • Non-destructive filters (blur, sharpen, brightness, contrast, saturation, hue shift)
  • Chroma key / green screen removal
  • Resize, crop, and transform operations
  • PNG and JPEG export

Installation

pip install glowbyte

Or install from source:

git clone https://github.com/sfyds/glowbyte.git
cd glowbyte
pip install -e .

Usage

from glowbyte import Canvas, Layer

# create a canvas
canvas = Canvas(1920, 1080)

# add a background
bg = Layer.from_file("background.png")
canvas.add_layer(bg)

# add a photo with reduced opacity and a blend mode
photo = Layer.from_file("portrait.png", opacity=0.8, blend_mode="multiply")
photo.move(100, 50)
canvas.add_layer(photo)

# apply filters
photo.filter.brightness(1.2)
photo.filter.contrast(1.1)
photo.filter.blur(radius=2)

# add text
title = Layer.text("hello world", font_size=72, color="#ffffff")
title.move(200, 400)
canvas.add_layer(title)

# export
canvas.export("result.png")

Project Structure

glowbyte/
    glowbyte/
        __init__.py
        canvas.py
        layer.py
        filters.py
        blend.py
        text.py
        renderer.py
        export.py
    examples/
        basic_composite.py
        text_overlay.py
        blend_modes.py
        batch_edit.py
    tests/
        test_canvas.py
        test_layer.py
        test_filters.py
        test_blend.py
    assets/
        example_background.png
    pyproject.toml
    README.md
    LICENSE

TODO

Core

  • Layer groups
  • Layer masks
  • Crop and trim
  • Rotation and scaling transforms
  • Undo/redo history

Effects

  • Drop shadow
  • Stroke/outline
  • Gradient maps
  • Color overlay
  • Noise generation

Usability

  • JSON scene format (load/save compositions)
  • Batch processing CLI
  • Better error messages
  • More example scripts

Long-Term

  • Integration with PyFrame for video composition
  • Plugin system for custom filters
  • WebP and TIFF export
  • Simple web preview interface

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

glowbyte-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

glowbyte-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file glowbyte-0.1.0.tar.gz.

File metadata

  • Download URL: glowbyte-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for glowbyte-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c161c3dd1283fb9cb7e1872dc255ab775f16e124ad328db96bfa0dc9efaaf095
MD5 07c15fd8fe6f7d67a311946672794008
BLAKE2b-256 8c683dbae86cffa4eeabca096556c6a5a6e8484e888f13117589b26be48ab9e2

See more details on using hashes here.

File details

Details for the file glowbyte-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: glowbyte-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for glowbyte-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70b279ce9607e5f269d517f183151a90a60982a3ad95d2c9ddbf3d8a5fee9c5a
MD5 a75ec0bca5b4e0c16b82b0c9608a076c
BLAKE2b-256 1f4d4003cb17866b837f0b2cce9936027ae73ff1f7a99f8ec1d0240f42819781

See more details on using hashes here.

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