skillfed

blendmodes

Use this module to apply a number of blending modes to a background and foreground image

blendmodes v2025 283.2K downloads/30d#8,078 on PyPI38
Permissive license MIT Active released

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 blendmodes

uv

uv add blendmodes

poetry

poetry add blendmodes

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: Implementation :: CPythonTopic :: Multimedia :: GraphicsTopic :: Software Development :: Libraries :: Python ModulesTopic :: Utilities

Tags

image blending modescomposite images blendlayer blending pythonimage overlay modesblend modes libraryimage compositingforeground background blend
image-processinglayer-compositing

More Python Modules packages