Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
DataEditorX
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
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
nanahira
DataEditorX
Commits
d8ec1168
Commit
d8ec1168
authored
Sep 11, 2017
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removethumb
parent
86774817
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
20 deletions
+23
-20
DataEditorX/Config/YgoPath.cs
DataEditorX/Config/YgoPath.cs
+10
-10
DataEditorX/Core/TaskHelper.cs
DataEditorX/Core/TaskHelper.cs
+10
-8
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+3
-2
No files found.
DataEditorX/Config/YgoPath.cs
View file @
d8ec1168
...
...
@@ -40,10 +40,10 @@ public string GetImage(long id)
{
return
GetImage
(
id
.
ToString
());
}
public
string
GetImageThum
(
long
id
)
{
return
GetImageThum
(
id
.
ToString
());
}
//
public string GetImageThum(long id)
//
{
//
return GetImageThum(id.ToString());
//
}
public
string
GetImageField
(
long
id
)
{
return
GetImageField
(
id
.
ToString
());
//场地图
...
...
@@ -61,10 +61,10 @@ public string GetImage(string id)
{
return
MyPath
.
Combine
(
picpath
,
id
+
".jpg"
);
}
public
string
GetImageThum
(
string
id
)
{
return
MyPath
.
Combine
(
picpath2
,
id
+
".jpg"
);
}
//
public string GetImageThum(string id)
//
{
//
return MyPath.Combine(picpath2, id + ".jpg");
//
}
public
string
GetImageField
(
string
id
)
{
return
MyPath
.
Combine
(
fieldpath
,
id
+
".png"
);
//场地图
...
...
@@ -82,7 +82,7 @@ public string[] GetCardfiles(long id)
{
string
[]
files
=
new
string
[]{
GetImage
(
id
),
//大图
GetImageThum
(
id
),
//小图
//
GetImageThum(id),//小图
GetImageField
(
id
),
//场地图
GetScript
(
id
)
};
...
...
@@ -92,7 +92,7 @@ public string[] GetCardfiles(string id)
{
string
[]
files
=
new
string
[]{
GetImage
(
id
),
//大图
GetImageThum
(
id
),
//小图
//
GetImageThum(id),//小图
GetImageField
(
id
),
//场地图
GetScript
(
id
)
};
...
...
DataEditorX/Core/TaskHelper.cs
View file @
d8ec1168
...
...
@@ -116,15 +116,16 @@ public void SetTask(MyTask myTask, Card[] cards, params string[] args)
mArgs
=
args
;
}
//转换图片
public
void
ToImg
(
string
img
,
string
saveimg1
,
string
saveimg2
)
//public void ToImg(string img, string saveimg1, string saveimg2)
public
void
ToImg
(
string
img
,
string
saveimg1
)
{
if
(!
File
.
Exists
(
img
))
return
;
Bitmap
bmp
=
new
Bitmap
(
img
);
MyBitmap
.
SaveAsJPEG
(
MyBitmap
.
Zoom
(
bmp
,
imgSet
.
W
,
imgSet
.
H
),
saveimg1
,
imgSet
.
quilty
);
MyBitmap
.
SaveAsJPEG
(
MyBitmap
.
Zoom
(
bmp
,
imgSet
.
w
,
imgSet
.
h
),
saveimg2
,
imgSet
.
quilty
);
//
MyBitmap.SaveAsJPEG(MyBitmap.Zoom(bmp, imgSet.w, imgSet.h),
//
saveimg2, imgSet.quilty);
bmp
.
Dispose
();
}
#
endregion
...
...
@@ -203,11 +204,12 @@ public void CutImages(string imgpath, bool isreplace)
}
#
endregion
//removed thumbnail
#
region
转换图片
public
void
ConvertImages
(
string
imgpath
,
string
gamepath
,
bool
isreplace
)
{
string
picspath
=
MyPath
.
Combine
(
gamepath
,
"pics"
);
string
thubpath
=
MyPath
.
Combine
(
picspath
,
"thumbnail"
);
//
string thubpath = MyPath.Combine(picspath, "thumbnail");
string
[]
files
=
Directory
.
GetFiles
(
imgpath
);
int
i
=
0
;
int
count
=
files
.
Length
;
...
...
@@ -235,12 +237,12 @@ public void ConvertImages(string imgpath, string gamepath, bool isreplace)
jpg_b
,
imgSet
.
quilty
);
}
//小图,如果替换,或者不存在
if
(
isreplace
||
!
File
.
Exists
(
jpg_s
))
//
if (isreplace || !File.Exists(jpg_s))
{
MyBitmap
.
SaveAsJPEG
(
MyBitmap
.
Zoom
(
bmp
,
imgSet
.
w
,
imgSet
.
h
),
jpg_s
,
imgSet
.
quilty
);
//
MyBitmap.SaveAsJPEG(MyBitmap.Zoom(bmp, imgSet.w, imgSet.h),
//
jpg_s, imgSet.quilty);
}
//
}
}
}
}
...
...
DataEditorX/DataEditForm.cs
View file @
d8ec1168
...
...
@@ -1316,8 +1316,9 @@ void ImportImage(string file, string tid)
}
else
{
tasker
.
ToImg
(
file
,
ygopath
.
GetImage
(
tid
),
ygopath
.
GetImageThum
(
tid
));
// tasker.ToImg(file, ygopath.GetImage(tid),
// ygopath.GetImageThum(tid));
tasker
.
ToImg
(
file
,
ygopath
.
GetImage
(
tid
));
}
SetImage
(
tid
);
}
...
...
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