I am trying to convert a Unicode string to an image in C#. Each time I run it I get an error on this line
Image image = Image.FromStream(ms, true, true);
May this can help you:
public Bitmap stringToImage(string inputString) { byte[] imageBytes = Encoding.Unicode.GetBytes(inputString); using (MemoryStream ms = new MemoryStream(imageBytes)) { return new Bitmap(ms); } }