Skip to content

Instantly share code, notes, and snippets.

@yllan
Created June 10, 2011 12:51
Show Gist options
  • Select an option

  • Save yllan/1018779 to your computer and use it in GitHub Desktop.

Select an option

Save yllan/1018779 to your computer and use it in GitHub Desktop.
thumbnail with compression rate
find . -name "*.jpg" -exec sips -Z 1200 -s formatOptions 50 "{}" ";"
# convert file format
sips -Z 1200 -s format jpeg -formatOptions 50 originFilePath --out newFilePath
# change name from png to jpg recursively
for X in `find . -name "*.png"`
do
echo $X ${X/.png/.jpg}
done
# 直接用 Automator 比較快…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment