下载之家:安全、高速、放心的绿色下载站!

当前位置:首页软件下载图形图像详细列表

TexturePacker V5.5.0绿色版

  • 软件介绍
  • 下载地址
  • 同类推荐
  • 相关文章

TexturePacker绿色版是一款功能超级强大的图片打包工具。TexturePacker绿色版可以快速的将图片拼接在一起,并且可以操作大量的图片哦。用TexturePacker绿色版建立表格或者图集可以帮助用户减少工作时间,很方便的提高的用户的工作效率,所以说有需要打包大量图片的用户可以直接来这里哦。TexturePacker绿色版里面还有许多方便操作的功能,比如说可以添加精灵、删除精灵以及拆分精灵图片等等,用户可以随意的导入、进行图片的添加删除,还可以一次性的打包多个精灵图,而操作方式也是极为简单的。另外TexturePacker绿色版还可以进行数据格式文件和图片格式传输、支持多种格式的文件以及多种图片格式。总而言之。TexturePacker绿色版使用起来是非常方便,能为用户节省不少的时间呢

TexturePacker v5.5.0绿色版

TexturePacker绿色版支持格式

一、可以直接导入以下文件格式:

PSD-Photoshop图像

SWF-Flash动画-包括帧标签

PNG-便携式网络图形

TGA-Targa图像文件

JPG-联合摄影专家组

TIFF-标记图像文件格式

BMP-位图

二、对于导出,可以使用以下图像格式:

PNG-便携式网络图形

PVR-PowerVR-iPhone图像格式(gzip或zlib压缩)

JPG-联合摄影专家组

BMP-位图

TGA-Targa图像文件

TIFF-标记图像文件格式

PKM-带ETC1的PKM

PPM-Netbpm(ASCII或二进制)

WebP-谷歌图片格式

ATF-Adobe纹理格式

TexturePacker绿色版使用教程

1、打开TexturePacker

2、我的图片资源存放在F:_datavPuzzleresource.work,如果你喜欢,你可以把整个文件夹拖到右边的①区,下图是拖进去以后的模样。

TexturePacker v5.5.0绿色版

3、但是往往我们不想一股脑把所有图片合在一张超大的图中,所以我个人比较喜欢手动添加图片,这样便于控制。

TexturePacker v5.5.0绿色版

4、我添加了一些图片,并把它们拖到上面图右边的区域

TexturePacker v5.5.0绿色版

5、ok,该保存了。在data file处填入你要的plist文件路径,在texture format处选择你要的图片格式,在texture file填入你要生成的图片路径。

TexturePacker绿色版常见问题

怎么把TexturePacker的plist切成单独小图?

1、安装python-2.7.6.amd64.msi并配置环境变量 Path :C:Python27

TexturePacker v5.5.0绿色版

2、检验python是否安装配置成功:打开cmd,输入python,如果出现以下界面,则说 明你的python安装成功了

TexturePacker v5.5.0绿色版

3、安装第三方的模块02_Pillow-2.4.0.win-amd64-py2.7.exe

4、创建一个文本,修改后缀为py,建议命名:unpack_plist.py,将unpack_plist.py放到你Python27安装目录里

代码如下:

#!python

import os,sys

from xml.etree import ElementTree

from PIL import Image

def tree_to_dict(tree):

d = {} for index, item in enumerate(tree): if item.tag == 'key': if tree[index+1].tag == 'string':

d[item.text] = tree[index + 1].text

elif tree[index + 1].tag == 'true':

d[item.text] = True

elif tree[index + 1].tag == 'false':

d[item.text] = False

elif tree[index+1].tag == 'dict':

d[item.text] = tree_to_dict(tree[index+1]) return d

def gen_png_from_plist(plist_filename, png_filename):

file_path = plist_filename.replace('.plist', '')

big_image = Image.open(png_filename)

root = ElementTree.fromstring(open(plist_filename, 'r').read())

plist_dict = tree_to_dict(root[0])

to_list = lambda x: x.replace('{','').replace('}','').split(',') for k,v in plist_dict['frames'].items():

rectlist = to_list(v['frame'])

width = int( rectlist[3] if v['rotated'] else rectlist[2] )

