I have found that an image can be stored as some string .To give an example I have included a ms word part that has an image.I saved a word file with image and saved it as xml format .when i opened the xml file in a notepad i got following section .It must be the image being stored as some stream of text. Is there a similar way to do it in .net.
<pkg:part pkg:name="/word/media/image1.png" pkg:contentType="image/png" pkg:compression="store">
<pkg:binaryData>
iVBORw0KGgoAAAANSUhEUgAAAMgAAAA2CAMAAAC1HibFAAADAFBMVEWlweL95Mn90qXs8vn7woTi
6/b7unT94sO8oIP93br4okTJjExJgsS9mXT5rVr7xYr4mzaStdz+/v/5qlT3kiT7vnuCqdb7zZv8
1aqXqb5GgMP4nTt6mLpMhMX//Pn/+vT/s1n/4rU+fMH+8eXT4fH1+PyTqsb++PGXl5n3lSpQh8b9
6tVLg8T3iRP6sWO80el5o9OpxOP+7t3+9uz+2rLC1ez+7Nmbut6yyub+9On5pUqQt+P3jh2SmqNE
...Truncated for easy reading...
ex9vtLWG320M9N9gHow3tv8BO9hrVo7LVzgAAAAASUVORK5CYII=
</pkg:binaryData>
</pkg:part>
I have tried following way
Bitmap bmp = new Bitmap(@"D:/bmp.bmp");
MemoryStream mem = new MemoryStream();
byte[] b = mem.ToArray();
But it give me a byte array instead of characters.If it was characters ,I could use it in many ways such as saving in xml format , using sql insert to insert image in a varchar insead of a blob. etc.