All notable changes to this project will be documented in this file. Format: Keep a Changelog — Semantic Versioning.
1.3.0 — 28-03-2026
- All public blur functions (
box_blur,defocus_blur,gaussian_blur,linear_motion_blur,psf_blur, and their_random/randomized_blurvariants) now accept abackend=keyword argument. Accepts"scipy","numpy","opencv", or a customBackendprotocol instance. - Pure-numpy backend (
"numpy"): always available, no optional dependencies. Automatically becomes the default when scipy is not installed. - OpenCV backend (
"opencv"): opt-in viabackend="opencv"; requirespip install pyblur[opencv].
scipyandscikit-imageare no longer required dependencies. The core package (numpy,pillow) now works standalone. Installpyblur[scipy]to restore the scipy-backed default explicitly.- Default backend remains
"scipy"when scipy is installed — no behaviour change for existing users.
1.2.0 — 22-03-2026
linear_motion_blur:dimnow accepts any odd integer ≥ 3 (previously restricted to3,5,7,9).linear_motion_blur:angleis now accepted as-is — anyfloat, wrapped modulo 180°. Discrete angle snapping to a kernel-size-dependent set of valid angles has been removed.- Replaced the hardcoded
LineDictionarylookup table with a dynamic geometric computation using trigonometry (_line_endpoints). Behaviour is identical for the previously supported dims and canonical angles.
1.1.0 — 21-03-2026
- RGB (
"RGB") image support for all blur functions. Grayscale ("L") remains supported; other modes (e.g."RGBA","P") raiseValueError.
1.0.0 — 16-03-2026
Full modernization of a Python 2-era codebase. Requires Python ≥ 3.10.
PascalCaseAPI removed (BoxBlur,GaussianBlur, etc.) — usesnake_caseequivalents.- Package moved to
src/layout; module files renamed tosnake_case. psf.pklreplaced bypsf.npz.
snake_casepublic API with explicit and random variants for all five blur types.- Input validation at all public boundaries (
TypeError/ValueError). - Full type annotations and
py.typedmarker (PEP 561). pyproject.tomlbuild config (PEP 517/621), replacingsetup.py/setup.cfg/MANIFEST.in.- 242-test pytest suite with 100% branch coverage.
- Security:
psf.pkl→psf.npzwithallow_pickle=False, closing an arbitrary code-execution vector. - Python 3 import errors in
RandomizedBlurandLinearMotionBlur. - Integer division (
/→//) in defocus and linear motion kernels. skimage.draw.circle→skimage.draw.disk(removed upstream API).linear_motion_blurmutating shared kernel state on repeated calls.
0.2.3 — 2016
Initial public release. Python 2.7 only.