Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

base64 image not displaying properly

  • 4 antwurd
  • 11 hawwe dit probleem
  • 3 werjeftes
  • Lêste antwurd fan cor-el

more options

I have a small Qt/C++ Program which converts the png images to base64 strings i use that string to display images on my webpage...

this data works fine on Google Chrome and other webkit based browsers but on FireFox it just shows upper part of the image and rest of the image is empty/blank....

is there any special method I have to follow in "< img src = .... / >" tag while displaying the base64 data on fire fox

currently I am doing is < img src =" data:image/png;base64;charset=utf-8,ivr......." / >

I have a small Qt/C++ Program which converts the png images to base64 strings i use that string to display images on my webpage... this data works fine on Google Chrome and other webkit based browsers but on FireFox it just shows upper part of the image and rest of the image is empty/blank.... is there any special method I have to follow in "< img src = .... / >" tag while displaying the base64 data on fire fox currently I am doing is''' < img src =" data:image/png;base64;charset=utf-8,ivr......." / >'''

Bewurke troch abhishekworld op

Alle antwurden (4)

more options

why was the image not displaying properly on facebook?

more options

Does it work if you use: "data:image/png;base64,ivr......." ?

Does that base64 data have embedded line breaks?

Make sure that it is one long line.

You can also try to convert via this online site.

http://www.motobit.com/util/base64-decoder-encoder.asp
more options

This is exactly what I am trying i have a PHP code

post.php http://pastebin.com/WqnwphQq this returns one small xml which contents base64 data ... which I am calling from AJAX post this is my java script http://pastebin.com/C0zppqsR

the output of ele.firstChild.nodeValue is different in firefox and chrome

I can see that the string which we get in firefox is totally change form the actual generated PHP response (I have checked it using firebug )... any pointers ?? i have attached the sample image

more options

Firefox also stores line breaks as text nodes in the DOM, so it is possible that ele.firstChild is a text node and not the node that you expect.
You may need to walk the DOM tree and check that the nodeType is 1 and not 3

You can check that in the DOM Inspector.

DOM Inspector: https://addons.mozilla.org/firefox/addon/6622