Skip to main content

🪶 Feather

Rust Python License: MIT SIMD Accelerated

Feather Banner

🤖 Note: This README documentation was created by AI.

Feather is a high-performance, memory-safe 2D vector graphics and image processing extension for Python, built from the ground up in Rust.

Designed as a modern, superior alternative to Pillow's (PIL.ImageDraw) rendering engine, Feather provides flawless subpixel anti-aliasing, feathered soft edges, SIMD acceleration, modern typography, native drop shadows, clipping masks, SVG rendering with resvg, animated GIFs, and seamless integration with NumPy and Pillow.


🚀 Why Feather?

Feature Pillow (PIL.ImageDraw) Feather
Anti-Aliasing ❌ Jagged, pixelated edges 🪶 Flawless subpixel anti-aliasing & soft edges
Typography & Text Layout ⚠️ Clunky bounds, no word-wrap 🪶 Subpixel fontdue engine with automatic word-wrap
Drop Shadows & Glows ❌ None (requires 15+ lines of blur hacks) 🪶 Native 1-line diffused drop shadows & glows
Clipping Masks ⚠️ Manual putalpha masks 🪶 Native context managers (clipping_circle, etc.)
Transformation Matrix ⚠️ Limited image-level transforms 🪶 State stack: rotate, scale, translate
SVG File Rendering ❌ None (requires CairoSVG + GTK DLLs) 🪶 Built-in pure Rust resvg (0 C dependencies)
Built-in Modern Charts ❌ None (requires heavy Matplotlib) 🪶 Zero-dependency Area, Bar, Donut, Radar, & Gauges (feather.charts)
Jupyter Notebook Display ⚠️ Clunky boilerplate 🪶 Native _repr_png_() instant cell rendering
Live Interactive Viewer ❌ None (only slow external Photo Viewer) 🪶 60 FPS desktop window with pan, zoom, & live pixel loupe
Modern Animation (WebP/APNG) ❌ Poor/None 🪶 68% smaller WebP & 32-bit lossless APNG
Rounded Rectangles ⚠️ Basic or broken corner radii 🪶 Smooth bezier rounded corners (rx, ry)
Gradients ❌ None (requires manual loops) 🪶 Linear & Radial Gradients with stops
Vector Paths ❌ Limited polylines 🪶 Quadratic/Cubic Beziers & SVG d Paths
Multi-Core / GIL ❌ Locks Python GIL, single-threaded 🪶 Multi-core Rayon parallelism, GIL released
Image Resizing ⚠️ Standard CPU resampling 🪶 SIMD-accelerated (AVX2/SSE4.1)
Blend Modes ⚠️ Basic alpha compositing 🪶 24+ Blend Modes (Multiply, Screen, etc.)
NumPy / Pillow Bridge ⚠️ Slow conversions 🪶 Direct zero-copy buffer interop

Pillow vs Feather Subpixel Anti-Aliasing
Left: Pillow (jagged, staircase aliasing)  •  Right: Feather (smooth subpixel anti-aliasing with radial gradients & bezier curves)


📦 Installation

Install Feather directly from PyPI (pre-compiled standalone wheels available for Windows, Linux, and macOS):

pip install feather-render
Alternative Installation Methods (Local Wheel / GitHub / Build from Source)

Option 2: Pre-built Binary Wheel (Offline / Releases)

# Install directly from the repository releases:
pip install releases/feather_render-0.4.0-cp310-abi3-win_amd64.whl

(Multi-platform wheels for Linux, macOS Apple Silicon/Intel, and Windows are also downloadable from the GitHub Releases tab).

Option 3: Direct from GitHub via pip

pip install git+https://github.com/Yannis-A-D/feather.git

Option 4: Build from Source

git clone https://github.com/Yannis-A-D/feather.git
cd feather
pip install maturin
maturin develop --release

🎨 Quickstart

1. Typography & Multi-Line Text Boxes

Feather includes built-in system font fallbacks and subpixel glyph rasterization powered by fontdue:

from feather import Canvas, Font

canvas = Canvas(800, 600, background="#11111b")

# Single line text
canvas.draw_text("⚡ Feather 0.2.0: Typography Engine", 50, 40, size=28, color="#f5c2e7")

# Multiline text box with automatic word wrapping
long_text = "Feather renders smooth vector graphics with zero C dependencies. Words wrap smoothly and gracefully."
width, height = canvas.draw_text_box(
    long_text,
    x=50, y=100, max_width=350,
    size=18, color="#cdd6f4", line_spacing=6
)

