I haven't worked much with imaging before in C# and am confused by the values I am getting in my imageData byte array when passing it a 15x15 png. I would expect there to be 225 array elements (or more since each pixel would have a r,g,b,a value?), however it only has 124.
What are the 124 elements I'm getting? Additionally, I would like to be able to determine the color of each pixel. Is it possible to do this from the data given in the byte array or is there an entirely better way of doing this in C#?
Thank you
Console.Write("Input file: ");
string fileName = Console.ReadLine();
Console.Write("Output file: ");
string outputFileName = Console.ReadLine();
FileInfo fileInfo = new FileInfo(Path.Combine(Environment.CurrentDirectory, fileName));
byte[] imageData = new byte[fileInfo.Length];
using (FileStream fs = fileInfo.OpenRead())
{
fs.Read(imageData, 0, imageData.Length);
}