开发者

Having issues with making Sprites transparent in pygame! (image included inside)

开发者 https://www.devze.com 2023-03-19 07:37 出处:网络
Even though I\'ve set the transparency of the image to \'开发者_运维知识库True\', I am still unable to clear the fuzz around it. I\'ve tried various methods, playing around with it in Photoshop to n

Having issues with making Sprites transparent in pygame! (image included inside)

Even though I've set the transparency of the image to '开发者_运维知识库True', I am still unable to clear the fuzz around it. I've tried various methods, playing around with it in Photoshop to no avail. Any help would be greatly appreciated. Thanks!


It looks like on the image in photoshop, you'll need to clean up the file. Check the alpha on the parts of the image that are white.


Note: save as png. Jpeg will cause compression, probably why you are expecting a solid color of white, and it isn't.

Png will be loss-less, and even has alpha-transparency (255 levels if wanted).

Or you can set alpha using color_key of white.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号