Skip to content

Commit ccc05f0

Browse files
authored
Merge pull request #101 from EmbroidePy/tatarize-pngguides
PNG Guides and EmbPattern init.
2 parents 91dee08 + 3854616 commit ccc05f0

File tree

5 files changed

+1136
-809
lines changed

5 files changed

+1136
-809
lines changed

pyembroidery/ArtReader.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# from .ReadHelper import read_int_8
2+
# from io import BytesIO
3+
#
4+
# import compoundfiles
5+
# import zlib
6+
#
7+
#
8+
# def swizzle(b):
9+
# b ^= 0xD2
10+
# b <<= 1
11+
# b |= b >> 8
12+
# return b & 0xFF
13+
#
14+
#
15+
# def parse_art_file(file):
16+
# with open(file, 'rb') as f:
17+
# contents = compoundfiles.CompoundFileReader(f).open('Contents')
18+
# contents.seek(4) # file size
19+
# return zlib.decompress(bytes([swizzle(b) for b in contents.read()]))
20+
#
21+
#
22+
# def read(f, out, settings=None):
23+
# contents = compoundfiles.CompoundFileReader(f).open('Contents')
24+
# contents.seek(4) # file size
25+
# art = BytesIO(zlib.decompress(bytes([swizzle(b) for b in contents.read()])))
26+
# while True:
27+
# b = read_int_8(art)
28+
# if b is None or b == -1:
29+
# break
30+
# print('%02X' % b)

0 commit comments

Comments
 (0)