<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SAS Tip: Images as text - use Base 64 encoding in SAS Tips from the Community</title>
    <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Images-as-text-use-Base-64-encoding/m-p/442531#M140</link>
    <description>&lt;P&gt;A little-known HTML trick is that you can embed images in an HTML file using a Base 64 representation of an image. For example, a folder open image can be generated using the following text in an HTML page:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;lt;img src="&lt;SPAN&gt;data&lt;/SPAN&gt;:image/png;base64,R0lGODlhEAAQAKL/AP//////AMDAwMDAwICAgICAAAAAAAAAACH5BAEAAAIALAAAAAAQABAAAANFKEpMpjAKAkYYTkJqu2sbII6kSCzApXbqM1VrPLiUWpYGFwBF7/+51ID3KwaHReNrlwS+iM0CTRTtTavSjWHL7W41YE0CADs=" border="0" width="4"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which will display as:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OpenFolder.PNG" style="width: 24px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19427i9C21BA7F1318716F/image-size/large?v=v2&amp;amp;px=999" role="button" title="OpenFolder.PNG" alt="OpenFolder.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The width parameter can be used to size the image as desired. Note that the image becomes fuzzy if you use a width that is wider than the original image that you encoded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a number of web-sites that will convert images to the Base 64 representation. This &lt;A href="https://www.google.com/search?q=base+64+encode+image" target="_blank"&gt;Google search provides a sampling&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see the above img tag as an actual image and for a discussion of a parameter/macro driven approach see my blog post&amp;nbsp;&lt;A href="http://hcsbi.blogspot.com/2013/01/the-getimage-macro-embedded-images.html" target="_blank"&gt;The getImage macro: embedded images using text strings&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Thanks to Don Henderson&amp;nbsp;for sharing this tip on sasCommunity.org.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 18:34:57 GMT</pubDate>
    <dc:creator>SAS_Tipster</dc:creator>
    <dc:date>2018-03-23T18:34:57Z</dc:date>
    <item>
      <title>SAS Tip: Images as text - use Base 64 encoding</title>
      <link>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Images-as-text-use-Base-64-encoding/m-p/442531#M140</link>
      <description>&lt;P&gt;A little-known HTML trick is that you can embed images in an HTML file using a Base 64 representation of an image. For example, a folder open image can be generated using the following text in an HTML page:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;lt;img src="&lt;SPAN&gt;data&lt;/SPAN&gt;:image/png;base64,R0lGODlhEAAQAKL/AP//////AMDAwMDAwICAgICAAAAAAAAAACH5BAEAAAIALAAAAAAQABAAAANFKEpMpjAKAkYYTkJqu2sbII6kSCzApXbqM1VrPLiUWpYGFwBF7/+51ID3KwaHReNrlwS+iM0CTRTtTavSjWHL7W41YE0CADs=" border="0" width="4"&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which will display as:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="OpenFolder.PNG" style="width: 24px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19427i9C21BA7F1318716F/image-size/large?v=v2&amp;amp;px=999" role="button" title="OpenFolder.PNG" alt="OpenFolder.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The width parameter can be used to size the image as desired. Note that the image becomes fuzzy if you use a width that is wider than the original image that you encoded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a number of web-sites that will convert images to the Base 64 representation. This &lt;A href="https://www.google.com/search?q=base+64+encode+image" target="_blank"&gt;Google search provides a sampling&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To see the above img tag as an actual image and for a discussion of a parameter/macro driven approach see my blog post&amp;nbsp;&lt;A href="http://hcsbi.blogspot.com/2013/01/the-getimage-macro-embedded-images.html" target="_blank"&gt;The getImage macro: embedded images using text strings&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Thanks to Don Henderson&amp;nbsp;for sharing this tip on sasCommunity.org.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 18:34:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Tips-from-the-Community/SAS-Tip-Images-as-text-use-Base-64-encoding/m-p/442531#M140</guid>
      <dc:creator>SAS_Tipster</dc:creator>
      <dc:date>2018-03-23T18:34:57Z</dc:date>
    </item>
  </channel>
</rss>

