Skip to main content

PowerBlur

| English | 简体中文 |

📖 Introduction

PowerBlur is an image blurring tool based on Pillow, offering a high degree of freedom. It can achieve effects similar to the frosted glass effect found in systems like Windows/Mac (?).

⬇️ Installation

Make sure to use version 0.0.3 or higher; otherwise, it might not function properly.

pip install PowerBlur

🧑‍💻 Usage

Example Code

from PIL import Image
import PowerBlur

# Load the image
image = Image.open("image.jpg")

# Get image size
width, height = image.size

# Apply the power blur effect
PowerBlur.power_blur(image, (int(width*0.1), int(height*0.1), int(width*0.9), int(height*0.9)))

# Save the blurred image
image.save("output.jpg")

Parameter Explanation

Parameter Required/Default Value Type Description
image ✔️ Image The image to be processed
size ✔️ tuple/list[int, int, int, int] The area of the image to be processed, in the format (x1, y1, x2, y2)
radius ❌ (default is 25) int Corner radius; 0 means no corner radius
mask_fill ❌ (default is (255, 255, 255)) tuple/list[int, int, int] Mask color (R, G, B)
mask_alpha ❌ (default is 100) int Mask opacity (0~255); 0 is fully opaque, 100 is fully transparent
outline_fill ❌ (default is (0, 0, 0)) tuple/list[int, int, int] Outline color (R, G, B)
outline_width ❌ (default is 5) int Outline width
outline_alpha ❌ (default is 128) int Outline opacity (0~255); 0 is fully transparent, 128 is semi-transparent
noise_mean ❌ (default is 0.03) float Gaussian noise mean (0~255)
noise_std ❌ (default is 10) float Gaussian noise standard deviation; 0 means no noise
sigma ❌ (default is 5) float Gaussian blur parameter; 0 means no blur
exposure ❌ (default is 1) float Exposure (0~10); 0 means no exposure
saturation ❌ (default is 1) float Saturation; 0 means no saturation
copy ❌ (default is False) bool Whether to copy the original image without modifying it

Concerned about configuring all these parameters? We’ve prepared some presets for you.

Preset Name Chinese Name Formula
power_blur The default one; nothing much to say, but the author finds it quite nice
blur Basic blur effect, nothing special
aero Windows 7 glass effect, with exposure and saturation effects
acrylic 亚克力 Blur, overlay blend, saturation, color mask, noise texture
mica 云母 Blur, saturation, color mask

✨ Effect Showcase

Original Image

image

Processed Image

image

License

Copyright 2025 Xiaosu.

Distributed under the terms of the Apache 2.0 license.

Metadata

Release files for PowerBlur 0.1.2

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

Source distribution (sdist)

Source distribution for PowerBlur 0.1.2
File Size Uploaded
powerblur-0.1.2.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PowerBlur 0.1.2
File Interpreter ABI Platform
powerblur-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / powerblur-0.1.2.tar.gz

Download URL powerblur-0.1.2.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
29f99972cd0485416e102254a259663f8f5e49effb0a5b0bd492b216a22e9ae0
BLAKE2b-256 checksum
How to use checksums
7dd9292d0dbff9253e769c8f05457f26ac58d0a1a6f919ab5ac5d35f51c888e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Mar 21, 2025.

Transparency log

Release files / powerblur-0.1.2-py3-none-any.whl

Download URL powerblur-0.1.2-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82a57c67945fa3ac3e75c6b933a110db0b9974a7d15d22373d2069cd3ba9d5a8
BLAKE2b-256 checksum
How to use checksums
d1ec5ce7ca2cc7bbd9099fa4d707b87a7300fbd476d01cfa86b8dc24daf6a7df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Mar 21, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 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