且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在PHP-GD中将两个.png与透明度合并时的奇怪的透明度效果

更新时间:2022-06-12 08:55:27

GD在32位PNG中不支持透明性.您必须使用带有一种透明颜色"的8位或24位(正式的24位不支持透明,但是当使用保存为网络"和24位png时,Photoshop可以做到这一点.)

GD does not support transparency in 32-bit PNG. You have to use either 8-bit with one transparent 'color' or 24-bit (officially 24-bit does not support transparency, but Photoshop can do it when using 'save for web' with 24bit png).