Check out example codes for "c# image to byte array". It will help you in understanding the concepts better.

Code Example 1

public byte[] ImageToByteArray(System.Drawing.Image imageIn)
{
   using (var ms = new MemoryStream())
   {
      imageIn.Save(ms,imageIn.RawFormat);
      return  ms.ToArray();
   }
}

Learn ReactJs, React Native from akashmittal.com