updated for png images.