| | |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import static com.dji.sample.territory.utils.ImgZipUtil.compressImageAndGetFile; |
| | | |
| | | @Component |
| | | public class WaterMarkUtil { |
| | | |
| | |
| | | g2d.setComposite(alphaComposite); |
| | | String extraInfo = String.format("Lon:%.7f Lat:%.7f\n%s %s", lng, lat, angel, sd); |
| | | File fontFile = new File("/usr/share/fonts/MiSans-Normal.ttf"); // 替换为你的字体文件路径 |
| | | // File fontFile = new File("src/main/resources/MiSans-Normal.ttf"); // 替换为你的字体文件路径 |
| | | Font customFont = Font.createFont(Font.TRUETYPE_FONT, fontFile).deriveFont(36.00F); |
| | | // 注册字体 |
| | | GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); |