My app will be doing some proportional image scaling. To figure the size to scale to, I have a function that takes the original size and the target size and scales it proportionally to fit within the target size (i.e. without stretching in, in other words, zoom to fit).

It's a little embarrassing, but I can't seem to work out the math in my head for this. I'm not worried about the position of the image as it is always centered.

Can anybody help?

Code:
    Private Shared Function ScaleSize(ByVal OriginalSize As Size, ByVal Target As Size) As Size

    End Function
Yes. Honestly, all I have for this is an empty function. Again, I'm slightly embarrassed at this.