Pyvips - Gaussian Blur has black outline around image #3851
Unanswered
sairam-haribabu
asked this question in
Q&A
Replies: 1 comment
-
Hello @sairam-haribabu, That's the edge of the image being blended into your PNG background, which is black. Try dropping the alpha:
ie. starting from band 0, extract three bands (bands are always RGBA) to make: You can see your image is really on a black background, it's only the transparent alpha which makes it seem white. When you blur it, you are seeing these black pixels. To fix this, flatten out the alpha against white to set the background pixels, reattach the alpha, then blur. fixed_rgba = image.flatten(background=255).bandjoin(image[3])
image = fixed_rgba.gaussblur(5) To make: You'll find it looks correct on a white and on a black background. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When performing gaussian blur with the setting below, the output image has a weird black outline around it.
image = image.gaussblur(sigma, min_ampl=0.1, precision="float")
Source image:
Output (sigma = 10)
I'm trying to find a fix for the black outline around the image. Hoping to see some output like this:
Environment
(please complete the following information)
PS: Issue observed best using the browser's light mode
TIA!
Beta Was this translation helpful? Give feedback.
All reactions