<?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 Re: convert image to base64 using javascript in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/convert-image-to-arraybuffer-in-qml-or-javscript/m-p/1008370#M3877</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please anyone ellaborate ME HOW TO CONVERT&lt;STRONG&gt; IMAGE TO BINARY or ARRAYBUFFER&lt;/STRONG&gt;, SO THAT FURTHER I CAN CONVERT IT INTO BASE64&lt;/P&gt;</description>
    <pubDate>Thu, 10 Dec 2020 05:38:15 GMT</pubDate>
    <dc:creator>rsharma</dc:creator>
    <dc:date>2020-12-10T05:38:15Z</dc:date>
    <item>
      <title>convert image to arraybuffer in qml or javscript for further base64 conversion</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/convert-image-to-arraybuffer-in-qml-or-javscript/m-p/1007622#M3867</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In my last post i was not able to send picture , now i can send an image to my private server with hardcode base64 data,.&lt;/P&gt;&lt;P&gt;But i don't know how to convert an image(&lt;STRONG&gt;i have only url of that image&lt;/STRONG&gt;) to base64 string, so that i can send it through xmlhttprequest,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above is possible in html with javascript, but how to do it in qt quick javascript.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.codegrepper.com/code-examples/cpp/convert+image+to+base64+javascript" target="_blank" rel="noopener"&gt;https://www.codegrepper.com/code-examples/cpp/convert+image+to+base64+javascript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got this link below for qt but want to do it through js.&lt;/P&gt;&lt;P&gt;&lt;A href="https://felgo.com/developers/forums/t/upload-jpeg-to-server-created-from-camera" target="_blank" rel="noopener"&gt;https://felgo.com/developers/forums/t/upload-jpeg-to-server-created-from-camera&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Exactly i m doing the same like selecting pictures from group send an array of picture to my private server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 06:19:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/convert-image-to-arraybuffer-in-qml-or-javscript/m-p/1007622#M3867</guid>
      <dc:creator>rsharma</dc:creator>
      <dc:date>2020-12-10T06:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: convert image to base64 using javascript</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/convert-image-to-arraybuffer-in-qml-or-javscript/m-p/1008370#M3877</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please anyone ellaborate ME HOW TO CONVERT&lt;STRONG&gt; IMAGE TO BINARY or ARRAYBUFFER&lt;/STRONG&gt;, SO THAT FURTHER I CAN CONVERT IT INTO BASE64&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 05:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/convert-image-to-arraybuffer-in-qml-or-javscript/m-p/1008370#M3877</guid>
      <dc:creator>rsharma</dc:creator>
      <dc:date>2020-12-10T05:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: convert image to base64 using javascript</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/convert-image-to-arraybuffer-in-qml-or-javscript/m-p/1014490#M3899</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/222605"&gt;@rsharma&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;If you are using AppStudio, then, you can do this in QML using NetworkRequest and setting the responseType to "base64". Alternatively, if the uri is to a local file, you can use the File and BinaryData objects together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are not using AppStudio, then, but are using C++, then, you can use the QNetworkAccessManager to download your uri content. The resultant QByteArray and be converted to base64 using QByteArray::toBase64. (See &lt;A href="https://doc.qt.io/qt-5/qbytearray.html#toBase64" target="_blank"&gt;https://doc.qt.io/qt-5/qbytearray.html#toBase64&lt;/A&gt;&amp;nbsp;)&lt;BR /&gt;&lt;BR /&gt;Let me know if you need further information on either of these two strategies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jan 2021 23:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/convert-image-to-arraybuffer-in-qml-or-javscript/m-p/1014490#M3899</guid>
      <dc:creator>StephenQuan4</dc:creator>
      <dc:date>2021-01-06T23:23:43Z</dc:date>
    </item>
  </channel>
</rss>

