Moved image aspect calculation

The image aspect should be calculated for each image itself because
within a page there can be multiple images with diferent aspect ratio's
that have to filled/centered.