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.
我有 PNG,需要知道它是否有 alpha(或者 alpha 是否完全是白色)?如何在 vb.net 代码中完成此操作。
使用System.Drawing.Image.Flags:
Dim HasAlpha As Boolean Using I = System.Drawing.Image.FromFile("c:\test.png") HasAlpha = (I.Flags And System.Drawing.Imaging.ImageFlags.HasAlpha) = System.Drawing.Imaging.ImageFlags.HasAlpha End Using