public class ImageKit extends Object
ImageKit class.
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
encodeBase64(File imageFile)
将文件编码成base64格式
|
static String |
encodeBase64(String imageFilePath)
将文件编码成base64格式
|
static String |
encodeDataUri(File imageFile)
生成形如data:image/jpeg;base64,iVBORw0KGgoA……的字符串,将图片文件Data URI化
|
static String |
encodeDataUri(String imageFilePath)
生成形如data:image/jpeg;base64,iVBORw0KGgoA……的字符串,将图片文件Data URI化
|
public static String encodeDataUri(String imageFilePath) throws IOException
imageFilePath - 图片文件路径IOException - if any.public static String encodeDataUri(File imageFile) throws IOException
imageFile - 图片文件对象IOException - if any.public static String encodeBase64(String imageFilePath) throws IOException
imageFilePath - 图片文件路径IOException - if any.public static String encodeBase64(File imageFile) throws IOException
imageFile - 图片文件对象IOException - if any.Copyright © 2023. All rights reserved.