Created
May 18, 2017 16:25
-
-
Save crockpotveggies/4f4cbfe9b39cb3124b03a767bcd571d5 to your computer and use it in GitHub Desktop.
Remove all corrupt PNGs with bad headers using ImageMagick and identify command
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
for i in $(find ./ -maxdepth 2 -iname '*.png' -type f -print); do if $(identify "$i" 2>&1 |grep -q improper); then echo "$i incorrect"; fi; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment