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

Code Example 1

public static class ImageExtensions
{
    public static byte[] ToByteArray(this Image image, ImageFormat format)
    {
        using(MemoryStream ms = new MemoryStream())
        {
            image.Save(ms, format);
            return ms.ToArray();
        }
    }
}

Learn ReactJs, React Native from akashmittal.com