I am a bit confused by the SplitToneRange IList required for SplitToneFilter.
SplitToneFilter(IList<SplitToneRange> splitToneRanges)
How does one create such ranges? I did the following but I'm not sure if I am going about this correctly.
Windows.UI.Color c = new Windows.UI.Color();
c.R = (byte)155;
c.G = (byte)155;
c.B = (byte)155;
SplitToneRange r = new SplitToneRange(20, 80, c);
SplitToneRange r1 = new SplitToneRange(140, 200, c);
Is this a correct start? And if so, how might I add this to the SplitToneRange(..).
I try creating an IList
IList<SplitToneRange> l = new IList<SplitToneRange>(); //error
But I get the following error
Cannot create an instance of the abstact class or interface
System.Collections.Generic.IList<Nokia.Graphics.Imaging.SplitToneRange>
You can not create an instance of an interface (in your case IList). This isn't a limitation of the Imaging SDK, it's just how C# works. Just create a normal list:
And then add some SplitToneRanges to it:
The rest of your code looks correct (haven't tried it), but usually you will have different colors for different SplitToneRanges, as in my example. Try experimenting with the values to get the feel for what the SplitToneFilter actually does.