I have a C# method (that is an ActiveX component that runs on the client) that returns a photo. On C# side I have two properties:
public byte[] Photo { get; set; }
public string PhotoString { get; set; }
The string version is gotten by simple conversion with System.Convert.ToBase64String().
Now I need a way to show that photo using javascript. I tried using the code from this answer: How to display binary data as image - extjs 4
with
$("#imgUserImage").attr("src", 'data:image/jpeg;base64,' + hexToBase64(data.PhotoString));
But that didn't work. Also if I copy my string to the fiddle in that answer it's not working so I'm assuming the problem is in the string.
Any other suggestions?