- 使用Mac系统(不管是真机还是虚拟机)
- 安装Xcode
脚本:
depng.sh
#!/bin/sh
# create the sub folder decoded
if [ ! -d ./decoded ]
then
echo "create sub folder decoded"
mkdir ./decoded
fi
# decode all the png images in current folder
for i in *.png; do
if [ ! -f ./decoded/${i} ]
then
echo "${i} => decoded"
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush -revert-iphone-optimizations ${i} decoded/${i}
fi
done
使用:
- depng.sh放到PATH目录下,如/usr/local/bin
- 到ipa的解压目录下,执行depng.sh即可。
补充:
pngcrush是一个open source的项目,