-->

Using a TreeMap with images

2019-07-16 16:35发布

问题:

For representing most popular artists from EchoNest API, I've been trying to set-up Silverlight Toolkit's TreeMap using images, their TreeItemDefinition.ValueBinding being defined as the area of the image.

While it mostly fills up the space when the image stretch is set to 'Fill' :

When setting image stretch to 'Uniform' a lot of blank spaces remain :

On this post, image carving is suggested : Treemapping with a given aspect ratio

How can I know which images should be carved and at what dimensions they should be carved if possible at all ?

Is this problem solvable without human intervention for a good result ?