You make the assumption that the edge where the data first appears is the reference edge. Thus start the crop from the side were you start to paint the preview.
You make the assumption that the edge where the data first appears is the reference edge. Thus start the crop from the side were you start to paint the preview.