blendmodes
Use this module to apply a number of blending modes to a background and foreground image
What it is and what it does
BlendModes is a Python library that applies layer blending modes—the same operations used in image editors—to composite two images together. It wraps implementations derived from the Open Raster Image Spec, Paint.NET, and other popular image editors, exposing them through a simple API that takes a background image, a foreground image, and a blend mode, then returns the composited result.
The package depends on numpy for numerical operations and pillow for image handling, making it straightforward to integrate into image processing pipelines. It's designed for developers who need programmatic access to blending operations without building them from scratch.
Use it for:
- Composite watermarks or logos onto photographs with specific blend modes for natural integration.
- Build batch image processing pipelines that apply consistent layer effects across many images.
- Create image editing tools or filters that expose blending modes to end users.
- Generate artistic effects by layering textures or patterns with different blend modes.
- Automate photo retouching workflows that require layer blending operations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Applies a range of blending modes to composite a foreground image over a background using numpy and pillow.
Yes. The package is actively maintained with no known vulnerabilities, installs with low friction, and solves a concrete problem—programmatic image blending—that would otherwise require manual implementation. The MIT license is unrestricted. Install it if you need to blend images with standard layer modes in Python.
Install
blendmodes on PyPI
pip
pip install blendmodesuv
uv add blendmodespoetry
poetry add blendmodesInstalling blendmodes
Before you install
Low install friction; pure Python wheel with three common dependencies (aenum, numpy, pillow). Actively maintained with last commit on 2026-07-24.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install blendmodes
import blendmodes
import numpy
from pillow import Image
background = Image.open('bg.png')
foreground = Image.open('fg.png')
result = blendmodes.blend(background, foreground)
Requires Python >= 3.9; background and foreground images must be compatible objects from pillow.
Verify before relying
- Which specific blending modes are implemented and how they compare to standard image editor implementations.
- Performance characteristics when blending large images or applying modes repeatedly.
- API surface and exact function signatures for applying blend modes.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — aenum, numpy, pillow |
| Maintenance | actively maintained — 540 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 283,152/month — #8,078 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: blendmodes-2025-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
blend-modesImplements blend modes (soft light, dodge,…
permissive · top 15,000 on PyPI
pilgramApplies Instagram-style filters and CSS-based…
permissive · top 15,000 on PyPI
psd-toolspsd-tools reads and writes Adobe Photoshop…
permissive · top 15,000 on PyPI
PyMattingPyMatting solves the alpha matting…
permissive · top 5,000 on PyPI
coloraideColorAide is a pure Python library for…
permissive · top 15,000 on PyPI
fill-voidsFills interior voids in 2D and 3D binary images…
copyleft · top 15,000 on PyPI
aes-pkcs5Provides AES encryption and decryption with…
permissive · top 15,000 on PyPI
transparent-backgroundRemoves backgrounds from images and videos…
permissive · top 15,000 on PyPI
imgaugAugments images and related data (heatmaps,…
permissive · top 5,000 on PyPI
pyobjc-framework-BackgroundAssetsProvides Python bindings to Apple's…
permissive · top 15,000 on PyPI