[syslinux] ppmtolss16: input format error 1

Andreas Neuper aneuper at web.de
Sat Jan 10 07:06:23 PST 2004


I am using "syslinux-1.62-375" and got the following message

$ /usr/share/syslinux/ppmtolss16  <planet.ppm
/usr/share/syslinux/ppmtolss16: Input format error 1

The file planet.ppm was created by "xv" and has the following header:

$ head -3 planet.ppm
P6
# CREATOR: XV Version 3.10a  Rev: 12/29/94 (PNG patch 1.2)
640 340


Removing the comment line by a filter fixed the input error. But it 
might be useful for others to modify a single line in the script to 
ignore those comments there:


--- ppmtolss16.orig      2003-03-14 03:14:52.000000000 +0100
+++ ppmtolss16    2004-01-10 02:21:18.000000000 +0100
@@ -91,7 +91,7 @@

 $form = <STDIN>;
 die "$0: stdin is not a raw PPM file" if ( $form ne "P6\n" );
-$sizes = <STDIN>;
+do { $sizes = <STDIN> ; } while ( $sizes =~ /^#/ );
 chomp $sizes;
 if ( $sizes !~ /^([0-9]+)\s+([0-9]+)\s*$/ ) {
     die "$0: Input format error 1\n";


No problems after that:

# ppmtolss16  <planet.ppm >/dev/null
217600 pixels, 29076 bytes, (73.28% compression)


Andreas













.


























.
______________________________________________________________________________
Nachrichten, Musik und Spiele schnell und einfach per Quickstart im 
WEB.DE Screensaver - Gratis downloaden: http://screensaver.web.de/?mc=021110




More information about the Syslinux mailing list