is there a function or a way of checking if a given png has alpha channels or interlacing?

cant figure it out.

cheers anyone who can help.