height = int( rectlist[2] if v['rotated'] else rectlist[3] )

box=(

int(rectlist[0]), int(rectlist[1]), int(rectlist[0]) + width, int(rectlist[1]) + height,

)

sizelist = [ int(x) for x in to_list(v['sourceSize'])]

rect_on_big = big_image.crop(box) if v['rotated']:

rect_on_big = rect_on_big.rotate(90)

result_image = Image.new('RGBA', sizelist, (0,0,0,0)) if v['rotated']:

result_box=(

( sizelist[0] - height )/2,

( sizelist[1] - width )/2,

( sizelist[0] + height )/2,

( sizelist[1] + width )/2

) else:

result_box=(

( sizelist[0] - width )/2,

( sizelist[1] - height )/2,

( sizelist[0] + width )/2,

( sizelist[1] + height )/2

)

result_image.paste(rect_on_big, result_box, mask=0) if not os.path.isdir(file_path):

os.mkdir(file_path)

outfile = (file_path+'/' + k).replace('gift_', '')

print outfile, "generated"

result_image.save(outfile)if __name__ == '__main__':

filename = sys.argv[1]

plist_filename = filename + '.plist'

png_filename = filename + '.png'

if (os.path.exists(plist_filename) and os.path.exists(png_filename)):

gen_png_from_plist( plist_filename, png_filename ) else:

print "make sure you have boith plist and png files in the same directory"

TexturePacker v5.5.0绿色版

5、在python27安装目录下按Shift键加鼠标右键在此处打开命令窗口,将需要切成单独小图片的

TexturePacker的plist图片放到python 27安装目录里

命令行: python unpack_plist.py shop文件名称

比如: python unpack_plist.py shop(我的plist文件全名为 ui.plist)

TexturePacker v5.5.0绿色版

TexturePacker v5.5.0绿色版

6、这时就已经完全把图片切成小图片了,在Python27安装目录里就会出现shop文件夹,里面的图片就是小图片

如何利用TexturePacker加密Cocos2d-x图片资源?

打开 TexturePacker,把图片素材拖入到 Sprites 里面,为了能将 TexturePacker 导出的.plist 文件能成功导入到 cocos studio 里面,这里必须选择 Framework 为 cocos 2d v2 (old CocoStudio),然后 Texture format 保持默认的 PNG-32。点击 Publish sprite sheet。假设设置的 Data file 为 demo.plist,则会看见 demo.plist 和 demo.png 文件生成了。

TexturePacker v5.5.0绿色版

TexturePacker v5.5.0绿色版

打开 Cocos Studio,把第一步生成的demo.plist 和 demo.png 导入(或者直接拖过去),创建一个测试的 demoLayer,直接可以把 plist 里面的图片应用到 layer 的设计上面。最后通过 Cocos Studio 导出,我们只需要demoLayer.csb 二进制文件。

TexturePacker v5.5.0绿色版

TexturePacker v5.5.0绿色版

再通过 TexturePacker 创建加密的.plist 和.pvr.ccz 文件。我们把 Framework 改成 cocos2d-x,设置好 Content Protection。注意里面的那32个16进制数字是密钥,稍后需要我们才在c++代码里面设置好。

TexturePacker v5.5.0绿色版

TexturePacker v5.5.0绿色版

创建一个 cocos2d-x 的 c++或者 lua 工程(e.g. cocos new -p demo.test.com -l cpp demo). 然后把第二次生成的demo.plist 和那个 demo.pvr.ccz 导入到资源里面(这里以 Xcode 为例)。添加代码来加载 cocos studio 生成的.csb 文件。也可以直接用那些图片资源。

TexturePacker v5.5.0绿色版

运行程序,.csb 文件和加密的图片都被成功加载。而我们发布的资源只有.plist 和那个加密的.pvr.ccz 文件,一定程度的保护了我们的版权。

TexturePacker v5.5.0绿色版

点击查看更多: TexturePacker

下载声明

推荐使用[迅雷]下载,使用 [360压缩]解压本站软件。

本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。

本站提供的[TexturePacker V5.5.0绿色版]资源来源互联网,版权归该下载资源的合法拥有者所有。