title: How to fetch image inputstream in angular 6
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>this my component.ts code
  
  this.allMeta.getProfilePictureUsingMediaId({
             "SessionID": "dswesfgdgfdgf12463",
             "MACAddress":"1235874"
             "MediaID":this.userProfilePicture
           }).subscribe(
             data =&gt; {
               console.log(data);
               this.profilepic=data
               }
               );
               
    below is my service code,
    getProfilePictureUsingMediaId(pjson){
      return this.http.post(this.profile + 'getProfilePictureUsingMediaId', pjson)
      .map((data: any) =&gt; data.json());
    }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div style="height:240px" class="row"&gt;
                  &lt;img id="ItemPreview" [src]="'data:image/jpg;base64,'+profilepic" /&gt;
              &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Below displaying data I am getting from server, how to make it visible same image in my web app, beacuse after calling server in service, i got data value undefiend.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>����JFIF��C
  #%$""!&amp;+7/&amp;)4)!"0A149;&gt;&gt;&gt;%.DIC
  &lt;H7=&gt;;��C
  
  ;("(;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;��"����=!1A"Qaq2B��#R�$���3b�Sr�����C����%!1AQ"a2���?B�vϚ���8���\J3��y�A�l9fv��k�&lt;�H�R�{\n��&amp;���T��q�k���h$Yau;�����p���x�������nN�q��RWcp����h�~f}�8#�$�&amp;���$Tn;�6Is�X�"@C��n-ߦϳ��k8�c��)�V���b�Y�\p��Vҍ�fp�'I��S�.4%�Xx����9�S+F������|2D�F՗�d%�F��UlS��NkEL�VP
  �0k�Lr�RRA'�]���禣`���DX��,Hc[�)nO�����i��Ow�sC��";9����-�é2�</code></pre>
  </div>
  </div>
  </p>
  
  <p>Sorry I don't know how to send this data so I am using html to show u this picture and also it is not complete data.</p>