Resize image in WPF

As to the resizing itself, using WPF’s TransformedBitmap seems a bit easier:

var bitmap = new TransformedBitmap(bitmapSource, 
    new ScaleTransform(
        newWidth / bitmapSource.PixelWidth, 
        newHeight / bitmapSource.PixelHeight));

Leave a Comment