Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
ImgGen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
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
MyCard
ImgGen
Commits
55323482
Commit
55323482
authored
Apr 04, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor refactor, support png input
parent
13b7981f
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
370 additions
and
295 deletions
+370
-295
DataManager.cs
DataManager.cs
+347
-275
Program.cs
Program.cs
+5
-2
readme.txt
readme.txt
+18
-18
No files found.
DataManager.cs
View file @
55323482
This diff is collapsed.
Click to expand it.
Program.cs
View file @
55323482
namespace
ImgGen
namespace
ImgGen
{
{
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Drawing.Imaging
;
using
System.Drawing.Imaging
;
using
System.IO
;
using
System.IO
;
...
@@ -35,7 +36,9 @@
...
@@ -35,7 +36,9 @@
EncoderParameters
encoderParams
=
new
EncoderParameters
(
1
);
EncoderParameters
encoderParams
=
new
EncoderParameters
(
1
);
EncoderParameter
parameter
=
new
EncoderParameter
(
quality
,
90L
);
EncoderParameter
parameter
=
new
EncoderParameter
(
quality
,
90L
);
encoderParams
.
Param
[
0
]
=
parameter
;
encoderParams
.
Param
[
0
]
=
parameter
;
string
[]
files
=
Directory
.
GetFiles
(
"./pico"
,
"*.jpg"
);
List
<
string
>
files
=
new
List
<
string
>();
files
.
AddRange
(
Directory
.
GetFiles
(
"./pico"
,
"*.png"
));
files
.
AddRange
(
Directory
.
GetFiles
(
"./pico"
,
"*.jpg"
));
bool
generateLarge
=
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
"GenerateLarge"
]
==
"False"
?
false
:
true
;
// true if AppSettings null
bool
generateLarge
=
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
"GenerateLarge"
]
==
"False"
?
false
:
true
;
// true if AppSettings null
bool
generateSmall
=
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
"GenerateSmall"
]
==
"True"
?
true
:
false
;
bool
generateSmall
=
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
"GenerateSmall"
]
==
"True"
?
true
:
false
;
bool
generateThumb
=
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
"GenerateThumb"
]
==
"True"
?
true
:
false
;
bool
generateThumb
=
System
.
Configuration
.
ConfigurationManager
.
AppSettings
[
"GenerateThumb"
]
==
"True"
?
true
:
false
;
...
@@ -48,7 +51,7 @@
...
@@ -48,7 +51,7 @@
foreach
(
string
str
in
files
)
foreach
(
string
str
in
files
)
{
{
int
code
=
int
.
Parse
(
Path
.
GetFileNameWithoutExtension
(
str
));
int
code
=
int
.
Parse
(
Path
.
GetFileNameWithoutExtension
(
str
));
string
fileName
=
Path
.
GetFileName
(
str
)
;
string
fileName
=
code
.
ToString
()
+
".jpg"
;
Console
.
WriteLine
(
"Generating {0}"
,
fileName
);
Console
.
WriteLine
(
"Generating {0}"
,
fileName
);
Bitmap
image
=
DataManager
.
GetImage
(
code
);
Bitmap
image
=
DataManager
.
GetImage
(
code
);
if
(
generateLarge
)
if
(
generateLarge
)
...
...
readme.txt
View file @
55323482
YGOPro
卡图生成工具
YGOPro
卡图生成工具
------------------------------------------------
------------------------------------------------
使用:
使用:
放到游戏主目录Gen目录,即执行目录上级有c
ards.cdb
放到游戏主目录Gen目录,即执行目录上级有cards.cdb
必备字体:
必备字体:
文泉驿微米黑
文泉驿微米黑
生成卡图:
生成卡图:
在执行目录创建pico目录,放入对应密码的中间图规格的jpg图片,运行ImgGen.exe,即可在picn目录内生成卡图。
在执行目录创建pico目录,放入对应密码的中间图规格的jpg图片,运行ImgGen.exe,即可在picn目录内生成卡图。
普通中间图尺寸:256x256
普通中间图尺寸:304x304
灵摆中间图尺寸:292x217
灵摆中间图尺寸:347x260
参数:
参数:
自定义数据库
自定义数据库
ImgGen.exe ..\expansions\pre-release.cdb
ImgGen.exe ..\expansions\pre-release.cdb
配置:
配置:
XyzString
XyzString
自定义Xyz的翻译,默认为超量
自定义Xyz的翻译,默认为超量
FontName
FontName
自定义字体,默认为文泉驿微米黑
自定义字体,默认为文泉驿微米黑
ZeroStarCards
ZeroStarCards
红龙等没有星星的怪兽卡,用逗号分开
红龙等没有星星的怪兽卡,用逗号分开
GenerateLarge
GenerateLarge
生成大图,默认为
True
生成大图,默认为True
GenerateSmall
GenerateSmall
生成小图,默认为
False
生成小图,默认为Fals
e
GenerateThumb
GenerateThumb
生成缩略图,默认为F
alse
生成缩略图,默认为False
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