forked from fmarier/user-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make use of pngcrush to strip PNG files (via new script)
- Loading branch information
Francois Marier
committed
Dec 22, 2013
1 parent
55fc638
commit a789007
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# | ||
# Strips non-essential parts of PNG images using pngcrush | ||
# | ||
|
||
if [ "z$1" = "z" ] ; then | ||
echo "Usage: `basename $0` file1.png [ file2.png [ file3.png ... ] ]" | ||
exit 1 | ||
fi | ||
|
||
for f in $* ; do | ||
pngcrush -q -rem gAMA -rem alla -rem text $f $f.crushed && mv $f.crushed $f | ||
done |