I'm having a weird problem. I'm using Visual Studio 2012 Express for Windows Phone 8 and want to refer System.Drawing.dll. I right-clicked "reference" in the project and clicked "Add reference...", however, I cannot find System.Drawing.dll under .NET tab. Any ideas why?
Actually I want to convert my image to base64
. I have one method and this method contains Sysytem.drawing
imaging .dll.
public string imagetobase64(image image,
system.drawing.imaging.imageformat format)
{
using (memorystream ms = new memorystream())
{
// convert image to byte[]
image.save(ms, format);
byte[] imagebytes = ms.toarray();
// convert byte[] to base64 string
string base64string = convert.tobase64string(imagebytes);
return base64string;
}
}
Convert image to base64 string. How can I solve this problem?