Skip to content

Commit a1c34b1

Browse files
committed
Integrate Version
1 parent 9cda285 commit a1c34b1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pyembroidery/JefReader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def read_jef_stitches(f, out, settings=None):
2323
out.move(x, y)
2424
continue
2525
if ctrl == 0x01:
26+
# PATCH: None means stop since it was color #0
2627
if out.threadlist[color_index] is None:
2728
out.stop(0, 0)
2829
del out.threadlist[color_index]
@@ -61,10 +62,10 @@ def read(f, out, settings=None):
6162
for i in range(0, count_colors):
6263
index = abs(read_int_32le(f))
6364
if index == 0:
65+
# Patch: If we have color 0. Go ahead and set that to None.
6466
out.threadlist.append(None)
6567
else:
6668
out.add_thread(jef_threads[index % len(jef_threads)])
6769

68-
print(out.threadlist)
6970
f.seek(stitch_offset, 0)
7071
read_jef_stitches(f, out, settings)

pyembroidery/JefWriter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import datetime
22

33
from .EmbConstant import *
4-
from .EmbThread import build_nonrepeat_palette
54
from .EmbThreadJef import get_thread_set
65
from .WriteHelper import write_int_8, write_int_32le, write_string_utf8
76

pyembroidery/PecWriter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def write_pec_header(pattern, f, threadlist):
6060
f.write(b"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20")
6161
add_value = current_thread_count - 1
6262
color_index_list.insert(0, add_value)
63-
assert color_index_list[0]<255, 'to many color changes, ({0}) out of bounds (0, 255)'.format(len(color_index_list))
63+
assert color_index_list[0] < 255, 'too many color changes, ({0}) out of bounds (0, 255)'.format(len(color_index_list))
6464
f.write(bytes(bytearray(color_index_list)))
6565
else:
6666
f.write(b"\x20\x20\x20\x20\x64\x20\x00\x20\x00\x20\x20\x20\xFF")

test/test_encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ def test_transcode_to_self(self):
110110
from pyembroidery.EmbEncoder import Transcoder
111111
encoder = Transcoder()
112112
encoder.transcode(pattern, pattern)
113-
self.assertNotEquals(len(pattern.stitches), 0)
113+
self.assertNotEqual(len(pattern.stitches), 0)

0 commit comments

Comments
 (0)