Hate to be paranoid, but....

I wrote a function that takes the height and width of a full size, uploaded image and returns - allegedly, It seems to anyway - new dimensions with the aspect ratio preserved.

My function seems awkward. Could anyone suggest a better approach?
Thanks!

VB Code:
  1. Function RetainAspectRatio(ByVal imgHeight As Integer, ByVal imgWidth As Integer, ByVal IsItASmallThumb As Boolean) As ArrayList
  2.         Dim blnSizeCheck As Boolean = IsItASmallThumb
  3.         Dim maxheight As Integer
  4.         Dim maxwidth As Integer
  5.         If blnSizeCheck Then
  6.             maxheight = 93
  7.             maxwidth = 125
  8.         Else
  9.             maxheight = 300
  10.             maxwidth = 400
  11.         End If
  12.         imgHeight = Convert.ToDouble(imgHeight)
  13.         imgWidth = Convert.ToDouble(imgWidth)
  14.         'Get the new height and width depending on whether the end result will be a small thumb or medium-size image
  15.         'image
  16.         If (imgWidth > imgHeight) Or (imgWidth = imgHeight) Then
  17.             While imgWidth > maxwidth
  18.                 imgWidth = Math.Round(imgWidth - (imgWidth * 0.01), 0)
  19.                 imgHeight = Math.Round(imgHeight - (imgHeight * 0.01), 0)
  20.             End While
  21.         ElseIf imgHeight > imgWidth Then
  22.             While (imgHeight > maxheight) Or (imgWidth > maxwidth)
  23.                 imgWidth = Math.Round(imgWidth - (imgWidth * 0.01), 0)
  24.                 imgHeight = Math.Round(imgHeight - (imgHeight * 0.01), 0)
  25.             End While
  26.         End If
  27.         'send the new dimensions back in an arraylist
  28.         imgWidth = Convert.ToInt32(imgWidth)
  29.         imgHeight = Convert.ToInt32(imgHeight)
  30.         Dim arDimensions As New ArrayList
  31.         arDimensions.Add(imgWidth)
  32.         arDimensions.Add(imgHeight)
  33.         Return arDimensions
  34.     End Function