厂址:http://www.cnblogs.com/yunfeifei/p/4165351.html 1.在C#中将图片转化成base64字符串: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace ConvertImgToBase64 { class Program { static void Main(string[]…
public class ImageToBase64 { //图片转化成base64字符串 public static String GetImageStr(String path,int width,int height) throws IOException {//将图片文件转化为字节数组字符串,并对其进行Base64编码处理 File srcFile = new File(path);//文件上服务器上面的地址 if (!srcFile.exists()) return "";…