Converting the image into binary data can be done like this using c#
foreach (string fileName in Directory.GetFiles(@"C:\SomePath", ".jpg"))
{
using (FileStream fs = new FileStream("<imagepath>", FileMode.Open, FileAccess.Read))
{
byte[] binaryImage = new byte[fs.Length];
fs.Read(binaryImage, 0, (int)fs.Length);
}
}
However, your database will grow a lot if your images are large, like from a system camera, and will make backups slower, so storing only the path to the image and keep them on a hard drive might be more attractive.
This is a bit of religious war between the two sides, so this research paper might be of interest for you to make your own decision.
To BLOB or Not To BLOB[
^]