c# - Error System.Windows.Media.Color.A.get -


i have project image editor , erroneous reference markets 'system.windows.media.color.a.get' , not because make mistake brand error code in visual studio 2012 windows phone 8

would appreciate help

        public writeablebitmap process(writeablebitmap input)     {         var result = new writeablebitmap(input.pixelwidth, input.pixelheight);         var resultpixels = result.pixels;         var inputpixels = input.pixels;         var ta = color.a;         var tr = color.r;         var tg = color.g;         var tb = color.b;          (int = 0; < inputpixels.length; i++)         {             var c = inputpixels[i];             var = (byte)(c >> 24);             var r = (byte)(c >> 16);             var g = (byte)(c >> 8);             var b = (byte)(c);              int gray = (r * 6966 + g * 23436 + b * 2366) >> 15;              = (byte)((a    * ta) >> 8);             r = (byte)((gray * ta) >> 8);             g = (byte)((gray * ta) >> 8);             b = (byte)((gray * ta) >> 8);              resultpixels[i] = (a << 24) |                 (r << 16) |                 (g << 8) |                 b;         }         return result;     } 

what expected below lines?

var ta = color.a; var tr = color.r; var tg = color.g; var tb = color.b; 

according error using system.windows.media.color class , properties called 'a,r,g,b' public properties call static properties. if need access non static property need create object of it.


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -