Skip to content

Instantly share code, notes, and snippets.

@jeanregisser
jeanregisser / unretiner
Created June 28, 2012 12:46
Resize all Retina @2x images in this directory to their half-resolution counterparts with ImageMagick
#!/bin/bash
RETINA_IMAGES=`find . -name "*@2x*.png"`
for retina_path in $RETINA_IMAGES
do
target_path="${retina_path/@2x/}"
convert -resize 50% $retina_path $target_path
echo "Converted ${retina_path} to ${target_path}"
done