---
title: "TexturePacker"
author: "liuqf"
date: "2014-04-24T19:16:15Z"
tags: []
categories: ["移动开发"]
slug: "texturepacker"
draft: false
lastmod: "2014-04-24T19:16:15Z"
id: 2054280
url: "https://liuqf.iteye.com/blog/2054280"
---

![](http://dl2.iteye.com/upload/attachment/0096/4475/3c80985f-be79-35d9-bd9d-7ff37b070b53.png)

1\. 使用脚本生成图片，如果有白边的情况，需要加 --premultiply-alpha 语句。  
2\. RBGA4444格式，改变抖动选项为“FloydSteinberg＋Alpha”。Texture　Packer将会在动态修改你的图片，而且马上显示出效果来。  
3\. 如何使用脚步自动生成图片：http://www.cnblogs.com/andyque/archive/2011/05/15/2045784.html  
4\. 优化：http://www.cnblogs.com/andyque/archive/2011/03/18/1988097.html  
优化背景图片：把图片格式改成RBG565（对于大的图片来说，你可能需要更好的质量），然后改变抖动方法为“FloydSteinberg”（为什么不是FloydSteinberg＋Alpha呢？因为像素格式是RBG565，没有了Alpha通道）  
\[CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat\_RGB565];

 

 

相关地址：

[http://www.codeandweb.com/texturepacker](http://www.codeandweb.com/texturepacker)

[http://www.codeandweb.com/physicseditor](http://www.codeandweb.com/physicseditor)

[http://twitter.com/CodeAndWeb](http://twitter.com/CodeAndWeb)