I need to perform multiple operations on an Image, for example, I need to resize the image, perhaps pad it to maintain aspect ratio (and draw a background color), and conditionally stamp with a watermark.
I’m currently using BitmapFrame as the type that I pass between the methods involved.
Can anyone recommend another type which I should use to perform incremental updates on images?
I could possibly create a composition of various images, although I’m not sure which types I should use for this?
WriteableBitmapis suitable when you want to make incremental updates of the image. BothBitmapFrameandWriteableBitmapinherit fromBitmapSource, andWriteableBitmapcan be instantiated using anyBitmapSource.You might also want to have a look at the WriteableBitmapEx library that provides a wealth of efficient
WriteableBitmapextension methods for bitmap manipulation. This library is applicable to WPF applications as well as Silverlight, WP7 and Metro.