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));
More Related Contents:
- Setting WPF image source in code
- WPF Image to byte[]
- Image in WPF Button not Visible at Runtime
- Problems overwriting (re-saving) image when it was set as image source
- Convert System.Windows.Media.ImageSource to System.Drawing.Bitmap
- Wpf Image Control blocks the file
- How to use Resources.resx to link images
- Image file copy, is being used by another process
- How to Display a Bitmap in a WPF Image [duplicate]
- Binding Image.Source to String in WPF?
- Watermark / hint / placeholder text in TextBox?
- Load a WPF BitmapImage from a System.Drawing.Bitmap
- Delete a file being used by another process
- Validate image from file in C#
- How can you clone a WPF object?
- In my WPF application, my loaded PNG logo in image shows at design time but not at run time
- How do I build a DataTemplate in c# code?
- ReSharper WPF error: “Cannot resolve symbol “MyVariable” due to unknown DataContext”
- Using Image control in WPF to display System.Drawing.Bitmap
- How to write a ViewModelBase in MVVM
- Set focus on textbox in WPF
- WPF equivalent to TextRenderer
- WPF Error 40 BindingExpression path error: property not found on ‘object’
- Use “real” CultureInfo.CurrentCulture in WPF Binding, not CultureInfo from IetfLanguageTag
- How do I display progress during a busy loop?
- Accessing properties through Generic type parameter
- Understanding WPF deriving WIndow class
- What are good algorithms for vehicle license plate detection? [closed]
- PropertyChanged for indexer property
- How can I add transparency to a c# form while keeping controls visible?