- 使用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的項目,