[英]TypeError: 'pygame.Surface' object is not callable when trying to resize image
我正在尝试调整图片大小,但我不断收到此错误: builtins.TypeError: 'pygame.Surface' object is not callable
。 我将如何修复它?
这是我当前的代码
image = pygame.image.load("spaceship.jpg") #loading image
image = pygame.transform.scale(image(100,100)) #Changing size
screen.blit(image, (500,600)) #Location of picture
问题是由类型引起的。 A ,
在iamge
和(100,100)
之间缺失:
image = pygame.transform.scale(image(100,100))
image = pygame.transform.scale(image, (100, 100))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.