[GRASSLIST:5090] Postscript and png file comparison

Hello!

As promised I am sending you an output of the same
area in png and ps version. The used code was:

for the png file generation

GRASS 5.7.cvs:/home > g.region -p
projection: 1 (UTM)
zone: 33
datum: ** unknown (default: WGS84) **
ellipsoid: bessel
north: 5076605.67605965
south: 5075409.803737
west: 442154.46831029
east: 443407.60021429
nsres: 2.11658818
ewres: 2.11677686
rows: 565
cols: 592
GRASS 5.7.cvs:/home > export GRASS_WIDTH=592
GRASS 5.7.cvs:/home > export GRASS_HEIGHT=565
GRASS 5.7.cvs:/home > export
GRASS_PNGFILE=PlaninskoPolje.png
GRASS 5.7.cvs:/home > d.mon start=PNG
PNG: GRASS_TRUECOLOR status: TRUE
PNG: collecting to file: PlaninskoPolje.png,
     GRASS_WIDTH=592, GRASS_HEIGHT=565
Graphics driver [PNG] started
GRASS 5.7.cvs:/home > d.rast PlaninskoPolje
100%
GRASS 5.7.cvs:/home > d.mon stop=PNG
Monitor 'PNG' terminated

and for the ps file generation simply

raster PlaninskoPolje
end

Please try comparing the two files and possibly print
them too and see for yourself. The postscript file is
displayes and printed with less resolution.

Thanks for your help, Miha Staut

___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com

(attachments)

PlaninskoPolje.tar.bz2 (91 KB)

Miha Staut wrote:

As promised I am sending you an output of the same
area in png and ps version. The used code was:

[snip]

Please try comparing the two files and possibly print
them too and see for yourself. The postscript file is
displayes and printed with less resolution.

Yep. The raster in the PostScript file has half the horizontal
resolution: 296x565 compared to 592x565 for the PNG file.

It appears that ps.map tries to impose a hard-coded limit of 75dpi on
rasters (although the algorithm is rather dubious), halving the
resolution of the largest dimension in order to do so.

FWIW, the relevant code is in map_setup.c, preceded by the comment:

      /* adjust sampling if too big */

--
Glynn Clements <glynn@gclements.plus.com>