免费的png打包plist工具CppTextu,一款把若干资源图片拼接为一张大图的免费工具

经常做游戏打包贴图的都知道,要把图片打包为一张或多张大图,要使用打包工具TexturePacker。

TexturePacker官方版可以直接导入PSD、SWF、PNG、BMP等常见的图片格式,主要用于网页、游戏和动画的制作,它可以将多个小图片汇聚成一个大图,等上传的时候,速度会非常快,当然功能远不止这些,在此就不再多讲,大家可以自行百度。

CppTextu是一款免费的图片打包工具,软件小巧易用,主流游戏图片格式,如bmp,jpg,png可以打包为png大图,采用命令行格式,简单的命令如下:

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

举例说明:

1.生成单张图片,将456文件夹下的所有图片打包输出到789文件夹,输出文件名称为test,图片最大尺寸4096,命令如下:

CppTextu -i 456 -n test -o 789  -w 4096 -h 4096

此命令仅生成一张最大尺寸(为宽4096,高4096)的图片,最大尺寸取值范围为(1~65535),如果456文件夹中的图片非常多,超过了设置的最大值,可以使用下面的命令,生成多张大图,以此来满足需要。

2.生成多张图片,这里同样使用上面的文件夹来做演示,如下命令:

CppTextu -i 456 -n test%d -o 789  -w 4096 -h 4096

这样便可以生成多张最大尺寸(为宽4096,高4096)的图片,最大尺寸取值范围为(1~65535)

有兴趣的可以下载使用,点击下载。

免费的png打包plist工具CppTextu,一款把若干资源图片拼接为一张大图的免费工具_第1张图片

你可能感兴趣的:(cpptextu)