882088 - fix thumbnail aspect ratio in video app

882088 - better calculation for square images

882088 - use scale function in order to fix 1 pixel issue

882088 - add some comments