-
Notifications
You must be signed in to change notification settings - Fork 38
/
main.py
28 lines (21 loc) · 788 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- coding: utf-8 -*-
"""----------------------------------------------------------------------------
Author:
Huang Quanyong (wo1fSea)
Date:
2016/10/19
Description:
main.py
----------------------------------------------------------------------------"""
from PyTexturePacker import Packer
def pack_test():
# create a MaxRectsPacker
packer = Packer.create(max_width=2048, max_height=2048, bg_color=0xffffff00)
# pack texture images under the directory "test_case/" and name the output images as "test_case".
# "%d" in output file name "test_case%d" is a placeholder, which is the atlas index, starting with 0.
packer.pack("test_image/", "test_image%d", "")
def main():
pack_test()
if __name__ == '__main__':
main()