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

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.

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

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!!

--- Headers Follow ---

From jidanni@jidanni.org Fri Jul 1 07:13:15 2005

Return-Path: <jidanni@jidanni.org>
Delivered-To: grass-bugs@lists.intevation.de
Received: from mail.intevation.de (aktaia [212.95.126.10])
  by lists.intevation.de (Postfix) with ESMTP id 75EDC1006A2
  for <grass-bugs@lists.intevation.de>; Fri, 1 Jul 2005 07:13:15 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
  by mail.intevation.de (Postfix) with ESMTP id 305DC36DDD
  for <grass-bugs@lists.intevation.de>; Fri, 1 Jul 2005 07:13:15 +0200 (CEST)
Received: from frodo.hserus.net (frodo.hserus.net [204.74.68.40])
  by mail.intevation.de (Postfix) with ESMTP id 6850136CDC
  for <grass-bugs@intevation.de>; Fri, 1 Jul 2005 07:13:13 +0200 (CEST)
Received: from tc218-187-25-103.dialup.dynamic.apol.com.tw ([218.187.25.103]:34437 helo=jidanni1)
  by frodo.hserus.net with esmtpsa
  (Cipher TLSv1:AES256-SHA:256) (Exim 4.51 #0)
  id 1DoDpv-000PMV-6Z by authid <jidanni> with plain
  for <grass-bugs@intevation.de>; Fri, 01 Jul 2005 10:43:12 +0530
To: grass-bugs@intevation.de
Subject: ps.map: no way to make monochrome
From: Dan Jacobson <jidanni@jidanni.org>
Date: Fri, 01 Jul 2005 11:41:41 +0800
Message-ID: <87psu342h6.fsf@jidanni.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Status: No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level:

-------------------------------------------- Managed by Request Tracker

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" ?