Convert Base64 string to an image in matlab?
이전 댓글 표시
I am wondering if any one could direct me to a matlab function/code that would allow me to convert a Base64 string to an image? You can do so via the below website (by simply pasting your string into a text box). But I would like to integrate this into a script and save out the image file.
Any help would be greatly appreciated.
Thanks,
Siobhán

채택된 답변
추가 답변 (2개)
James Tursa
2018년 11월 2일
Maybe some variation of this:
encoder = org.apache.commons.codec.binary.Base64;
bytes = encoder.decode(int8(base64string'));
JiaChun Lin
2020년 4월 30일
0 개 추천
can use raw = matlab.net.base64decode(% input the base64 encode....);
then as what Walter said, use 'fopen, fwirte, fclose, without having tried to display it'. it really works, thanks very much.
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!