This project has moved. For the latest updates, please go here.

Image processing

Dec 6, 2015 at 4:29 PM
Edited Dec 6, 2015 at 4:34 PM

would be nice to have the ability to process images right after they have been loaded. This would allow e.g. for grayscale bitmaps, inverted bitmaps, night mode bitmaps, etc.

Suggest to add the following interface:
interface IImageProcessor
    ImageSource Process(ImageSource image);
After every BitmapFrame.Create there should be a call to an implementation of the interface - if it is registered. Think the right place for a property would be the tile layer.

I wrote a simple image processing class which allows all that manipulations, possibly I can supply that class for the public.

Best regards,
Dec 6, 2015 at 6:43 PM
Edited Dec 6, 2015 at 6:43 PM
The right place to do this is a derived ImageTileSource.
Dec 7, 2015 at 11:02 AM
Yes, but then all caching capabilities get lost. Of course, I can modify the existing sources to meet my needs, but to have it in the official line would be better.

Best regards,
Dec 7, 2015 at 11:27 AM
Or you create your own TileImageLoader class from a copy of the existing source, and pass an instance of that class to the (base class) constructor of a derived TileLayer. Thus the code base would be kept clean from rarely used things.