Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 3.27 KB

File metadata and controls

70 lines (49 loc) · 3.27 KB

Changelog

All notable changes to this project will be documented in this file. Format: Keep a ChangelogSemantic Versioning.


1.3.0 — 28-03-2026

Added

  • All public blur functions (box_blur, defocus_blur, gaussian_blur, linear_motion_blur, psf_blur, and their _random / randomized_blur variants) now accept a backend= keyword argument. Accepts "scipy", "numpy", "opencv", or a custom Backend protocol instance.
  • Pure-numpy backend ("numpy"): always available, no optional dependencies. Automatically becomes the default when scipy is not installed.
  • OpenCV backend ("opencv"): opt-in via backend="opencv"; requires pip install pyblur[opencv].

Changed

  • scipy and scikit-image are no longer required dependencies. The core package (numpy, pillow) now works standalone. Install pyblur[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

Changed

  • linear_motion_blur: dim now accepts any odd integer ≥ 3 (previously restricted to 3, 5, 7, 9).
  • linear_motion_blur: angle is now accepted as-is — any float, wrapped modulo 180°. Discrete angle snapping to a kernel-size-dependent set of valid angles has been removed.
  • Replaced the hardcoded LineDictionary lookup 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

Added

  • RGB ("RGB") image support for all blur functions. Grayscale ("L") remains supported; other modes (e.g. "RGBA", "P") raise ValueError.

1.0.0 — 16-03-2026

Full modernization of a Python 2-era codebase. Requires Python ≥ 3.10.

Breaking

  • PascalCase API removed (BoxBlur, GaussianBlur, etc.) — use snake_case equivalents.
  • Package moved to src/ layout; module files renamed to snake_case.
  • psf.pkl replaced by psf.npz.

Added

  • snake_case public API with explicit and random variants for all five blur types.
  • Input validation at all public boundaries (TypeError / ValueError).
  • Full type annotations and py.typed marker (PEP 561).
  • pyproject.toml build config (PEP 517/621), replacing setup.py / setup.cfg / MANIFEST.in.
  • 242-test pytest suite with 100% branch coverage.

Fixed

  • Security: psf.pklpsf.npz with allow_pickle=False, closing an arbitrary code-execution vector.
  • Python 3 import errors in RandomizedBlur and LinearMotionBlur.
  • Integer division (///) in defocus and linear motion kernels.
  • skimage.draw.circleskimage.draw.disk (removed upstream API).
  • linear_motion_blur mutating shared kernel state on repeated calls.

0.2.3 — 2016

Initial public release. Python 2.7 only.