太阳不下山 发表于 2021-7-6 16:40:32

matlab把图片转为base64

function = base64file(file)
fid = fopen(file,'rb');
bytes = fread(fid);
fclose(fid);
base64string_len = size(bytes,1);
encoder = org.apache.commons.codec.binary.Base64;
base64string = char(encoder.encode(bytes))';
end
  
文档来源:51CTO技术博客https://blog.51cto.com/u_15284226/2992304
页: [1]
查看完整版本: matlab把图片转为base64