Public Function ImageResize() As Boolean Dim lnRatio As Double = 0 Dim lnRatioImage As Double = 0 Dim loFinalImage As Bitmap = Nothing Dim loGraphics As System.Drawing.Graphics Dim loImage As System.Drawing.Bitmap lImageHasBeenPreserved = False ' If the image is already with the proper dimensions If nWidth = oImage.Width And nHeight = oImage.Height Then lImageHasBeenPreserved = True Return True End If loImage = New System.Drawing.Bitmap(nWidth, nHeight, oImage.PixelFormat) ' Make sure we can resize If loImage.PixelFormat = Drawing.Imaging.PixelFormat.Format1bppIndexed Or _ loImage.PixelFormat = Drawing.Imaging.PixelFormat.Format4bppIndexed Or _ loImage.PixelFormat = Drawing.Imaging.PixelFormat.Format8bppIndexed Or _ loImage.PixelFormat = Drawing.Imaging.PixelFormat.Undefined Or _ loImage.PixelFormat = Drawing.Imaging.PixelFormat.DontCare Or _ loImage.PixelFormat = Drawing.Imaging.PixelFormat.Format16bppArgb1555 Or _ loImage.PixelFormat = Drawing.Imaging.PixelFormat.Format16bppGrayScale Then cMessage = cPixelFormatNotSupported nError = 1 Return False End If lnRatio = nWidth / nHeight lnRatioImage = oImage.Width / oImage.Height If lnRatioImage < lnRatio Then nCropWidth = oImage.Width nCropHeight = oImage.Width / lnRatio Else nCropWidth = oImage.Height * lnRatio nCropHeight = oImage.Height End If ' Crop first If Not Crop() Then Return False End If ' Create the placeholder loFinalImage = New Bitmap(nWidth, nHeight) ' Assign the placerholder into the graphic converter loGraphics = System.Drawing.Graphics.FromImage(loFinalImage) ' Set the parameters loGraphics.SmoothingMode = Drawing.Drawing2D.SmoothingMode.HighQuality loGraphics.InterpolationMode = Drawing.Drawing2D.InterpolationMode.HighQualityBicubic loGraphics.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality loGraphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality ' Resize the image loGraphics.DrawImage(oImage, 0, 0, nWidth, nHeight) ' Release the image loGraphics.Dispose() ' The oImage property can now be assigned to the resized version oImage = loFinalImage Return True End FunctionThat code did not change. It is the same since two years.