Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
3cbb61d3
Commit
3cbb61d3
authored
Oct 28, 2024
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化黑线问题
parent
30a41d42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
ImageCombined.java
...haoban/manage/service/context/combined/ImageCombined.java
+8
-5
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/context/combined/ImageCombined.java
View file @
3cbb61d3
...
...
@@ -42,11 +42,11 @@ public class ImageCombined {
private
static
final
int
QR_WIDTH_REFERENCE
=
136
;
private
static
final
String
LARGE_IMAGE_URL
=
"https://
wcy-1251519181.cos.ap-shanghai.myqcloud.com/image/material_content-0e89ce4dc0454998a16e5295a32e13ba
.jpg?imageView2/2/w/1080/h/10800/format/jpg"
;
private
static
final
String
LARGE_IMAGE_URL
=
"https://
jhdmyx-1251519181.cos.ap-shanghai.myqcloud.com/image/material_content-191564494842458980f5c5ae685d3440
.jpg?imageView2/2/w/1080/h/10800/format/jpg"
;
private
static
final
String
QR_CODE_URL
=
"https://gicinner-1251519181.cos.ap-shanghai.myqcloud.com/image/material_content-4ffc77073ca1476fb264bf1be9f11383.png"
;
private
static
final
String
STORE_NAME
=
"门店CCA"
;
private
static
final
String
GUIDE_NAME
=
"宇智222为您推荐"
;
private
static
final
String
OUTPUT_PATH
=
"/Users/wang/Downloads/output_image
4
.jpg"
;
private
static
final
String
OUTPUT_PATH
=
"/Users/wang/Downloads/output_image
5
.jpg"
;
static
{
ImageIO
.
scanForPlugins
();
// 初始化图像插件
...
...
@@ -138,13 +138,16 @@ public class ImageCombined {
}
width
=
Math
.
max
(
width
,
MIN_WIDTH
);
}
BufferedImage
resizedImage
=
Thumbnails
.
of
(
image
).
size
(
width
,
height
).
asBufferedImage
();
int
finalHeight
=
height
+
(
showStyle
==
1
?
0
:
WHITE_SPACE_HEIGHT
);
BufferedImage
combinedImage
=
new
BufferedImage
(
width
,
finalHeight
,
BufferedImage
.
TYPE_INT_RGB
);
BufferedImage
resizedImage
=
Thumbnails
.
of
(
image
)
.
size
(
width
,
height
).
asBufferedImage
();
Graphics2D
g
=
combinedImage
.
createGraphics
();
g
.
drawImage
(
resizedImage
,
0
,
0
,
null
);
g
.
setColor
(
Color
.
WHITE
);
g
.
drawImage
(
resizedImage
,
0
,
1
,
null
);
if
(
showStyle
==
1
)
{
qrWidth
=
width
*
QR_WIDTH_REFERENCE
/
750
;
}
...
...
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