转换为范围从 0 到 255 的值:rOut = (rA * aA/255) + (rB * aB * (255 - aA)/(255*255))gOut = (gA * aA/255) + (gB * aB * (255 - aA)/(255*255))bOut = (bA * aA/255) + (bB * aB * (255 - aA)/(255*255))aOut = aA + (aB * (255 - aA)/255)How can I mix two ARGB pixels ?ExampleHere A is (Red with Alpha) and B is ( Blue with Alpha ). 解决方案 Taken from the same Wikipedia article where you got the image:Translating to values which range from 0 to 255:rOut = (rA * aA / 255) + (rB * aB * (255 - aA) / (255*255))gOut = (gA * aA / 255) + (gB * aB * (255 - aA) / (255*255))bOut = (bA * aA / 255) + (bB * aB * (255 - aA) / (255*255))aOut = aA + (aB * (255 - aA) / 255) 这篇关于如何混合两个 ARGB 像素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-01 11:14