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:26:16 EST (-0500)
  Re: 16-bit PGM pigment and height field problems  
From: Ron Parker
Date: 2 Oct 2001 20:59:41
Message: <slrn9rkoo0.gg6.ron.parker@fwi.com>
On Tue, 2 Oct 2001 17:36:35 -0500, Mike Hough wrote:
>> 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?
>
>I doubt this is an encoding problem, since the file is ASCII text.  Why
>would it need a word to represent the header and the size?  I'm not sure of
>the max either.  They are ASCII codes.  Technically it should be possible to
>write a PGM file in a word processor and have it work.  It almost seems like
>the file is being read in binary.  I'm going to upload a much smaller PGM
>file to the binaries group that's easier to dissect.

You know, your attitude could use a LOT of adjustment.  I know what a PGM
file is.  I know what an ASCII PGM file is.  Believe it or not, I've even
read the spec for PGM files.  I have tools to work with PGM files: a few
weeks ago, I build the entirety of the netpbm distribution from scratch,
including all of the libraries it depends on (even GhostScript) because I
wanted to be up-to-date on the latest happenings in the PNM world.  I 
really dislike being talked down to by someone who can't even understand
when I tell him what's wrong with the file he posted.

Nevertheless, because someone else might someday want to use a PGM file
in POV-Ray, I've fixed the bug you reported.  I haven't fixed the comment
bug yet, because that is a huge can of worms that I just don't want to 
open tonight.  I also haven't made POV be able to handle binary 16-bit
PGM files on input.  But the other bug is fixed.

Your DEM-to-PGM program, by the way, doesn't correct for the projection
and leaves a huge flat border on one side of the output.  I'd find a 
better conversion program if I were you.

-- 
#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.