Created
December 19, 2012 02:30
-
-
Save sweetmandm/4333869 to your computer and use it in GitHub Desktop.
Script to batch-convert a directory of PNG files to iOS-compativle PVR using the PVRTexTool command-line tool.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# Batch process png to pvr conversion | |
# using PVRTexTool Command-line tool | |
#take all files of this type: | |
filetype="png" | |
#take them from here: | |
sourcedir="./" | |
#put them here: | |
destdir="./" | |
#use this path for pvrtextool: | |
pvrtool=" ***YOUR PATH TO PVRTEXTOOLCL GOES HERE*** /PVRTexTool/PVRTexToolCL/MacOS_x86/PVRTexTool" | |
#run the batch: | |
cd "$sourcedir" | |
for i in *."$filetype"; do | |
"$pvrtool" -m -pvrlegacy -foglpvrtc4 -premultalpha -pvrtcbest -yflip 1 -i "$i" -o "$destdir""$i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment