Last active
July 26, 2016 19:06
-
-
Save baz8080/cd334508ccaf9a625dd228c1ec368ace to your computer and use it in GitHub Desktop.
Flipping images using ImageMagick
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
# This isn't a script. Just copy / paste or type along. | |
# Go to your downloads directory | |
cd ~/Downloads | |
# Unzip the icon set and cd into the directory | |
unzip -q ic_attach_file_black_24dp.zip | |
cd ic_attach_file_black_24dp | |
# At this point you'll have some lovely attach | |
# icons where the open end of the paperclip is | |
# on the right | |
# Flip those images! | |
for IMAGE in $(find android -iname "*png") ; do convert $IMAGE -flop $IMAGE ; done | |
# And now the open end is on the left! However, the | |
# directories don't have the correct name so let's | |
# rename them. Bear with me, my script-fu is not | |
# Jedi-like. | |
cd android | |
for ANDROID_DIR in $(ls -d */) ; do mv $ANDROID_DIR ${ANDROID_DIR/drawable/drawable-ldrtl} ; done | |
# Now just merge them into your project. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment