diff options
author | Chmouel Boudjnah <chmouel@mandriva.org> | 2002-01-30 13:16:47 +0000 |
---|---|---|
committer | Chmouel Boudjnah <chmouel@mandriva.org> | 2002-01-30 13:16:47 +0000 |
commit | 9f1dd44ca147dfb63671bd1967125479b8531c9f (patch) | |
tree | 724d15570634cd69dfd6914691fd6de4667d0487 /scripts/rewritejpeg | |
parent | 6c65f35cc84cd80125622e87c74d0c16a21c146b (diff) | |
download | bootsplash-9f1dd44ca147dfb63671bd1967125479b8531c9f.tar bootsplash-9f1dd44ca147dfb63671bd1967125479b8531c9f.tar.gz bootsplash-9f1dd44ca147dfb63671bd1967125479b8531c9f.tar.bz2 bootsplash-9f1dd44ca147dfb63671bd1967125479b8531c9f.tar.xz bootsplash-9f1dd44ca147dfb63671bd1967125479b8531c9f.zip |
Initial revisionfirst_import
Diffstat (limited to 'scripts/rewritejpeg')
-rwxr-xr-x | scripts/rewritejpeg | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/rewritejpeg b/scripts/rewritejpeg new file mode 100755 index 0000000..b2e36ea --- /dev/null +++ b/scripts/rewritejpeg @@ -0,0 +1,29 @@ +#!/bin/bash +# -*- Mode: shell-script -*- +# Copyright (C) 2002 by Chmouel Boudjnah <chmouel@mandrakesoft.com> +# Redistribution of this file is permitted under the terms of the GNU +# Public License (GPL) +# +# Take a Jpeg and reconvert it via ppm-tools to make sure is +# compatible for boot logo +# $Id$ + +files="$@" + +[[ -z $files ]] && { + echo "I need jpeg files argument" + exit 1 +} + +for file in $files;do + [[ $file != *.jpg ]] && { + echo "$file is not a jpeg" + continue; + } + echo "Converting $file" + tmp=${file/.jpg/.ppm} + jpegtopnm $file > $tmp + ppmtojpeg $tmp > $file + rm -f $tmp +done + |