批量图片转Base64编码
一切尽在代码中,Base64编码显示图片—踩坑笔记
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
/**
* @author: dkangel
* @since: 2019/12/21 14:22
* @Description: 批量图片转Base64编码
*/
public class Img2Base64Util {
// 图片文件夹路径
private static final String BASE_IMG_PATH = "D:\\picture\\png";
// 输出路径
private static final String RES_IMG_PATH = "D:\\picture\\base64";
// 输出文件格式
private static final String TXT_POSTFIX = ".txt";
public st