On 20/05/2018 02:58, Dennis Lee Bieber wrote:
On Sun, 20 May 2018 02:13:01 +0100, bartc <b...@freeuk.com> declaimed the
following:
I think if you are going to be generating ppm, then the best choice of
format, for the widest acceptance, is to separate the header groups with
a newline. (As I mentioned my downloaded viewer needs a new line after
the first group. My own viewer, which I only threw together the other
day to test that benchmark, also expects the newlines. Otherwise I might
need to do 5 minutes' coding to fix it.)
IrfanView had no problem opening my file, where the only <lf> was the
one after the maxval field. Between that as an example, and the
documentation of the format, one could decree that any reader that
/requires/ <lf>s at various points is erroneous or incomplete.
I think that's the wrong approach. You need to work to the lowest common
denominator, not the highest. (Within reason anyway.)
If you tested half a dozen viewers, and two of them don't need any
newlines between groups, and the rest need at least one, or between all
groups, what does this tell you about how you should be generating your
file?
You may not know what viewer or reader is to be used.
I have a suspicion (although I will have to test more) that newlines
between groups is more universally accepted.
(I tried to get irfanview but it tells me I need Windows 10, which is an
odd requirement for an image viewer. So I'll have to try it later.)
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list