song0071000 / unpackplistpng Goto Github PK
View Code? Open in Web Editor NEWLet the large png file decompose into tiny png file with the use of plist and png files.
Let the large png file decompose into tiny png file with the use of plist and png files.
why replace('gift_', '')
rect_on_big = rect_on_big.rotate(90)
Code above can not change the size of the image
We can use
rect_on_big = rect_on_big.transpose(Image.ROTATE_90) ## This works for me
or
rect_on_big = rect_on_big.rotate(90).resize(height, width)
effect_activity/effect_activity_01.png generated
effect_activity/effect_activity_03.png generated
Traceback (most recent call last):
File "E:\TestPython\unpack.py", line 90, in <module>
gen_png_from_plist( plist_filename, png_filename )
File "E:\TestPython\unpack.py", line 73, in gen_png_from_plist
result_image.paste(rect_on_big, result_box, mask=0)
File "C:\Python27\lib\site-packages\PIL\Image.py", line 1442, in paste
self.im.paste(im, box)
ValueError: images do not match
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>frames</key>
<dict>
<key>effect_activity_01.png</key>
<dict>
<key>frame</key>
<string>{{0,0},{118,124}}</string>
<key>offset</key>
<string>{3,-3}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{9,6},{118,124}}</string>
<key>sourceSize</key>
<string>{130,130}</string>
</dict>
<key>effect_activity_02.png</key>
<dict>
<key>frame</key>
<string>{{46,126},{112,98}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{0,0},{112,98}}</string>
<key>sourceSize</key>
<string>{112,98}</string>
</dict>
<key>effect_activity_03.png</key>
<dict>
<key>frame</key>
<string>{{146,29},{103,102}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{103,102}}</string>
<key>sourceSize</key>
<string>{103,102}</string>
</dict>
<key>effect_activity_04.png</key>
<dict>
<key>frame</key>
<string>{{146,133},{85,98}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{0,0},{85,98}}</string>
<key>sourceSize</key>
<string>{85,98}</string>
</dict>
<key>effect_activity_05.png</key>
<dict>
<key>frame</key>
<string>{{0,126},{116,44}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{0,0},{116,44}}</string>
<key>sourceSize</key>
<string>{116,44}</string>
</dict>
<key>effect_activity_06.png</key>
<dict>
<key>frame</key>
<string>{{146,0},{107,27}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<false/>
<key>sourceColorRect</key>
<string>{{0,0},{107,27}}</string>
<key>sourceSize</key>
<string>{107,27}</string>
</dict>
<key>effect_activity_07.png</key>
<dict>
<key>frame</key>
<string>{{146,220},{35,37}}</string>
<key>offset</key>
<string>{0,0}</string>
<key>rotated</key>
<true/>
<key>sourceColorRect</key>
<string>{{0,0},{35,37}}</string>
<key>sourceSize</key>
<string>{35,37}</string>
</dict>
</dict>
<key>metadata</key>
<dict>
<key>format</key>
<integer>2</integer>
<key>realTextureFileName</key>
<string>effect_activity.png</string>
<key>size</key>
<string>{256,256}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:72805d0d0cfe3883f9e2386a24744e6c$</string>
<key>textureFileName</key>
<string>effect_activity.png</string>
</dict>
</dict>
</plist>
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.