🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.khoros
Article #996

Re: pbm2viff question

#996
From: Mark Young
Date: Sat, 21 Nov 1992 14:29
82 lines
3034 bytes
Hi,

   I responded to Suran yesterday, but thought that others may want
the fix as well.

On Nov 20, 11:08am, Suran de SILVA wrote:
} Subject: pbm2viff question
} From suran@nff.ncl.omron.co.jp  Thu Nov 19 19:09:02 1992
} 
} Hi,
} 
} 	Has anybody been using the Khoros file-format conversion program,
} pbm2viff?  I tried using it on an image I scanned in using an EPSON GT-4000
} in pbm format.  I got the following error message from pbm2viff:
} 
} 	read_pbm:  Error!  Invalid width.
} 	Unable to read width of the pbm image.
} 	pbm2viff: Could not read input image.	

Hi Suran,

   I looked into the problem you were having with pbm2viff and have a fix
for you.  It was my fault (usually is).  When writing the format i thought
the spec said that the pbm identifier ie P1, P2, P3, P4, etc must come on
line by itself.  That the format must look something like:

P4
200 197

not:

P4 200 197

If you are interested in fixing the problem here is a fix that i have
done a fairly healthy, but not extensive, testing on the omron and sun
with your test file and a few of our own.  So i don't expect any problems,
but as always please let me know if you find any.  To fix the problem
you'll need to change the file $KHOROS_HOME/src/file_formats/Lib/pbm.c
at line 112 from:

        if (!fgets(line, LENGTH, file))
        {
           (void) fprintf(stderr,"read_pbm:  Error!  Unexpected end of \n\

to:
        if (fscanf(file," %2c", line) <= 0)
        {
           (void) fprintf(stderr,"read_pbm:  Error!  Unexpected end of \n\


Then re-install the file formats library ($KHOROS_HOME/src/file_formats/Lib)
and also the pbm2viff program itself which is located in:

	$KHOROS_HOME/src/file_formats/standards/pbm2viff

} 
} Thanks in advance.
} 
} rgds,
} Suran.
} suran@nff.ncl.omron.co.jp
} 
}-- End of excerpt from Suran de SILVA

Anyway i apologize for any problems this may have caused and thanks
again for bring this bug to our attention.

                        thanks,
                             Mark

ps.  i'll cc: this to khoros-bugs so that it gets logged.  Also i'll respond
     with this fix to the khoros mailing list later today since other people
     will probably get hit by this.
     

-----------------------------------------------------------------------------
Mark Young                         young@chama.eece.unm.edu
 
Khoros Group                       (505) 277-6563  (work)
University of New Mexico           Albuquerque,    NM 87131
-----------------------------------------------------------------------------
Humor is something that is plentyful if you are willing to laugh at yourself.
Technical Details
Message-ID: <41775@pprg.eece.unm.edu.pprg.unm.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!mimbres.cs.unm.edu!pprg.unm.edu!daemon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!mimbres.cs.unm.edu!pprg.unm.edu!daemon
From: young@chama.eece.unm.edu (Mark Young)
Newsgroups: comp.soft-sys.khoros
Subject: Re: pbm2viff question
Message-ID: <41775@pprg.eece.unm.edu.pprg.unm.edu>
Date: 21 Nov 92 14:29:56 GMT
Article-I.D.: pprg.41775
Sender: daemon@pprg.unm.edu
Lines: 82