|
@@ -191,7 +191,7 @@ public class ScoreApi {
|
|
|
watermarkTotal = 0;
|
|
|
watermarkFinished = 0;
|
|
|
|
|
|
- final Font font = new Font("Symbol", Font.PLAIN, 60); //水印字体
|
|
|
+ final Font font = new Font("Symbol", Font.PLAIN, 40); //水印字体
|
|
|
final Color color = new Color(254, 3, 10, 255); //水印图片色彩以及透明度
|
|
|
final List<Paper> papers = paperRepo.findByWorkId(workId);
|
|
|
watermarkTotal = papers.size();
|
|
@@ -211,7 +211,7 @@ public class ScoreApi {
|
|
|
|
|
|
File targetFile = new File(watermarkFile);
|
|
|
targetFile.getParentFile().mkdirs();//创建父级目录
|
|
|
- WaterMarkUtils.addWaterMark(imageFile, watermarkFile, String.valueOf(score.intValue()) + "分", color, font);
|
|
|
+ WaterMarkUtils.addWaterMark(imageFile, watermarkFile, "【" + paper.getExamNumber() + "】【" + paper.getStudentName() + "】【" + String.valueOf(score.intValue()) + "分】", color, font);
|
|
|
System.out.println(watermarkFile + "生产成功");
|
|
|
|
|
|
}
|