Rectangle coordinates from treemap image

a single example is very much not enough to say how to handle that in general, other than “use photoshop”