[GRASS-dev] Re: [GRASS-user] [bug #3041] nviz max resolution
ppm image dump
Bob Covill
bcovill at tekmap.ns.ca
Wed Aug 30 07:50:33 EDT 2006
Hamish,
Are any of the image tiles coming out correctly? If not than the fault
(in your case) may be with GS_write_zoom. Is your computer using a 64
bit processor?
If the problem is not the above, have you tried adjusting the nviz
screen aspect slightly? This may correct any math errors that are being
passed to the output images, such as 0 pixels wide.
I had a version of this from a while back where I moved all of the
pnmcat stuff to the TCL side of nviz. This would get rid of the system
commands in do_zoom.c and allow easier control in the script. For
example you could check to see if pnmcat is installed, and if not pop-up
a message box.
--
Bob
On Wed, 2006-08-30 at 17:14 +1200, Hamish wrote:
> adding in some more debug statements: [Before|After row x col]
>
> Writing Tile 2 of 9
> D0/0: Nstart_zoom_cmd(): [B1x3] img_width=1024 img_height=1024
> D0/0: Nstart_zoom_cmd(): [B1x3] maxx=2048 XX=-2048 maxy=2048 YY=0 c=1024
> /* Re-set image width or height if required */
> D0/0: Nstart_zoom_cmd(): [A1x3] img_width=0 img_height=1024
>
>
> !! XX=-2048
>
> if ((maxx + XX) < c)
> img_width = maxx + XX;
> if ((maxy + YY) < d)
> img_height = maxy + YY;
>
>
> XX,YY start as:
>
>
> /* Set X & Y to zero for lower left corner */
> XX = YY = 0;
>
> then in the for loops:
>
> XX -= c;
> cnt++;
> } /* Done col */
> /* Reset XX and img_width */
> XX = 0;
> img_width = c;
> YY -= d;
> } /* done row */
>
>
>
> Final Assembled Image will be 2048 x 2048
> D0/0: Nstart_zoom_cmd(): XX=0 YY=0
> D0/0: gsd_viewport(): l=0,b=0,r=2048,t=2048
> D0/0: Nstart_zoom_cmd(): XX=0 YY=0
> D0/0: Nstart_zoom_cmd(): [B1x1] img_width=1024 img_height=1024
> D0/0: Nstart_zoom_cmd(): [B1x1] maxx=2048 XX=0 maxy=2048 YY=0 c=1024
> D0/0: Nstart_zoom_cmd(): [A1x1] img_width=1024 img_height=1024
> Writing Tile 1 of 9
> D0/0: Nstart_zoom_cmd(): XX=-1024 YY=0
> D0/0: gsd_viewport(): l=-1024,b=0,r=2048,t=2048
> D0/0: Nstart_zoom_cmd(): XX=-1024 YY=0
> D0/0: Nstart_zoom_cmd(): [B1x2] img_width=1024 img_height=1024
> D0/0: Nstart_zoom_cmd(): [B1x2] maxx=2048 XX=-1024 maxy=2048 YY=0 c=1024
> D0/0: Nstart_zoom_cmd(): [A1x2] img_width=1024 img_height=1024
> Writing Tile 2 of 9
> D0/0: Nstart_zoom_cmd(): XX=-2048 YY=0
> D0/0: gsd_viewport(): l=-2048,b=0,r=2048,t=2048
> D0/0: Nstart_zoom_cmd(): XX=-2048 YY=0
> D0/0: Nstart_zoom_cmd(): [B1x3] img_width=1024 img_height=1024
> D0/0: Nstart_zoom_cmd(): [B1x3] maxx=2048 XX=-2048 maxy=2048 YY=0 c=1024
> D0/0: Nstart_zoom_cmd(): [A1x3] img_width=0 img_height=1024
> Writing Tile 3 of 9
> D0/0: Nstart_zoom_cmd(): XX=0 YY=-1024
> D0/0: gsd_viewport(): l=0,b=-1024,r=2048,t=2048
> D0/0: Nstart_zoom_cmd(): XX=0 YY=-1024
> D0/0: Nstart_zoom_cmd(): [B2x1] img_width=1024 img_height=1024
> D0/0: Nstart_zoom_cmd(): [B2x1] maxx=2048 XX=0 maxy=2048 YY=-1024 c=1024
> D0/0: Nstart_zoom_cmd(): [A2x1] img_width=1024 img_height=1024
> Writing Tile 4 of 9
> ...
>
>
>
> if I change the XX and YY -= to += (just a guess) I don't get any errors
> and it creates a single test.ppm which is 3072x3072, but the contents
> are still bogus.
>
>
>
> Hamish
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
More information about the grass-dev
mailing list