-
-
Save dfrankland/a125d5f652f5474de76ea9a89ce63006 to your computer and use it in GitHub Desktop.
Simple `imagemagick` fish shell script to convert all @2x images in a directory to @1x. Place file in `~/.config/fish/functions/`, then run like normal: `resize`!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function resize --description "Resize images from @2x to @1x in current directory." | |
for image in * | |
echo $image | grep -qE '.*@2x.*'; and \ | |
convert $image -resize 50% (echo $image | sed "s/@2x/@1x/g") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment