| | |
| | | |
| | | @Component |
| | | public class WaterMarkUtil { |
| | | |
| | | /** |
| | | * 将图片加上水印并压缩 |
| | | * |
| | |
| | | * @return 添加水印并压缩后的图片文件。 |
| | | * @throws IOException 如果读取或保存图片失败。 |
| | | */ |
| | | public static File addWatermark(File file, Long pssj, Double lat, Double lng, Double angles) throws IOException, FontFormatException { |
| | | public static File addWatermark(File file, Long pssj, Double lat, Double lng, Double angles,String path) throws IOException, FontFormatException { |
| | | double anglses = convertAngle(angles); |
| | | String angel = angle(anglses); |
| | | Long timestamp = pssj; // 例如:Unix 时间戳(以秒为单位) |