Forums - C# Corner

Forum guidelines
zozo ahmed

zozo ahmed

  • 1.3k
  • 18
  • 9.6k

convert each location from array of bytes to double

Jan 7 2014 1:11 PM
I need to convert each location of bytes arrays to double ,it can not run with Bitconverter:
byte[,] R = new byte[width, height]; 
byte[,] G = new byte[width, height]; 
byte[,] B = new byte[width, height]; 
double[,] Y1 = new double[width, height]; 
for (int x = 0; x < width; x++) 
 for (int y = 0; y < height; y++) 
           double ee = BitConverter.ToDouble(R[x, y], x, y);
 double ee1 = BitConverter.ToDouble(G[x, y], x, y); 
           double ee2 = BitConverter.ToDouble(B[x, y], x, y); 
           Y1[x, y] = (0.39 * ee) + (0.59 * ee1) + (0.12 * ee2);
Is there method for convert each location of byte array to double??

Answers (1)

Unlimited Flat-Free License


File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!