I have an image (in .png format), and I want this picture to convert to binary.
How can this be done using C#?
byte[] b = File.ReadAllBytes(file);
File.ReadAllBytes Method
Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With