Skip to content

Commit 6988580

Browse files
author
yangzhao
committed
no message
1 parent a7cc1c4 commit 6988580

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common-core/src/main/java/com/yz/common/core/utils/ImageUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ImageUtil {
1515
* @param imgFile
1616
* @return
1717
*/
18-
public String imageToBase64(File imgFile) {// 将图片文件转化为字节数组字符串,并对其进行Base64编码处理
18+
public static String imageToBase64(File imgFile) {// 将图片文件转化为字节数组字符串,并对其进行Base64编码处理
1919
String contentToBase64 = FileUtils.fileContentToBase64(imgFile);
2020
String name = imgFile.getName();
2121
String suffix = name.substring(name.lastIndexOf(".") + 1);
@@ -28,7 +28,7 @@ public String imageToBase64(File imgFile) {// 将图片文件转化为字节数
2828
* @param imgFilePath 图片本地路径
2929
* @return
3030
*/
31-
public String imageToBase64(String imgFilePath) {// 将图片文件转化为字节数组字符串,并对其进行Base64编码处理
31+
public static String imageToBase64(String imgFilePath) {// 将图片文件转化为字节数组字符串,并对其进行Base64编码处理
3232
File file = new File(imgFilePath);
3333
return imageToBase64(file);
3434
}

0 commit comments

Comments
 (0)