Better transparency support in images - merged some changes from Out of the Sea.