# Load any custom TTF or OTF font
custom_font = Font.load("path/to/custom_font.ttf")
canvas.draw_text("Custom Font", 50, 200, size=22, font=custom_font)

2. Native Drop Shadows & Glow Effects

Create buttery-smooth, diffused glassmorphic cards and glowing badges in a single call:

# Card with soft drop shadow
canvas.draw_drop_shadow(
    x=450, y=90, width=300, height=160,
    rx=18, blur=18.0, offset_x=0.0, offset_y=10.0,
    color="rgba(0, 0, 0, 0.5)"
)
canvas.draw_rounded_rect(450, 90, 300, 160, rx=18, fill="#1e1e2e", stroke="rgba(255, 255, 255, 0.15)", stroke_width=1.5)

# Outer glow effect on badges or buttons
canvas.draw_glow(cx=520, cy=200, radius=25, blur=20.0, color="rgba(243, 139, 168, 0.7)")
canvas.draw_circle(520, 200, radius=25, fill="#f38ba8")

3. Matrix Transformations & Clipping Masks

Crop avatars into circles, rounded rectangles, or rotate vector art effortlessly with Python context managers:

# Rotate and transform shapes
with canvas.transform_scope():
    canvas.translate(150, 420)
    canvas.rotate(degrees=25)
    canvas.draw_rect(-40, -40, 80, 80, fill="#a6e3a1")

# Circular avatar clipping mask
with canvas.clipping_circle(cx=320, cy=420, radius=55):
    canvas.draw_image(avatar_canvas, 265, 365)  # Automatically clipped to a circle!

4. Zero-Dependency SVG File Rendering (resvg)

Render entire .svg vector files or SVG XML strings directly onto your canvas at arbitrary coordinates and dimensions:

# Render SVG document string or file
svg_xml = """
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="#f38ba8" stroke="#ffffff" stroke-width="4"/>
</svg>
"""
canvas.draw_svg_document(svg_xml, x=100, y=100, width=150, height=150)

# Or directly from a file:
canvas.draw_svg_file("icons/badge.svg", x=300, y=100, width=150, height=150)

5. Modern Animation Exporter (save_webp, save_apng, save_animation)

Render high-framerate multi-frame animations with full 32-bit RGBA alpha transparency and up to 70% smaller file size than GIF!

from feather import Canvas, save_animation, save_webp, save_apng, save_gif

frames = []
for i in range(30):
    frame = Canvas(400, 400, background="#0f0f17")
    angle = i * (360 / 30)
    with frame.transform_scope():
        frame.translate(200, 200)
        frame.rotate(angle)
        frame.draw_rounded_rect(-50, -50, 100, 100, rx=16, fill="#89b4fa")
    frames.append(frame)

# 🌐 Animated WebP (68% smaller than GIF, full 32-bit truecolor & alpha!)
save_webp(frames, "animation.webp", fps=30, loop_count=0, lossless=True)

# 🖼️ Animated PNG / APNG (lossless 32-bit RGBA for Discord/browsers)
save_apng(frames, "animation.png", fps=30, loop_count=0)

# 🔄 Unified Auto-Detection (detects .webp, .apng, .png, .gif automatically)
save_animation(frames, "animation.webp", fps=30)
Format Color Depth Alpha Transparency Compression Best For
WebP 32-bit Truecolor ✅ Full 8-bit Alpha ~68% smaller than GIF Web, Modern Apps
APNG 32-bit Truecolor ✅ Full 8-bit Alpha Lossless Truecolor Discord, Apple, High-DPI
GIF 8-bit (256 colors) ❌ 1-bit Binary Only Larger file size Legacy fallback

Feather Animated Radar Demo
Live 30 FPS multi-frame animation rendered directly with Feather


6. Instant Live Interactive Window (canvas.show(), show_interactive())

Instead of Pillow's image.show() that dumps a temporary BMP to Windows Photo Viewer, Feather boots a native 60 FPS desktop window:

Feather Interactive Desktop Viewer

from feather import Canvas, show_interactive

canvas = Canvas(1000, 700, background="#161922")
# ... draw anything ...

# 🖥️ Open instant interactive desktop viewer
canvas.show(title="My CAD Blueprint")

# 🎬 Or play multi-frame animations in real-time
show_interactive(frames, title="Signal Flow Simulation", fps=30)

