This function convert BMP to String
public string ConvertImage(Bitmap tempBitmap)
{
MemoryStream objStream = new MemoryStream();
tempBitmap.Save(objStream, ImageFormat.Jpeg);
return Convert.ToBase64String(objStream.ToArray());
}
and how you call above function is mention below
public void convert_BMP_into_String()
{
Bitmap obj_Bitmap = new Bitmap(@"C:\temp.jpg");
string temp_String = ConvertImage(obj_Bitmap);
StreamWriter sw = new StreamWriter(@"C:\temp.text", false);
sw.Write(temp_String);
sw.Close();
}