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
2dcbdc44
Commit
2dcbdc44
authored
Nov 15, 2018
by
田超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
ea211445
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
PictureUtil.java
...on/src/main/java/com/pcloud/common/utils/PictureUtil.java
+5
-4
No files found.
pcloud-common/src/main/java/com/pcloud/common/utils/PictureUtil.java
View file @
2dcbdc44
...
...
@@ -37,10 +37,11 @@ public class PictureUtil {
public
static
Color
getImagePixel
(
BufferedImage
bi
)
{
if
(
bi
.
getWidth
()*
bi
.
getHeight
()>
1
0000
)
{
BufferedImage
pic1
=
new
BufferedImage
(
350
,
350
,
BufferedImage
.
TYPE_3BYTE_BGR
);
if
(
bi
.
getWidth
()*
bi
.
getHeight
()>
50
0000
)
{
BufferedImage
pic1
=
new
BufferedImage
(
157
,
224
,
BufferedImage
.
SCALE_SMOOTH
);
Graphics
graphics
=
pic1
.
getGraphics
();
graphics
.
drawImage
(
bi
.
getScaledInstance
(
350
,
350
,
Image
.
SCALE_SMOOTH
),
0
,
0
,
null
);
graphics
.
drawImage
(
bi
.
getScaledInstance
(
157
,
224
,
Image
.
SCALE_SMOOTH
),
0
,
0
,
null
);
graphics
.
dispose
();
bi
=
pic1
;
}
int
width
=
bi
.
getWidth
();
...
...
@@ -173,7 +174,7 @@ public class PictureUtil {
StringBuilder
builder
=
new
StringBuilder
(
Integer
.
toHexString
(
number
&
0xff
));
while
(
builder
.
length
()
<
2
)
{
builder
.
append
(
"0"
);
builder
=
new
StringBuilder
(
"0"
).
append
(
builder
);
}
return
builder
.
toString
().
toUpperCase
();
}
...
...
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