Check in indexed2rgb.sh script,
...so the imagemagick docs don't need to be read again for this task
This commit is contained in:
parent
0ae44dc8b2
commit
143abca69f
1 changed files with 29 additions and 0 deletions
29
utils/indexed2rgb.sh
Executable file
29
utils/indexed2rgb.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Script to convert PNGs from indexed to RGB mode.
|
||||
#
|
||||
# Run-time requirements: ImageMagick
|
||||
#
|
||||
|
||||
while [ "${1}" != "" ]; do
|
||||
# Rather useless until we start accepting options, but whatever.
|
||||
filelist="${filelist} ${1}"
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$filelist"; then
|
||||
filelist=`find -iname "*.png"`
|
||||
fi
|
||||
|
||||
number=`echo $filelist|wc -w`
|
||||
|
||||
echo "Converting $number files to RGB mode..."
|
||||
|
||||
for f in $filelist
|
||||
do
|
||||
convert -define png:color-type=TrueColor $f $f.new
|
||||
mv -f $f.new $f
|
||||
done
|
||||
|
||||
echo "Done. Now would be a good time to run optipng"
|
||||
|
Loading…
Add table
Reference in a new issue