Fix for 8-Bit PNGs

The transparency variable can contain an empty string on 8-Bit PNGs, which caused an exception.