Skip to content

Conversation

@radarhere
Copy link
Member

Resolves #7321

Allows specifying a different radius for X and Y for ImageFilter's GaussianBlur and BoxBlur, e.g. ImageFilter.GaussianBlur((32, 16)) and ImageFilter.BoxBlur((32, 16)).

This is in addition to the existing single number, ImageFilter.GaussianBlur(16) and ImageFilter.BoxBlur(16).

ImagingHorizontalBoxBlur(imOut, imIn, xradius);
for (i = 1; i < n; i++) {
ImagingHorizontalBoxBlur(imOut, imOut, radius);
ImagingHorizontalBoxBlur(imOut, imOut, xradius);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could skip passes if it’s radius == 0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I've pushed a commit

@hugovk hugovk merged commit c68bf7d into python-pillow:main Aug 25, 2023
@radarhere radarhere deleted the blur branch August 25, 2023 09:21
radarhere added a commit to radarhere/Pillow that referenced this pull request Oct 7, 2023
hugovk added a commit that referenced this pull request Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gaussian/Box blur with different X and Y radius

3 participants