# How can I batch-convert TexturePacker .pvr.ccz files to .png?

I am a pixel artist with very little programming knowledge. I have read that it's possible to use Texture Packer to do batch conversion of pvr.ccz files to png using the Command Line Tool.

How do I install the Command Line Tool for Texture Packer? It doesnt seem to be installed by default and the info presented when I select 'File'-> 'Install Command Line Tool' makes no sense to me... It says:

Simply add C:/Program Files (x86)/CodeAndWeb/TexturePacker/bin to your path variable or add the following line to your scripts calling TexturePacker: set "PATH=C:/Program Files (x86)/CodeAndWeb/TexturePacker/bin;%PATH%"

I dont understand how to carry out these instructions..

Then, once I succeed in installing the Command Line Tool, what should I type into the Command Line Tool to convert 50 or so .pvr.ccz files to .pngs in a different folder?

The TexturePacker website has this to say on Batch Converting:

Write a simple batch file containing these lines to do as mass conversion of images:

@
echo off
for %%X
in (*.png)
do (C:\Programme\TexturePacker\bin\TexturePacker.exe  <parameters>  %%X)


Batch converting images to pvr or pvr.ccz

You can use TexturePacker to simply convert a complete directory of images with a single command line call into whatever output format you need (pvr.ccz in this example):

find <directoryname> -name \*.png | sed 's/\.png//g' | \
xargs -I % -n 1 TexturePacker %.png \
--sheet %.pvr.ccz \
--data dummy.plist \
--algorithm Basic \
--allow-free-size \
--no-trim \
--opt RGBA4444 \
--dither-fs


Replace with the directory to search.

So this example is converting png to pvr, I need to go the other way. But I have no idea how to open or install the Command Line Tool from within the Texture Packer GUI...

And then Im not sure how to use the code above to write a 'simple batch file' to carry out the conversion I need?

I'm on a PC with Windows 7.

• I edited to clarify. I know nothing about TexturePacker, but what did the Install Command Line Tool option say? (Maybe you forgot to paste it?) – Anko Jan 29 '14 at 15:01
• There's a similar question on StackOverflow, but there are no answers and the comments don't look too helpful... – Anko Jan 29 '14 at 15:04
• Thanks for your replies Anko, I updated the op to include greater detail. I am aware of the other post on StackOverflow. I have read it through, along with every other mention of this issue but I cant find instructions anywhere that answer my question. – Sammy the gofer Jan 30 '14 at 0:47

TexturePacker installs a command line tool with the standard installation.

You have to set the path to find it from command line. A description about how to add the path can be found here.

To reach the command prompt: Click the Start button Picture of the Start button. In the Search box, type Command Prompt, and then, in the list of results, double-click Command Prompt.

If you've set the path according to the information in TexturePacker you should be able to type

TexturePacker --help


Which should list commands available in TexturePacker. If you get "command not found" something went wrong with the path.

From here you should be able to run

TexturePacker filename.pvr.ccz --sheet filename.png --data dummy.plist --algorithm Basic --allow-free-size --no-trim


This should create a sprite sheet with the single sprite in the .pvr.ccz file and convert it into a .png file.

• If you mean the Windows command prompt (cmd.exe), you can open it more reliably by first opening the run prompt with Win+r then typing in cmd and hitting enter. – Anko Feb 5 '14 at 16:43
• It said an error: "TexturePacker:: error: Failed to load image J:/1.pvr.ccz: Key required" – Leo Nguyen Jun 22 '17 at 14:52
• Sounds like they're using the Content Protection feature of TexturePacker. If these are your assets, or the creator has given you permission to use them, then you should have no difficulty providing the key. – DMGregory Mar 31 '18 at 13:45