#!/bin/bash # author : jiangxf 2015.1.21 if [ $# -lt 2 ]; then echo "Usage: resizePng.sh {pngName} {percentage}"; exit; fi width=`sips -g pixelHeight $1 | tail -n1 | awk -F: '{print $2}'` newWidth=`expr $width \* $2 / 100`; echo "$1: width($width => $newWidth)"; sips -Z $newWidth $1;
find . -name "*.png" -exec ./resizePng.sh {} 67 \;
原文链接:https://www.f2er.com/cocos2dx/344785.html