Then, while making this mockup, I discovered a bit of a recurring issue with animations: even though the starting and the final states are laid out with parent-child relations (in this case, the child picture is scaled to fit inside the parent black rectangle), in the middle of the animation you *don't* want this. It makes the animation nonlinear and bad looking.
This is the same reason GNOME Shell overview animation sends windows on slightly curved paths btw.
I'm not sure if there's a good generic way to solve this. But either way, the layout code will probably need further complications to support this smooth transitioning.