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.1.tar.gz (3.6 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.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: glowbyte-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 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.1.tar.gz
Algorithm Hash digest
SHA256 ecf9390aea1f2635c2f816d130b55fdc3c7903097a4a8c997e4c1748459418ea
MD5 a3c47a8c578a7026ec0d7be9f37d463f
BLAKE2b-256 55ec85d2a0a9a3036e073ff9b6baede70414ac5e412bd4fd3d1fdee9bd51ad83

See more details on using hashes here.

File details

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

File metadata

  • Download URL: glowbyte-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53670f02598a6e9373301ca80edaefb2df8e8cc0512488d9a9858ef7d7512fdb
MD5 4ed66630b2dfbda71eba2befe7a0ff9b
BLAKE2b-256 5057ed2269c14762cd10cfa2d86ff87fd9668aa6fcb24efc0d0129889727bf59

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