Public Sub calculateAspectRatio(dir As String, fileName As String, srcWidth As Int, srcHeight As Int, maxWidth As Int, maxHeight As Int) As Int()
Private exifdata1 As ExifData
exifdata1.Initialize(dir, fileName)
Private fRatio As Float = Min(maxWidth / srcWidth, maxHeight / srcHeight)
Private iDims(2) As Int
iDims(0) = srcWidth * fRatio
iDims(1) = srcHeight * fRatio
Return iDims
End Sub