Solved

data:image/png;base64 - decoding the HTML

Posted on 2014-07-28
1
1,101 Views
Last Modified: 2014-07-29
Hi
I have seen some code which really puzzles me, it is:

<image id="OpenLayers_Geometry_Point_6367" cx="312.4132960588904" cy="218.4827694234491" r="1" preserveAspectRatio="none" x="312" y="206" width="125" height="50" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAH0AAAAyCAYAAABxjtScAAAF6UlEQVR4Xu2Z3SttWxTA5/a1N3fTptzui/IRl3yWunjxgrq4D6euHOUrIR58lEIoHIoiKcQDUZQXSpIi8uYP8OBFePDELYUHznF93Dlmd6zmXnutPW3bOZy556rdZq4x5xpj/MYYc8y1LURdPucBi89ZrAwmCroPBoGCrqD7oAd80GSvM72jo6PPB/3205k8MjLyBZX2CjoAj4mJ6YuLi/vpnOBLCp+enhL6GaDg+8Fur6Hn5+f3FRQUeLWOLwF4D1t3d3efd3Z2FPT3cP57PVNBf4Xnt7e3SU9PDyktLSV0S3vFCm835fz8nIyNjZGhoSESGBj4ooU9ht7c3GwNDQ11PDw8OPz9/R1PT0/s4+fn53h+fv6blvd8vrzrlTo8PCTV1dVkcnKS5OTkEDqX9Pb2kqurKzI+Ps4UB5mmpiayublJQkJCCH0WmzM7O8v+xwudz1sKINra2hiQs7MzdgvhgC6wzuXlJRsHYLm5uS5Oc+dI0KWiooIMDw8T2r+wdfR6wLrwzB9xvQl0qvAaVfYfh8MRRw20w4eCsdOxCPq3DfZ9CuZrcHCwn81mewgKCvoXviMiIn6l36SwsNBpP+eVAmfX1taSqakpzWFwf3R0lMFuaGjQxufm5khYWBhzHjgV/oYgcXfhnOTkZHJzc6MF1cDAAIN9e3urjSM8CJCVlRWnTBFB5wMQdNvY2NACFoJ4fn6ePe+lmedNcLwJ9O7u7kPqkN8jIyO/xcfH2xITEwkFagGgFDQJCAjwqElDpVpbWxlUHjhmyfX1NYOBkGEcobS0tJC1tTVh+YLnNDY2kuXlZadqYFYlAA4EQ1FRkUfQ+efQgHfJegSIdkd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6fEyFFinoQhfJJ6Cgy8dUaJGCLnSRfAIKunxMhRYp6EIXySegoMvHVGiRgi50kXwCCrp8TIUWKehCF8kn8B/81GtvABNw0QAAAABJRU5ErkJggg==" style="opacity: 1" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></image>

Open in new window



I'm looking at doing something similar myself
However, I would like to know how its done on this site first
Is there a way to decode the Data Image link?

Its shows this popup bubble image:
testtest3333Depending on the length of the driver name, the bubble changes in size
the text is not text in the HTML, its all part of the image, so its obviously created server side, but i just wanted to try and figure out a bit more on how to do it and was hoping decoding html might help
0
Comment
Question by:websss
1 Comment
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 40226008
Is there a way to decode the Data Image link?
Yes. These are known as data URIs. They are most-often encoded, as is the case with this one, in base 64 encoding. So all you need to do is decode the base 64 string. However, the result you end up with will be binary data, so you would want to write it out to disk in order to actually view it. In this example, your image data is:

Decoded Image
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now