Saturday, June 22, 2013

Useful Xamarin.IOS code for Filter Information.

I know with IOS7 coming, making Filter code could be a thing of the past..

But I wanted to throw this code out there anyways.


CIFilter filter = CIFilter.FromName ("CISharpenLuminance");
string[] keys = filter.InputKeys;
NSDictionary attributes = filter.Attributes;
foreach(NSObject key in attributes.Keys)
{
    Console.WriteLine(key.ToString());
    Console.WriteLine (attributes[key].ToString());
}
foreach (string s in keys)System.Console.WriteLine (s);


Pick your filter.. throw it into the CIFilter.FromName() line, and bam, you have all the info you need to apply it.

No comments:

Post a Comment