Revision: 65095
http://sourceforge.net/p/brlcad/code/65095
Author: carlmoore
Date: 2015-05-29 16:39:03 +0000 (Fri, 29 May 2015)
Log Message:
-----------
fix the broken default case; in the man page, note the optional '<' and expand
discussion of one of the examples
Modified Paths:
--------------
brlcad/trunk/doc/docbook/system/man1/en/pix-bw.xml
brlcad/trunk/src/util/pix-bw.c
Modified: brlcad/trunk/doc/docbook/system/man1/en/pix-bw.xml
===================================================================
--- brlcad/trunk/doc/docbook/system/man1/en/pix-bw.xml 2015-05-29 15:18:41 UTC
(rev 65094)
+++ brlcad/trunk/doc/docbook/system/man1/en/pix-bw.xml 2015-05-29 16:39:03 UTC
(rev 65095)
@@ -27,7 +27,8 @@
<arg choice='opt'><arg choice='plain'>-G
</arg><replaceable>g_weight</replaceable></arg>
<arg choice='opt'><arg choice='plain'>-B
</arg><replaceable>b_weight</replaceable></arg> </arg> </arg>
<arg choice='opt'>-o <replaceable>out.bw</replaceable></arg>
- <arg choice='opt'><replaceable>in.pix</replaceable></arg>
+ <arg choice='opt'>
+ <arg choice='opt'><</arg><replaceable>in.pix</replaceable></arg>
<arg choice='plain'>></arg>
<arg choice='plain'><replaceable>out.bw</replaceable></arg>
</cmdsynopsis>
@@ -92,7 +93,8 @@
<refsect1 xml:id='examples'><title>EXAMPLES</title>
<para>pix-bw -R0.0 -B0.0 < <emphasis remap='I'>file.pix</emphasis> >
<emphasis remap='I'>file.bw</emphasis></para>
-<para>will equally blend the red and blue color planes.</para>
+<para>will equally blend the red and blue color planes; because -G is omitted,
the green color plane is not considered.
+(Had "-G0.0" been included in this example, the three colors would have been
weighted equally, as in the default condition.)</para>
<para>pix-bw -R0.30 -G0.59 -B0.11 < <emphasis remap='I'>file.pix</emphasis>
> <emphasis remap='I'>file.bw</emphasis></para>
<para>
Modified: brlcad/trunk/src/util/pix-bw.c
===================================================================
--- brlcad/trunk/src/util/pix-bw.c 2015-05-29 15:18:41 UTC (rev 65094)
+++ brlcad/trunk/src/util/pix-bw.c 2015-05-29 16:39:03 UTC (rev 65095)
@@ -179,10 +179,11 @@
color = ICV_COLOR_B;
else if (green)
color = ICV_COLOR_G;
- else {
- bu_log("pix-bw: no color scheme specified\n");
- bu_exit(1, "%s",usage);
- }
+ else
+ color = ICV_COLOR_RGB;
+ /* no color scheme specified; rweight,gweight,bweight have
+ * all remained zero, so weight the 3 colors equally.
+ */
icv_rgb2gray(img, color, rweight, gweight, bweight);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits