always ensure same image size
move definition of aspectRectangle() function
cosmetic changes