CppTexturePacker圖片打包工具
CppTextu是一款免費(fèi)的圖片打包工具,軟件小巧易用,主流游戲圖片格式,如bmp,jpg,png可以打包為png大圖,采用命令行格式,簡(jiǎn)單的命令如下:
usage: CppTextu --input_dir=string [options] ...
options:
-i, --input_dir input dir (string)
-n, --ouput_name output atlas name (string [=out])
-o, --ouput_dir output dir (string [=./])
-p, --base_image_path base image path (string [=])
-f, --image_format output image format (string [=png])
-w, --max_width max atlas width (unsigned int [=4096])
-h, --max_height max atlas height (unsigned int [=4096])
-r, --enable_rotate enable rotate (bool [=0])
-s, --force_square force square (bool [=0])
--border_padding border padding (unsigned char [= ])
--shape_padding shape padding (unsigned char [= ])
--inner_padding inner padding (unsigned char [= ])
-b, --reduce_border_artifacts reduce border artifacts (bool [=0])
-t, --trim_mode trim pixel alpha less than input value (unsigned char [= ])
-e, --extrude extrude (unsigned char [= ])
-?, --help print this message
舉例說(shuō)明:
1.生成單張圖片,將456文件夾下的所有圖片打包輸出到789文件夾,輸出文件名稱為test,圖片最大尺寸4096,命令如下:
CppTextu -i 456 -n test -o 789 -w 4096 -h 4096
此命令僅生成一張最大尺寸(為寬4096,高4096)的圖片,最大尺寸取值范圍為(1~65535),如果456文件夾中的圖片非常多,超過(guò)了設(shè)置的最大值,可以使用下面的命令,生成多張大圖,以此來(lái)滿足需要。
2.生成多張圖片,這里同樣使用上面的文件夾來(lái)做演示,如下命令:
CppTextu -i 456 -n test%d -o 789 -w 4096 -h 4096
這樣便可以生成多張最大尺寸(為寬4096,高4096)的圖片,最大尺寸取值范圍為(1~65535)
評(píng)論
圖片
表情
