onepill / texture_unpacker_scirpt Goto Github PK
View Code? Open in Web Editor NEWUse this script to unpack png files in the plist/json file packed by TexturePacker
Use this script to unpack png files in the plist/json file packed by TexturePacker
為什麼會我跑python no module named pil 的東西出來呢?
我已經安裝Pillow 了
attached screenshot as well. tried the python script with included example getting the error shown in screenshot, please help, what am I doing wrong?
Hi, please help me this problem cracked my brain.
I installed Python2.7 and and Pillow-3.2.0-py2.7. Now when i run either one of the bellow command:
C:\python27\python.exe unpacker.py atlas,
C:\python27\python.exe unpacker.py atlas plist
the below error comes,
Traceback (most recent call last):
File "unpacker.py", line 152, in
gen_png_from_data(filename, ext)
File "unpacker.py", line 115, in gen_png_from_data
frames = frames_from_data(filename, ext)
File "unpacker.py", line 29, in frames_from_data
root = ElementTree.fromstring(open(data_filename, 'r').read())
File "c:\python27\lib\xml\etree\ElementTree.py", line 1300, in XML
parser.feed(text)
File "c:\python27\lib\xml\etree\ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "c:\python27\lib\xml\etree\ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 101
Note: My atlas.png and atlas.plist and unpacker.py are in the same directory.
Data files:
https://www.dropbox.com/sh/d9h8exvwclfvbqy/AADDPdVfe8_6VeaCAgwmxNJta?dl=0
Environment:
python3.6
Pillow==4.0.0
Command:
python unpacker.py select_gameimage plist
Output:
.plist data format passed
Traceback (most recent call last):
File "unpacker.py", line 154, in <module>
gen_png_from_data(filename, ext)
File "unpacker.py", line 115, in gen_png_from_data
frames = frames_from_data(filename, ext)
File "unpacker.py", line 42, in frames_from_data
width = int(rectlist[3] if frame['rotated'] else rectlist[2])
ValueError: invalid literal for int() with base 10: '85.0'
Hi,
I am trying to unpack the two sprites in the attach zip file, but I kept on getting parsing error. I tried to play around with the unpacker.py but was no success on parsing the plist file. Can you help take a look? Thanks!
File "unpacker.py", line 154, in <module>
gen_png_from_data(filename, ext)
File "unpacker.py", line 115, in gen_png_from_data
frames = frames_from_data(filename, ext)
File "unpacker.py", line 29, in frames_from_data
root = ElementTree.fromstring(open(data_filename, 'r').read())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
parser.feed(text)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 2, column 101
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.