mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
Merge pull request #985 from juzi214032/feat/captcha/base64
feat(captcha): 新增获取验证码带文件格式的 Base64 编码
This commit is contained in:
commit
403c2b1f18
@ -194,6 +194,15 @@ public abstract class AbstractCaptcha implements ICaptcha {
|
|||||||
return Base64.encode(getImageBytes());
|
return Base64.encode(getImageBytes());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取图片带文件格式的 Base64
|
||||||
|
*
|
||||||
|
* @return 图片带文件格式的 Base64
|
||||||
|
*/
|
||||||
|
public String getImageBase64Full(){
|
||||||
|
return "data:image/png;base64," + Base64.encode(getImageBytes());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义字体
|
* 自定义字体
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user