繁体   English   中英

类型错误:尝试调整图像大小时,“pygame.Surface”对象不可调用

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM