made compatible with 1.2 and bigger
changed aspect ratio for non square images