Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cut_pic
Project
Project
Details
Activity
Releases
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
dovahkiin
cut_pic
Commits
7ce7000a
Commit
7ce7000a
authored
Aug 25, 2023
by
dovahkiin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入0.01秒延时,方便主界面更新
加入选择非等大或者非共位时,切图不为偶数的问题。
parent
68e1972b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
cut_pic.py
cut_pic.py
+6
-3
No files found.
cut_pic.py
View file @
7ce7000a
...
...
@@ -265,6 +265,7 @@ def extractLayerImge(lay_info:lay_item, psd_name:str, lwdtI:QListWidgetItem):
brush
=
QBrush
(
color
)
lwdtI
.
setForeground
(
brush
)
sleep
(
0.01
)
# print('翻译结果:', temp_layer_name)
exc_c
.
exc_write
(
x1
,
y1
,
lay_info
.
w
,
lay_info
.
h
,
layer_name
,
temp_layer_name
,
lay_info
.
layer
.
name
)
...
...
@@ -291,13 +292,15 @@ def get_lay_info(psd_info:flag_data):
max_x
=
layer
.
left
if
max_y
>
layer
.
top
or
max_y
==
-
1
:
max_y
=
layer
.
top
layer
.
visible
=
False
# temp_psd_show = psd.compose(True)
# temp_psd_show.show()
layer_info_list
:
list
[
lay_item
]
=
[]
for
layer
in
layer_list
:
layer_info_item
=
lay_item
()
if
psd_info
.
cobit
:
layer_info_item
.
x
=
max_x
layer_info_item
.
y
=
max_y
...
...
@@ -309,8 +312,8 @@ def get_lay_info(psd_info:flag_data):
layer_info_item
.
w
=
max_w
+
1
if
max_w
%
2
else
max_w
layer_info_item
.
h
=
max_h
+
1
if
max_h
%
2
else
max_h
else
:
layer_info_item
.
w
=
layer
.
width
layer_info_item
.
h
=
layer
.
height
layer_info_item
.
w
=
layer
.
width
+
1
if
layer
.
width
%
2
else
layer
.
width
layer_info_item
.
h
=
layer
.
height
+
1
if
layer
.
height
%
2
else
layer
.
height
layer_info_item
.
x
=
layer
.
left
layer_info_item
.
y
=
layer
.
top
...
...
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