0

I have PNG and need to know if it has an alpha (or if the alpha is completely white)? How can I accomplish this in vb.net code.

1 Answer 1

1

Use 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.