Use UIImagePNGRepresentation to preserve transparency (fix for #545)