Export hierarchical tree to an image