diff options
author | Florent Villard <warly@mandriva.com> | 2003-11-18 09:28:35 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2003-11-18 09:28:35 +0000 |
commit | 750e1aa07bb6dcc39ea37275df876af938ca2422 (patch) | |
tree | d1896e36ee08dd72fb829279c344d46e5730dd05 /scripts/rewritejpeg | |
parent | 78af07ac00cd6fc4ea969828b0f965d63f3077ba (diff) | |
download | bootsplash-750e1aa07bb6dcc39ea37275df876af938ca2422.tar bootsplash-750e1aa07bb6dcc39ea37275df876af938ca2422.tar.gz bootsplash-750e1aa07bb6dcc39ea37275df876af938ca2422.tar.bz2 bootsplash-750e1aa07bb6dcc39ea37275df876af938ca2422.tar.xz bootsplash-750e1aa07bb6dcc39ea37275df876af938ca2422.zip |
rely on initrd file to find correct bootloader entry and resolution in detect-resolution
correctly rewrite gray scaled jpeg
Diffstat (limited to 'scripts/rewritejpeg')
-rwxr-xr-x | scripts/rewritejpeg | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/scripts/rewritejpeg b/scripts/rewritejpeg index b2e36ea..21822c7 100755 --- a/scripts/rewritejpeg +++ b/scripts/rewritejpeg @@ -6,6 +6,11 @@ # # Take a Jpeg and reconvert it via ppm-tools to make sure is # compatible for boot logo +# +# Modified by Olivier Blin on October 30, 2003. +# grayscale jpeg support. +# it's perhaps better to use "convert -type TrueColor" +# # $Id$ files="$@" @@ -20,10 +25,17 @@ for file in $files;do echo "$file is not a jpeg" continue; } - echo "Converting $file" - tmp=${file/.jpg/.ppm} - jpegtopnm $file > $tmp - ppmtojpeg $tmp > $file - rm -f $tmp + tmp_ppm=${file/.jpg/.ppm} + output=`jpegtopnm $file 2>&1 > $tmp_ppm` + echo $output + if [[ $output == *PGM* ]]; then + tmp_pgm=${file/.jpg/.pgm} + mv $tmp_ppm $tmp_pgm + echo "(converting PGM file into PPM file)" + pgmtoppm grey $tmp_pgm > $tmp_ppm + rm -f $tmp_pgm + fi + ppmtojpeg $tmp_ppm > $file + rm -f $tmp_ppm done |