User Tools

Site Tools


en:tutorials:textures:compressedtextures

This is an old revision of the document!


Compressed Textures on the iOS platform

Creating compressed textures

Apple provides a tool called texturetool which will take care of compressing your textures. Details on how to do that can be found here.

Here is a small bash script that will iterate over some textures and compresses them. Note: The input textures must have power-of-two dimensions and must be square!

#!/bin/sh
for file in "$@"
do
ext=${file##*.}
name=${file%.*}
texturetool -e PVRTC --bits-per-pixel-2 -f PVR -o "$name.pvr" $file &
done
wait
It can be invoked like this:
compressfiles.sh texturesfiles*.png

en/tutorials/textures/compressedtextures.1302767018.txt.gz · Last modified: 2017/05/30 00:50 (7 years ago) (external edit)