Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我一直在玩PNGCanvas,我想不通的一件事是如何为图像添加透明度。我一直在尝试改变 alpha 通道值,但它只调整颜色的强度。我是在使用这个库找到错误的树,还是有希望?
你找错树了。这是来自的报价PNGCanvas.dump:
PNGCanvas.dump
# 8-bit image represented as RGB tuples # simple transparency, alpha is pure white
进一步查看它的代码,当您提供 alpha 时,它只是将它与背景混合,最终的背景只是白色。