Skip to content

Commit

Permalink
Merge pull request #101 from EmbroidePy/tatarize-pngguides
Browse files Browse the repository at this point in the history
PNG Guides and EmbPattern init.
  • Loading branch information
tatarize authored Sep 15, 2020
2 parents 91dee08 + 3854616 commit ccc05f0
Show file tree
Hide file tree
Showing 5 changed files with 1,136 additions and 809 deletions.
30 changes: 30 additions & 0 deletions pyembroidery/ArtReader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# from .ReadHelper import read_int_8
# from io import BytesIO
#
# import compoundfiles
# import zlib
#
#
# def swizzle(b):
# b ^= 0xD2
# b <<= 1
# b |= b >> 8
# return b & 0xFF
#
#
# def parse_art_file(file):
# with open(file, 'rb') as f:
# contents = compoundfiles.CompoundFileReader(f).open('Contents')
# contents.seek(4) # file size
# return zlib.decompress(bytes([swizzle(b) for b in contents.read()]))
#
#
# def read(f, out, settings=None):
# contents = compoundfiles.CompoundFileReader(f).open('Contents')
# contents.seek(4) # file size
# art = BytesIO(zlib.decompress(bytes([swizzle(b) for b in contents.read()])))
# while True:
# b = read_int_8(art)
# if b is None or b == -1:
# break
# print('%02X' % b)
Loading

0 comments on commit ccc05f0

Please sign in to comment.