-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from EmbroidePy/tatarize-pngguides
PNG Guides and EmbPattern init.
- Loading branch information
Showing
5 changed files
with
1,136 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Oops, something went wrong.