-
-
Notifications
You must be signed in to change notification settings - Fork 216
Blur fix #2103
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
Blur fix #2103
Conversation
oddbookworm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Fixes the linked issue nicely
instead of `newsurf_fromsurf`
|
Solved another problem when use gaussian_blur in place. import pygame
import sys
sf=pygame.image.load("peppers3.tif")
pygame.display.init()
dsf=pygame.display.set_mode((1280,720))
ddsf=dsf.subsurface((720,100,200,300))
while 1:
dsf.fill((0,150,0))
dsf.blit(sf, (640,0,0,0))
pygame.transform.gaussian_blur(ddsf,50,dest_surface=ddsf)
#dsf.blit(sf,(0,0,1,1))
pygame.display.update()
for event in pygame.event.get():
if event.type==pygame.QUIT:
sys.exit() |
|
It might be better to raise an error instead of creating a buffer when handling in-place operation. |
So an error if the source and destination surfaces are the same? I'm totally okay with that. |
OK, I'll open another PR for this |


fix #2102
