Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Box Blur number of passes is not controllable from Python #89

Closed
bmharper opened this issue Jul 18, 2020 · 3 comments
Closed

Box Blur number of passes is not controllable from Python #89

bmharper opened this issue Jul 18, 2020 · 3 comments

Comments

@bmharper
Copy link

One of the great features of Pillow-SIMD is it's iterative box blur, but the number of passes cannot be controlled from Python.

Am I missing something here?

@homm
Copy link

homm commented Jul 19, 2020

There are no good reasons for complicating the API. If you need only one pass (Box blur), there is separate filter for this. If you need Gaussian Blur, 3 passes is quite good approximation and doesn’t became better with more passes.

If you want something really strange, you can use low-level api and call im.box_blur and im.gaussian_blur with second argument, which number of passes.

@bmharper
Copy link
Author

Thanks - so just to make sure - does this code end up inside ImagingGaussianBlur with passes = 3?

im = im.filter(ImageFilter.GaussianBlur(radius))

I guess that's fine - 3 passes is OK.

@homm
Copy link

homm commented Jul 21, 2020

Right.

@homm homm closed this as completed Jul 21, 2020
Dawars pushed a commit to Dawars/pillow-simd that referenced this issue Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants