[#438] fixed parsing of the Tiled transparency attribute for Image

also refactored some code