I'm writing an image processing class library that targets WPF/WIC/.NET 4 and am looking for some advice. One key piece of functionality my class library needs is the ability to chain together operations in a workflow...in other words I need to pass the
output of one operation as the input of the next operation. All of the processing is being conducted at single-precision. I'd like to be able to just pass a BitmapSource or one of its derivatives to the operation, compute the result, pass this result to the
next operation, etc. until finally the end result is emitted as another BitmapSource. I understand that BitmapSource is immutable and therefore I cannot modify the initial BitmapSource argument in-place, but what is the next best thing? It seems pretty
inefficient to create a new BitmapSource at each step containing the result, especially if the workflow is being looped. I've considered passing around a WriteableBitmap through the chain and modifying its pixels in-place at each step, but unfortunately
it doesn't support all the pixel formats. I could design my own intermediate results class that I pass through the workflow but I'd like to avoid this if at all possible. Does anyone have any suggestions? Thanks in advance.
View Complete Post