Aspect ratio, is calculated simply as width / height
. Given one dimension in the result size, you can calculate the other. If the height is always 80, the aspect ratio varies, but it's easy to calculate for each image.
As an example, for your 320x210 image the aspect ratio is:
aspect ratio = w / h = 320 / 210 = 1.5238..
Now, given that the height is 80, you can compute width like this (we round to the nearest integer):
w = h * aspect ratio = 80 * 1.5238.. = 121.904.. => 122
Using the same formula, you could also compute the height, given a width, like:
h = w / aspect ratio = 122 / 1.5238.. = 80.064.. => 80