Commit d7747abd by 王祖波

改为jpg

parent c2f8f135
......@@ -116,9 +116,9 @@ 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, "png", bos);
ImageIO.write(image, "jpg", bos);
pen.dispose();
CloudFileInfo cloudFileInfo = CloudFileUtil.uploadFile(bos.toByteArray(), "png", CloudFileTypeEnum.IMAGE, factoryCode, CloudFileBusinessOptEnum.HAOBAN_COMMON);
CloudFileInfo cloudFileInfo = CloudFileUtil.uploadFile(bos.toByteArray(), "jpg", CloudFileTypeEnum.IMAGE, factoryCode, CloudFileBusinessOptEnum.HAOBAN_COMMON);
log.info("上传图片结果:{}", JSON.toJSONString(cloudFileInfo));
long endTime = System.currentTimeMillis();
log.info("合成图片耗时 {} ms", (endTime - startTime));
......
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