Skip to content

Commit

Permalink
Merge pull request #65 from DDMAL/develop
Browse files Browse the repository at this point in the history
v2.0.0 Comment out Crop region feature
  • Loading branch information
softcat477 authored Aug 25, 2022
2 parents f12189c + 378a78b commit 0c1312c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ class PixelInteractive(RodanTask):
'type': 'boolean',
'default': False
},
'Crop Image': {
'type': 'boolean',
'default': True
},
# 'Crop Image': {
# 'type': 'boolean',
# 'default': True
# },
},
'job_queue': 'Python3',
}
Expand Down Expand Up @@ -262,21 +262,21 @@ def convert(img):
retval, buf = cv.imencode('.png', tmp)
else:
result = remove_bg(array)
if settings['Crop Image']:
result = result[y:y+h, x:x+w]
# if settings['Crop Image']:
# result = result[y:y+h, x:x+w]
retval, buf = cv.imencode('.png', result)

if i == 0:
zipMe.writestr(('rgba PNG - Layer 0 (Background).png'), buf)
elif i == len(output_list) - 1:
if settings['Crop Image']:
break
# if settings['Crop Image']:
# break
zipMe.writestr(('rgba PNG - Selected regions.png'), buf)
else:
zipMe.writestr(('rgba PNG - Layer {0}.png').format(i), buf)

if settings['Crop Image']:
background = background[y:y+h, x:x+w]
# if settings['Crop Image']:
# background = background[y:y+h, x:x+w]
retval, buf = cv.imencode('.png', background)
zipMe.writestr(('Image.png'), buf)

Expand Down

0 comments on commit 0c1312c

Please sign in to comment.