Interactive Controls:

  • 🔍 Smooth Zoom: Scroll mouse wheel centered directly at your cursor.
  • 🖐️ Pan: Click and drag with left mouse button anywhere across the canvas.
  • 🎯 Pixel Inspector: Hover over any pixel to see exact (X, Y) coordinates and Hex/RGBA color live in the title bar HUD.
  • ⏯️ Playback: Press Space to Pause/Play, Left/Right arrow keys to step through animation frames.
  • 🔄 Reset View: Press R to re-center and fit to window.
  • 📸 Instant Snapshot: Press S to save the current frame as a PNG.
  • Exit: Press Esc or Q.

7. CAD & Electronic Schematic Rendering

Feather's subpixel anti-aliased vectors, transform matrix instancing, and SVG path parsing make it exceptionally suited for rendering high-precision CAD diagrams and electronic schematics without external software:

Feather CAD Circuit Schematic
Complete Op-Amp schematic rendered with Feather (see examples/schematic_demo.py)


8. Anti-Aliased Shapes & Gradients

from feather import Canvas, LinearGradient, RadialGradient

canvas = Canvas(800, 600, background="#11111b")

# Linear gradient
grad = LinearGradient(50, 50, 350, 250, stops=[
    (0.0, "#f38ba8"),
    (0.5, "#cba6f7"),
    (1.0, "#89b4fa")
])
canvas.draw_rounded_rect(50, 50, 300, 200, rx=24, fill=grad, stroke="#ffffff", stroke_width=2.5)

# Radial gradient
radial = RadialGradient(550, 200, 90, stops=[
    (0.0, "#a6e3a1"),
    (1.0, "rgba(166, 227, 161, 0)")
])
canvas.draw_circle(550, 200, radius=90, fill=radial, stroke="#94e2d5", stroke_width=3.0)

canvas.save("render.png")

9. SIMD Resizing & Image Filters

img = Canvas.open("photo.png")

# Ultra-fast SIMD resize (filters: 'bilinear', 'bicubic', 'lanczos3', 'nearest')
thumbnail = img.resize(256, 256, filter="lanczos3")

# Multi-threaded Gaussian Blur (GIL released)
blurred = img.blur(sigma=4.5)

# Adjust brightness and contrast
enhanced = img.adjust_contrast(1.2).adjust_brightness(1.05)
enhanced.save("enhanced.jpg", quality=95)

10. Seamless Pillow & NumPy Interop

from PIL import Image
import numpy as np
from feather import Canvas

# Pillow -> Feather
pil_img = Image.open("avatar.png")
canvas = Canvas.from_pillow(pil_img)

# Feather -> Pillow
result_pil = canvas.to_pillow()

# Feather <-> NumPy
np_array = canvas.to_numpy()  # uint8 shape (H, W, 4)
new_canvas = Canvas.from_numpy(np_array)

11. Built-in Modern Charting & Infographics (feather.charts)

Generate publication-grade, beautifully anti-aliased data visualizations with zero external dependencies (no Matplotlib or Seaborn needed):

Feather Charts Showcase Dashboard
Executive analytics dashboard featuring AreaChart, BarChart, DonutChart, and RadarChart (see examples/charts_showcase.py)

from feather import charts

# 📈 1. Smooth Bézier Area Chart with Gradient Fill
area = charts.AreaChart(width=800, height=380, title="System Telemetry", theme="dark", smooth=True)
area.set_x_labels(["00:00", "04:00", "08:00", "12:00", "16:00", "20:00"])
area.add_series("Inbound (MB/s)", [120, 240, 480, 890, 720, 950], color="#89b4fa")
area.add_series("Outbound (MB/s)", [60, 110, 230, 410, 350, 520], color="#a6e3a1")
area.render().save("network_throughput.png")

# 📊 2. Pill-Capped Multi-Series Bar Chart
bar = charts.BarChart(width=600, height=380, title="Engine Benchmarks", theme="dark", corner_radius=6.0)
bar.set_categories(["Lines", "Curves", "Circles", "SVG"])
bar.add_series("Feather", [1420, 980, 1650, 820], color="#89b4fa")
bar.add_series("Pillow", [310, 180, 420, 120], color="#f38ba8")
bar.render().save("benchmarks.png")

