[GRASS5] [bug #3389] (grass) ps.map: no way to make monochrome

Hamish hamish_nospam at yahoo.com
Fri Jul 1 03:16:11 EDT 2005


> this bug's URL: http://intevation.de/rt/webrt?serial_num=3389
> -------------------------------------------------------------------
> 
> I notice try as I may,
> $ echo 'vlines ribcage; color black; end; vpoints ribcage;\
> color black; fcolor black; end;'|tr \; \\n|\
> ps.map scale=1:40000 output=ribcage.ps
> 
> $ identify -verbose ribcage.ps
> still shows so many colors. No way just to make black and white.

Is this real? e.g. do you see a color image in gv?

how many unique colors does this show:

cat map.ps | grep ' C$' | sort | uniq | wc -l


> One has to do
> $ convert -monochrome ribcage.png ribcage.png
> for better or worse.


? why. Smaller file size? Actually comes out colored?

Presumably you are using netpbm tools to make PNG from PS. Just use a
pnmquant or similar step in the middle?



> What's really bad is ps.map insists on drawing an undocumented black
> border around the image, with no way to get rid of it!!


see previous email on how to disable it.

I like the border. ps.map is for plotting maps, and it's a good thing to 
delineate where the extent of the available data is IMO. Feel free to try
and sell me on making it optional/sizeable, but don't get your hopes up.




Hamish

ps-
I find stdin -> ps.map in a script is easier to read this way,

ps.map out=map.ps << EOF
scale 1:40000
vlines ribcage
  color black
  end
vpoints ribcage
  color black
  fcolor black
  end
end
EOF


scale is used as a mapping command as it is a mapping command.
You were missing a final "end" ?




More information about the grass-dev mailing list