swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .pgm files


From: Nelson Minar
Subject: Re: .pgm files
Date: Wed, 9 Dec 1998 19:22:13 -0500 (EST)

>Do you know if it is possible to create acceptable (accept for the
>comment info) files using gimp?

I'm embarassed because I have the sinking feeling my bogus PGM code
has percolated into the world and now good scientists are wasting
their time wondering why some code that claims to load PGM files isn't
working with legitimate PGM files.

The code I sent to swarm-support 6 Jul 1997 can only read ASCII PGM
files without comments. This is broken. To fix it, two things should
be done:

  Make it handle P5 binary format as well as P2 ascii.
  Make it skip over comments (anything from a # to end of line).

The former is just a simple switch in the PGM reader code. The latter
is best done with a modification to InFile that gives it a comment
skipping mode. This is a bit of a hassle to implement in InFile, but
it is generally useful. Look at the Java parsing utilities
(StreamTokenizer, for instance) for a model.

my apologies for the mess I made,
  Nelson
                                                  address@hidden
.       .      .     .    .   .  . . http://www.media.mit.edu/~nelson/

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]