C# Convert Color to argb -


this question has answer here:

how convert color argb array int

pseudo example

color color=nw.getpixel(i, j); int[] argbarray = color.toargbarray();  result: argbarray[0]=255  (alpha) argbarray[1]=241  (red) argbarray[2]=128  (green) argbarray[3]=69   (blue) 

i searched through google, did not give sense of needed

i googled c# color bytes , first result convert color byte value

still no sense?

btw: way be:

color color = color.fromargb(1,2,3,4);  //alpha,red, green, blue var argbarray = bitconverter.getbytes(color.toargb())                 .reverse()                 .toarray(); 

argbarray[0]=1  (alpha) argbarray[1]=2  (red) argbarray[2]=3  (green) argbarray[3]=4  (blue) 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -