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
e4d77b88
Commit
e4d77b88
authored
Nov 13, 2018
by
田超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
bdd911dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
PictureUtil.java
...on/src/main/java/com/pcloud/common/utils/PictureUtil.java
+5
-2
No files found.
pcloud-common/src/main/java/com/pcloud/common/utils/PictureUtil.java
View file @
e4d77b88
...
@@ -148,16 +148,19 @@ public class PictureUtil {
...
@@ -148,16 +148,19 @@ public class PictureUtil {
public
static
Color
getImagePixel
(
String
imgFile
)
{
public
static
Color
getImagePixel
(
String
imgFile
)
{
BufferedImage
bi
=
null
;
BufferedImage
bi
=
null
;
Color
imagePixel
;
try
{
try
{
if
(
imgFile
.
contains
(
"http"
)){
if
(
imgFile
.
contains
(
"http"
)){
bi
=
ImageIO
.
read
(
new
URL
(
imgFile
));
bi
=
ImageIO
.
read
(
new
URL
(
imgFile
));
}
else
{
}
else
{
bi
=
ImageIO
.
read
(
new
File
(
imgFile
));
bi
=
ImageIO
.
read
(
new
File
(
imgFile
));
}
}
imagePixel
=
getImagePixel
(
bi
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
imagePixel
=
Color
.
CYAN
;
LOGGER
.
error
(
"生成图片失败,图片="
+
imgFile
+
","
+
e
.
getMessage
(),
e
);
}
}
return
getImagePixel
(
bi
)
;
return
imagePixel
;
}
}
public
static
String
toBrowserHexValue
(
int
number
)
{
public
static
String
toBrowserHexValue
(
int
number
)
{
...
...
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