THis vb.net works on Windows Mobile. Only constraint: Large Bitmaps cause an OutOfMemoryException when opened:
Private Function ResizedImage(ByVal image As Bitmap, ByVal maxW As Integer, ByVal maxH As Integer) As Bitmap
Dim divideByH, divideByW As Double
Dim width, height As Integer
divideByW = image.Width / maxW
divideByH = image.Height / maxH
If divideByW > 1 Or divideByH > 1 Then
If divideByW > divideByH Then
width = CInt(CDbl(image.Width) / divideByW)
height = CInt(CDbl(image.Height) / divideByW)
Else
width = CInt(CDbl(image.Width) / divideByH)
height = CInt(CDbl(image.Height) / divideByH)
End If
Dim scaled As New Bitmap(width, height)
Dim g As Graphics
g = Graphics.FromImage(scaled)
g.DrawImage(image, New Rectangle(0, 0, width, height), New Rectangle(0, 0, image.Width, image.Height), GraphicsUnit.Pixel)
g.Dispose()
ResizedImage = scaled
Else
ResizedImage = image
End If
End Function