天天看點

.pvr.ccz 與 png 格式 互轉的解決方案

首先,我們必須要下載下傳一個工具TexturePacker,

下載下傳好以後,将以下的批處理檔案裡面TexturePacker的安裝目錄修改一下,然後将此批處理檔案放置于你的資源所在的目錄裡面,運作,即可。

PVR轉PNG

@echo off

path %path%;"C:\Program Files (x86)\TexturePacker\bin"

for /f "usebackq tokens=*" %%d in (`dir /s /b *.pvr *.pvr.ccz *.pvr.gz`) do (

TexturePacker.exe "%%d" --sheet "%%~dpnd.png" --data "%%~dpnd.plist" --opt RGBA8888 --allow-free-size --algorithm Basic --no-trim --dither-fs

)

pause

EDIT:2014/07/24 之前的轉換有問題,修改之後就沒問題了.

PNG轉PVR

path %path%;"C:\Program Files (x86)\CodeAndWeb\TexturePacker\bin"

for /f "usebackq tokens=*" %%d in (`dir /s /b *.png`) do (

TexturePacker.exe "%%d" --sheet "%%~dpnd.pvr" --data "%%~dpnd.plist" --opt PVRTC4 --allow-free-size --algorithm Basic --no-trim --dither-fs