0

I am trying to display an asp.net Image using a Base64 String. It works in Explorer but not in Chrome.

Here is the code:

string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);
Image1.ImageUrl = "data:image/jpeg;base64," + base64String;

http://juanpado.brinkster.net/pagina1.html

Werner
  • 2,537
  • 1
  • 26
  • 38
  • possible duplicate of [Firefox and Chrome won't decode base64 image or pdf files](http://stackoverflow.com/questions/9936239/firefox-and-chrome-wont-decode-base64-image-or-pdf-files) – CodeCaster Jan 12 '15 at 17:20
  • And [Display TIFF image in all web browser](http://stackoverflow.com/questions/2176991/display-tiff-image-in-all-web-browser). – CodeCaster Jan 12 '15 at 17:20
  • Thanks Werner. I review the image format and they were saved in database as blob indicating jpg format. – user3654198 Jan 14 '15 at 14:40
  • Could you check the image example I published in the URL: http://juanpado.brinkster.net/pagina1.html? – user3654198 Jan 14 '15 at 14:41
  • No, that's a TIFF. The first two bytes are "MM", where a JPEG would be "JFIF" or "Exif" in the first few bytes. – CodeCaster Jan 14 '15 at 14:42

0 Answers0