about summary refs log tree commit diff
path: root/xwdtopnm.html
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-01-21 17:52:56 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2009-01-21 17:52:56 +0000
commitfe50b429374a2bdf22c892c610fe96c191ef321f (patch)
treeee3abe2b9c76eef7b5c77879d349e126b3b75b8b /xwdtopnm.html
parenta8f37df0f40833d99475480cc5a4d132b9e8ff52 (diff)
downloadnetpbm-mirror-fe50b429374a2bdf22c892c610fe96c191ef321f.tar.gz
netpbm-mirror-fe50b429374a2bdf22c892c610fe96c191ef321f.tar.xz
netpbm-mirror-fe50b429374a2bdf22c892c610fe96c191ef321f.zip
"miscellaneous update"
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@821 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'xwdtopnm.html')
-rw-r--r--xwdtopnm.html70
1 files changed, 51 insertions, 19 deletions
diff --git a/xwdtopnm.html b/xwdtopnm.html
index 3b28615d..285d2e2f 100644
--- a/xwdtopnm.html
+++ b/xwdtopnm.html
@@ -2,24 +2,21 @@
 <HTML><HEAD><TITLE>Xwdtopnm User Manual</TITLE></HEAD>
 <BODY>
 <H1>xwdtopnm</H1>
-Updated: 21 October 2003
+Updated: 21 January 2009
 <BR>
 <A HREF="#index">Table Of Contents</A>
 
-<A NAME="lbAB">&nbsp;</A>
 <H2>NAME</H2>
 xwdtopnm - convert an X11 or X10 window dump file to a PNM image
 
-<A NAME="lbAC">&nbsp;</A>
-<H2>SYNOPSIS</H2>
+<H2 id="synopsis">SYNOPSIS</H2>
 
 <B>xwdtopnm</B>
 [<b>-verbose</b>]
 [<b>-headerdump</b>]
 [<I>xwdfile</I>]
 
-<A NAME="lbAD">&nbsp;</A>
-<H2>DESCRIPTION</H2>
+<H2 id="description">DESCRIPTION</H2>
 
 <p>This program is part of <a href="index.html">Netpbm</a>.
 
@@ -45,8 +42,7 @@ two bytes instead of one for each sample in the image).  So you may
 want to run the output of <b>xwdtopnm</b> through <b>pamdepth</b>
 before feeding it to one of these old programs.
 
-<A NAME="options">&nbsp;</A>
-<H2>OPTIONS</H2>
+<H2 id="options">OPTIONS</H2>
 
 <dl>
 <dt><b>-verbose</b>
@@ -61,30 +57,66 @@ new in Netpbm 10.26 (December 2004).
 
 </dl>
 
+<h2 id="notes">NOTES</h2>
 
-<A NAME="lbAF">&nbsp;</A>
-<H2>SEE ALSO</H2>
+<h3 id="twobytesamples">Two Byte Samples</h3>
+
+<p><b>xwdtopnm</b> sometimes produces output with a maxval greater than 255,
+which means the maximum value of a sample (one intensity value, e.g. the
+red component of a pixel) is greater than 255 and therefore each sample
+takes 2 bytes to represent.  This can be a problem because some programs
+expect those bytes in a different order from what the Netpbm format specs
+say, which is what <b>xwdtopnm</b> produces, which means they will see totally
+different colors that they should.   <b>xv</b> is one such program.
+
+<p>If this is a problem (e.g. you want to look at the output of <b>xwdtopnm</b>
+with <b>xv</b>), there are two ways to fix it:
+
+<ul>
+<li>Pass the output through <b>pamendian</b> to produce the format the
+program expects.
+<li>Pass the output through <b>pamdepth</b> to reduce the maxval below 256
+so there is only one byte per sample.
+</ul>
+
+<p>Often, there is no good reason to have a maxval greater than 255.  It
+happens because in XWD, byte not PNM, each color component of a pixel can have
+different resolution, for example 5 bits for blue (maxval 31), 5 bits for red
+(maxval 31), and 6 bits for green (maxval 63), for a total of 16 bits per
+pixel.  In order to reproduce the colors as closely as possible,
+<b>xwdtopnm</b> has to use a large maxval.  In this example, it would use 31 *
+31 * 63 = 60543, and use 48 bits per pixel.
+
+<p>Because this is a common and frustrating problem when using <b>xwdtopnm</b>,
+the program issues a warning whenever it generates output with two byte
+samples.  You can quiet this warning with the <b>-quiet</b> <a href="index.html#commonoptions">common option</a>.
+
+
+<H2 id="seealso">SEE ALSO</H2>
 
 <A HREF="pnmtoxwd.html">pnmtoxwd</A>,
+<A HREF="pamendian.html">pamendian</A>,
+<A HREF="pamdepth.html">pamdepth</A>,
 <A HREF="pnm.html">pnm</A>,
 <b>xwd</b> man page
 
-<A NAME="lbAG">&nbsp;</A>
-<H2>AUTHOR</H2>
+<H2 id="author">AUTHOR</H2>
 
 Copyright (C) 1989, 1991 by Jef Poskanzer.
 
 <HR>
 
-<A NAME="index">&nbsp;</A>
-<H2>Table Of Contents</H2>
+<H2 id="index">Table Of Contents</H2>
 <UL>
-<LI><A HREF="#lbAB">NAME</A>
-<LI><A HREF="#lbAC">SYNOPSIS</A>
-<LI><A HREF="#lbAD">DESCRIPTION</A>
+<LI><A HREF="#synopsis">SYNOPSIS</A>
+<LI><A HREF="#description">DESCRIPTION</A>
 <LI><A HREF="#options">OPTIONS</A>
-<LI><A HREF="#lbAF">SEE ALSO</A>
-<LI><A HREF="#lbAG">AUTHOR</A>
+<li><a href="#notes">NOTES</a>
+  <ul>
+  <li><a href="#twobytesamples">Two Byte Samples</a>
+  </ul>
+<LI><A HREF="#seealso">SEE ALSO</A>
+<LI><A HREF="#author">AUTHOR</A>
 </UL>
 </BODY>
 </HTML>