# 🍩 3. Precision Donut & Gauge Meters
donut = charts.DonutChart(width=500, height=420, title="Resource Allocation", cutout_ratio=0.65, center_text="4.2 GB")
donut.add_slice("VRAM", 48.0, color="#89b4fa")
donut.add_slice("Glyphs", 24.0, color="#cba6f7")
donut.add_slice("Threads", 16.0, color="#a6e3a1")
donut.render().save("donut.png")

# 🎯 4. Multi-Variable Spider / Radar Chart
radar = charts.RadarChart(width=500, height=450, title="Engine Profile", theme="dark")
radar.set_axes(["Anti-Aliasing", "SIMD", "Concurrency", "Filters", "Formats"])
radar.add_series("Feather", [98, 95, 92, 88, 94], color="#94e2d5")
radar.render().save("radar.png")

12. Generative Art & Precision Architectural CAD

Feather's subpixel anti-aliasing renders hundreds of overlapping transparent curves and microscopic vector details with effortless optical fidelity:

Feather Generative Harmonic Art
120 overlapping harmonic splines rendered with subpixel transparency in 14 ms (see examples/generative_art.py)

Feather Architectural CAD Blueprint
Precision architectural floorplan with dimension arrows, door swing arcs, and drafting title blocks (see examples/blueprint_demo.py)


13. Native Jupyter Notebook & Google Colab Display

Feather canvases automatically display inline in Jupyter Notebooks, Google Colab, and VS Code Interactive Python with zero boilerplate:

import feather

canvas = feather.Canvas(500, 300, background="#11111b")
canvas.draw_circle(250, 150, 80, fill="#89b4fa", stroke="#ffffff", stroke_width=3.0)

canvas  # 🪄 Instantly renders inline via native _repr_png_()!

🏗 Architecture

  • Rasterizer Engine: Built on tiny-skia, a pure Rust port of Google's Skia software rasterizer. Features full SIMD optimizations for AVX2, SSE4.1, and ARM Neon.
  • SVG Engine: Integrated resvg for 100% pure Rust, zero-dependency SVG vector document rasterization.
  • Font Engine: Powered by fontdue for subpixel glyph coverage rasterization and text measurement.
  • Resampling Pipeline: Uses fast_image_resize for blazing-fast SIMD image convolutions.
  • Concurrency: Work-stealing thread pools powered by rayon.
  • Color Engine: Parses CSS hex, rgb, rgba, hsl, and named colors via csscolorparser.

📄 License

This project is licensed under the MIT License.


🤖 Note: This README was made with AI.

Release files for feather-render 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for feather-render 0.4.2
File
feather_render-0.4.2-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
feather_render-0.4.2-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details
feather_render-0.4.2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
feather_render-0.4.2-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 9.6 MB

Release files / feather_render-0.4.2-cp310-abi3-win_amd64.whl

Download URL feather_render-0.4.2-cp310-abi3-win_amd64.whl
Size 2.2 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c4dc2d7cc6ade61ec9bbbb6d172523028a860aed040a3a63da76d6cfe7686935
BLAKE2b-256 checksum
How to use checksums
704e9519962e0704d37b6548e0c28bc3b527fd22bda7ebaff92ac7d9bc5137a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release files / feather_render-0.4.2-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL feather_render-0.4.2-cp310-abi3-manylinux_2_34_x86_64.whl
Size 2.8 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
31cd7aa310c4f7f91235fd7f3bbf50e908eee3bc27134d48d89ccc01dc8553d8
BLAKE2b-256 checksum
How to use checksums
61e574d9818808901ebb8f180f908f64426bccec3807a94fdcbadc46d897fe45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release files / feather_render-0.4.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL feather_render-0.4.2-cp310-abi3-macosx_11_0_arm64.whl
Size 2.2 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
87c3264428eda043629b94c97aa3a4e636daf775fd0ccbc6bb8758c4a680b05e
BLAKE2b-256 checksum
How to use checksums
98bbcbc96c6aaf72ebefae4ffd0decf3cc9274a1bd2f7795f26b206c93ba2978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release files / feather_render-0.4.2-cp310-abi3-macosx_10_12_x86_64.whl

Download URL feather_render-0.4.2-cp310-abi3-macosx_10_12_x86_64.whl
Size 2.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bdcc4b6397c5a5f63c299560ac37731262a524fa238bf02b61a935fe1c995c2d
BLAKE2b-256 checksum
How to use checksums
80ec20d7991bd356d049b037aa411ba5fdab5960bdf1dba2792ae06978407649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.3

4 release files

This release

0.4.2 This release

4 release files

0.4.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page