Commit 64123a2d by 王祖波

改为jpg

parent d7747abd
......@@ -116,7 +116,7 @@ public class DrawImageUtils {
int amountX = drawBkgImg.amountStart + (drawBkgImg.amountWidth - metrics.stringWidth(amountText)) / 2;
pen.drawString(amountText, amountX, 250);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ImageIO.write(image, "jpg", bos);
ImageIO.write(image, "png", bos);
pen.dispose();
CloudFileInfo cloudFileInfo = CloudFileUtil.uploadFile(bos.toByteArray(), "jpg", CloudFileTypeEnum.IMAGE, factoryCode, CloudFileBusinessOptEnum.HAOBAN_COMMON);
log.info("上传图片结果:{}", JSON.toJSONString(cloudFileInfo));
......@@ -136,8 +136,8 @@ public class DrawImageUtils {
Random random = new Random();
String url = DrawImageUtils.drawImage("jhdm", Math.abs(random.nextInt(1000)) + "",
Math.abs(random.nextInt(1000)) + "万", DrawBkgImg.AREA_MONTH_BKG);
String temp = DrawImageUtils.drawImage("jhdm", Math.abs(random.nextInt(1000)) + "",
Math.abs(random.nextInt(1000)) + "万", DrawBkgImg.CLERK_MONTH_BKG);
System.out.println(url);
// String temp = DrawImageUtils.drawImage("jhdm", Math.abs(random.nextInt(1000)) + "",
// Math.abs(random.nextInt(1000)) + "万", DrawBkgImg.CLERK_MONTH_BKG);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment