-
-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Description
I've noticed that performing a gaussian blur with pygame.transform.gaussian_blur makes a less blurry image than PIL's gaussian blur when the same radius is used. If the radius of the pygame blur is doubled, then they match up correctly.
I assume this isn't intended behaviour? Is it possible that the radius was not doubled by Pygame CE when it should have been, or something like that?
Blurring a pygame surface with PIL:
img = Image.frombytes(
"RGBA", surface.get_size(), pygame.image.tostring(surface "RGBA", False)
)
img = img.filter(ImageFilter.GaussianBlur(radius=10))
blurred_surface = pygame.image.frombuffer(
img.tobytes(), img.size, "RGBA"
)With Pygame CE:
blurred_surface = pygame.transform.gaussian_blur(surface, 10)Side-by-side comparison, with both radii set to 10:
Both radii set to 10:
PIL with a radius of 10, and Pygame with a radius of 20:

Metadata
Metadata
Assignees
Labels
No labels