Added support for both PNG-24 and PNG-8.