Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
one-certificate-system
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
one-certificate-system
Commits
7c1abef7
Commit
7c1abef7
authored
Aug 23, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加水印图片
parent
e6ed173a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
one-certificate-manager/src/main/java/com/mortals/xhx/common/utils/WatermarkImgUtils.java
.../java/com/mortals/xhx/common/utils/WatermarkImgUtils.java
+4
-2
No files found.
one-certificate-manager/src/main/java/com/mortals/xhx/common/utils/WatermarkImgUtils.java
View file @
7c1abef7
package
com.mortals.xhx.common.utils
;
import
com.mortals.xhx.module.record.web.ApplyLogController
;
import
lombok.extern.slf4j.Slf4j
;
import
javax.imageio.ImageIO
;
import
javax.swing.*
;
...
...
@@ -10,6 +11,7 @@ import java.io.File;
import
java.io.FileOutputStream
;
import
java.io.OutputStream
;
@Slf4j
public
class
WatermarkImgUtils
{
...
...
@@ -68,11 +70,11 @@ public class WatermarkImgUtils {
}*/
g
.
dispose
();
// 释放资源
// 输出图片
log
.
info
(
"生成水印图片路径:{}"
,
tarImgPath
);
outImgStream
=
new
FileOutputStream
(
tarImgPath
);
ImageIO
.
write
(
bufImg
,
fileExt
,
outImgStream
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
getMessage
();
log
.
error
(
"生成水印图片异常:"
,
e
);
}
finally
{
try
{
if
(
outImgStream
!=
null
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment