Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
98da6f81
Commit
98da6f81
authored
Oct 16, 2018
by
songxiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
0ceecf60
619caf18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
PictureUtil.java
...on/src/main/java/com/pcloud/common/utils/PictureUtil.java
+10
-1
No files found.
pcloud-common/src/main/java/com/pcloud/common/utils/PictureUtil.java
View file @
98da6f81
...
@@ -95,6 +95,15 @@ public class PictureUtil {
...
@@ -95,6 +95,15 @@ public class PictureUtil {
BufferedImage
playPicImage
;
BufferedImage
playPicImage
;
BufferedImage
defaultBackgroundImage
;
BufferedImage
defaultBackgroundImage
;
bookPicImage
=
ImageIO
.
read
(
new
URL
(
bookPic
));
bookPicImage
=
ImageIO
.
read
(
new
URL
(
bookPic
));
if
(
bookPicImage
.
getWidth
()*
bookPicImage
.
getHeight
()>
10000
)
{
BufferedImage
pic1
=
new
BufferedImage
(
bookWidth
,
bookHeight
,
BufferedImage
.
TYPE_3BYTE_BGR
);
Graphics2D
g11
=
pic1
.
createGraphics
();
g11
.
drawImage
(
bookPicImage
.
getScaledInstance
(
bookWidth
,
bookHeight
,
Image
.
SCALE_SMOOTH
),
0
,
0
,
null
);
g11
.
dispose
();
bookPicImage
=
pic1
;
}
playPicImage
=
ImageIO
.
read
(
new
URL
(
playPic
));
playPicImage
=
ImageIO
.
read
(
new
URL
(
playPic
));
defaultBackgroundImage
=
ImageIO
.
read
(
new
URL
(
defaultBackgroundPic
));
defaultBackgroundImage
=
ImageIO
.
read
(
new
URL
(
defaultBackgroundPic
));
//画一个空的背景
//画一个空的背景
...
@@ -112,7 +121,7 @@ public class PictureUtil {
...
@@ -112,7 +121,7 @@ public class PictureUtil {
g
.
setColor
(
defaultColor
);
g
.
setColor
(
defaultColor
);
g
.
fillRect
(
0
,
splitPoint
,
backWidth
,
backHeight
-
splitPoint
);
g
.
fillRect
(
0
,
splitPoint
,
backWidth
,
backHeight
-
splitPoint
);
//插入书籍图和播放按钮
//插入书籍图和播放按钮
g
.
drawImage
(
bookPicImage
.
getScaledInstance
(
bookWidth
,
bookHeight
,
Image
.
SCALE_
DEFAULT
),
(
backWidth
-
bookWidth
)/
2
,
(
backHeight
-
bookHeight
)/
2
,
null
);
g
.
drawImage
(
bookPicImage
.
getScaledInstance
(
bookWidth
,
bookHeight
,
Image
.
SCALE_
SMOOTH
),
(
backWidth
-
bookWidth
)/
2
,
(
backHeight
-
bookHeight
)/
2
,
null
);
g
.
drawImage
(
playPicImage
.
getScaledInstance
(
playButtonSize
,
playButtonSize
,
Image
.
SCALE_DEFAULT
),
(
backWidth
-
playButtonSize
)/
2
,
(
backHeight
-
playButtonSize
)/
2
,
null
);
g
.
drawImage
(
playPicImage
.
getScaledInstance
(
playButtonSize
,
playButtonSize
,
Image
.
SCALE_DEFAULT
),
(
backWidth
-
playButtonSize
)/
2
,
(
backHeight
-
playButtonSize
)/
2
,
null
);
//画边框
//画边框
g
.
setColor
(
borderColor
);
g
.
setColor
(
borderColor
);
...
...
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