LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert Image to base64

How to convert image (Such as .png/.jpg/.bmp/.mp3) file to base64 strings by LabVIEW? Because base64 is one very popular format on the web/internet application. Many online cloud APIs need upload the image file with base64 string through HTTP/POST method. Such as the online OCR API, TTS API... Thanks in advance.

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2011/2013/2015/2016/2020; test system development; FPGA; PCB layout; circuit design...
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net: My Blog

iTestGroup: One-step test solution provider!
ONTAP.LTD : PCBA test solution provider!
0 Kudos
Message 1 of 4
(4,798 Views)

Have you tried typing "LabVIEW base64" into Google or another search engine?  There are numerous "hits" ...

 

Bob Schor

0 Kudos
Message 3 of 4
(4,792 Views)

Sorry, maybe confuse you and also other persons.

The concerns are both the "image" and "base64". I have tried to use the "Read from Text File " and "Read from Binary File" Function to read the image file, and then convert to the Base64 strings through the Utility VIs which designed by Christian. But finally this method is not successful for my application. My application is used one online OCR API to recognize the strings (letters, numbers, Chinese characters etc) of the pictures, thousands of pictures totally. 

Of course, this don't mean the Base64 utility is incorrect, but some other issues. Finally I use another way to complete this task---Use the Python to complete the images-to-Base64 conversion.

Thanks for your reply. 

 

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2011/2013/2015/2016/2020; test system development; FPGA; PCB layout; circuit design...
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net: My Blog

iTestGroup: One-step test solution provider!
ONTAP.LTD : PCBA test solution provider!
0 Kudos
Message 4 of 4
(4,740 Views)