POV-Ray : Newsgroups : povray.beta-test : 16-bit PGM pigment and height field problems : Re: 16-bit PGM pigment and height field problems Server Time
4 Nov 2024 21:21:51 EST (-0500)
  Re: 16-bit PGM pigment and height field problems  
From: Ron Parker
Date: 2 Oct 2001 13:41:31
Message: <slrn9rjv2d.fbd.ron.parker@fwi.com>
On Tue, 2 Oct 2001 03:59:11 -0500, Mike Hough wrote:
>> Mike, your PGM file has a couple of problems.  First, xv thinks it's
>> truncated (and pgmtoppm spins forever trying to read it, which backs up
>> xv's assertion.)
>
>The file was created by Bryce which can also read the image.  Paint shop pro
>reports the image as being 128x128 both prior to and after opening.  POV-Ray
>3.1 reads and reproduces the file correctly as well.  Short of counting each
>entry in the map, it seems that it does have the number of values indicated
>in the header.

But it doesn't:

[ron@fwi News]$ wc -w KingstonEast.pgm
  16382 KingstonEast.pgm

There should be 16384 words for the data, plus 2 for the size, one for the
max, and one more for the header.  It's short by 6 words.  However, this
might be an issue with the encoding; perhaps you can zip your image and
repost it in the binaries group?

>> Second, the lines are too long: the pgm spec says lines
>> must be 70 characters or less.
>
>Although it does say this for writing files, it also says that programs that
>read this format should be as lenient as possible, accepting anything that
>looks remotely like a graymap.  POV-Ray 3.1 would except longer lines.

3.5 should, too.  I'm just looking for reasons why your file doesn't even
work properly with xv or pgmtoppm, let alone POV 3.5.  I don't dispute that
there might be a problem with 16-bpp heightfields in 3.5; PNG has a known 
bug that's probably related.  But first I have to get a good PGM image.

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.