U 添加 背景图为 png 设置指定转换类型为 jpg 导致的图片变色警告日志

This commit is contained in:
天爱有情
2022-05-09 10:45:26 +08:00
parent 4f87cfb29a
commit bbf65018ed
4 changed files with 116 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
package example;
import cloud.tianai.captcha.generator.common.util.CaptchaImageUtils;
import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
public class DemoTest {
public static void main(String[] args) throws FileNotFoundException {
BufferedImage bufferedImage = CaptchaImageUtils.wrapFile2BufferedImage(new FileInputStream("E:\\projects\\tianai-captcha\\src\\main\\resources\\META-INF\\cut-image\\resource\\1.jpg"));
System.out.println(bufferedImage.getType());
}
}